
git-ship
by kawabeshogo
Research Agent using Claude Agent SDK with FastAPI web UI
SKILL.md
name: git-ship description: Automate git workflow including add, commit, push, and PR creation. Use this skill when user says "ship it", "git ship", "/ship", "commit and push", "create PR", or asks to push changes and create a pull request. Handles the complete flow from staging changes to opening a PR on GitHub.
Git Ship
Automate the complete git workflow: stage changes, generate commit message, push to remote, and create a pull request.
Workflow
1. Check Git Status
Run these commands to understand current state:
git status
git diff --stat
git log --oneline -5
2. Ask for Target Branch
Ask the user which branch to target for the PR using AskUserQuestion:
- Detect available remote branches (main, master, develop) as options
- Let user specify a custom branch if needed
3. Stage Changes
Stage all changes or ask user to confirm which files to include:
git add -A
For selective staging, show the list of changed files and let user choose.
4. Generate Commit Message
Analyze the diff to generate a meaningful commit message:
git diff --cached
Generate a commit message following conventional commits format:
feat:for new featuresfix:for bug fixesdocs:for documentation changesrefactor:for code refactoringstyle:for formatting changestest:for adding testschore:for maintenance tasks
Commit message structure:
<type>: <short summary>
<detailed description if needed>
Co-Authored-By: Claude <noreply@anthropic.com>
5. Commit Changes
git commit -m "$(cat <<'EOF'
<generated message>
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
6. Push to Remote
Check if branch exists on remote and push:
# Check current branch
git branch --show-current
# Push with upstream tracking
git push -u origin HEAD
7. Create Pull Request
Use GitHub CLI to create the PR:
gh pr create --title "<PR title>" --body "$(cat <<'EOF'
## Summary
<bullet points summarizing changes>
## Changes
<list of modified files/features>
## Test Plan
<how to verify the changes>
---
Generated with Claude
EOF
)"
Error Handling
- No changes: If
git statusshows nothing to commit, inform user - Uncommitted changes on wrong branch: Offer to create a new branch first
- Push rejected: Pull latest changes and retry, or ask user for guidance
- PR creation fails: Check if
ghCLI is authenticated, guide user throughgh auth login
Quick Reference
| Step | Command |
|---|---|
| Status | git status |
| Stage all | git add -A |
| Commit | git commit -m "message" |
| Push | git push -u origin HEAD |
| Create PR | gh pr create |
Score
Total Score
Based on repository quality metrics
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
Reviews
Reviews coming soon