commit
4
总安装量
4
周安装量
#49446
全站排名
安装命令
npx skills add https://github.com/pedrohcgs/claude-code-my-workflow --skill commit
Agent 安装分布
openclaw
4
claude-code
4
codex
4
kiro-cli
4
kimi-cli
4
cursor
4
Skill 文档
Commit, PR, and Merge
Stage changes, commit with a descriptive message, create a PR, and merge to main.
Steps
- Check current state:
git status
git diff --stat
git log --oneline -5
- Create a branch from the current state:
git checkout -b <short-descriptive-branch-name>
- Stage files â add specific files (never use
git add -A):
git add <file1> <file2> ...
Do NOT stage .claude/settings.local.json or any files containing secrets.
- Commit with a descriptive message:
If $ARGUMENTS is provided, use it as the commit message. Otherwise, analyze the staged changes and write a message that explains why, not just what.
git commit -m "$(cat <<'EOF'
<commit message here>
EOF
)"
- Push and create PR:
git push -u origin <branch-name>
gh pr create --title "<short title>" --body "$(cat <<'EOF'
## Summary
<1-3 bullet points>
## Test plan
<checklist>
ð¤ Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
- Merge and clean up:
gh pr merge <pr-number> --merge --delete-branch
git checkout main
git pull
- Report the PR URL and what was merged.
Important
- Always create a NEW branch â never commit directly to main
- Exclude
settings.local.jsonand sensitive files from staging - Use
--merge(not--squashor--rebase) unless asked otherwise - If the commit message from
$ARGUMENTSis provided, use it exactly