← All Skills
AI Skill

commit-push-pr

Last updated: 2026-05-17

Full git workflow: verify → commit → push → open PR to staging

Quick Install
npx skills add commit-push-pr

You are running the commit-push-pr workflow. Follow these steps exactly:

Step 1: Verify (don't skip this)

Check which repo we're in and run the appropriate verification:

If in onepersoncompany (/Users/xiaoyinqu/skillboss):
pnpm typecheck 2>&1 | tail -5
If typecheck passes, also run:
pnpm build 2>&1 | tail -10
If in api-hub (/Users/xiaoyinqu/heyboss/api-hub):
python3 -m py_compile src/core/router/decorator.py src/api/run_api.py 2>&1 || echo "Syntax error found"

If verification fails, STOP and report the error. Do not commit broken code.

Step 2: Review what changed

git status
git diff --stat HEAD

Show the user a summary of what will be committed (file list + brief description).

Step 3: Determine the branch

Check current branch:

git branch --show-current

If already on a feature branch (not main/staging), use it. If on main or staging, create a new branch:

git checkout staging 2>/dev/null || git checkout main
git pull origin $(git branch --show-current)
git checkout -b xiaoyin/staging/$ARGUMENTS
Where $ARGUMENTS is the branch name passed to this command (or derive one from the changes).

Step 4: Stage and commit

Stage only relevant files (not lockfiles, .env, etc.):

git add <relevant files>

Create a focused commit message describing WHY, not just what:

git commit -m "$(cat <<'EOF'
<one-line summary>

<optional: 1-2 sentence explanation of why this change was needed>

🤖 Generated with Claude Code

Co-Authored-By: Claude <[email protected]> EOF )"

Step 5: Push

git push -u origin $(git branch --show-current)

Step 6: Open PR

gh pr create \
  --title "<same as commit title>" \
  --base staging \
  --body "$(cat <<'EOF'

Summary

  • <bullet points of what changed>

Test plan

  • [ ] Verified build passes
  • [ ] Tested locally / curl verified
🤖 Generated with Claude Code EOF )"

Step 7: Report back

Show the user:

  • PR URL
  • Branch name
  • What was committed (file list)
  • Verification result

Notes:
  • Never push to main (the PreToolUse hook will block it anyway)
  • If $ARGUMENTS is empty, derive branch name from changed files
  • If gh is not available, skip Step 6 and give the user the push URL instead