Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
devarfeen avatar

Commit Push Pr

  • 39 installs
  • 1 repo stars
  • Updated July 23, 2026
  • devarfeen/agent-skills-kit

commit-push-pr is an agent skill that commits, pushes, and opens a GitHub PR closing one validated issue per shared ship policy.

About

commit-push-pr is a procedural agent skill for solo and indie builders who track work in GitHub issues and want a consistent ship ritual: validate labels on the linked issue, commit and push one iteration, then open a PR whose title and body close the issue (`Closes #N`). It shares byte-identical policy with commit-push-close so you pick PR-based review vs closing the issue with a comment without relearning rules. The skill emphasizes stopping when labels are missing, conflicting, or triage-blocked and routing through `/triage` instead of guessing. It keeps human-decision notes in the commit body or ship output when the issue is `ready-for-human`. Ideal when your agent workflow is issue-driven and you need PRs that auditors and teammates can trace back to a single ready issue.

  • Shared ship policy with `commit-push-pr` and `commit-push-close`—same rules except final step (PR vs issue close with co
  • Label gate: exactly one category (`bug` or `enhancement`) plus `ready-for-agent` or `ready-for-human`; blocks on triage
  • No `HITL:` or `AFK:` in commit subjects, branches, PR titles, or issue titles—routing lives only on issue labels
  • Validates state via `gh issue view <num> --json state,labels,title,url` with exact label name matching
  • Inline issue creation path when no linked issue exists, only for valid ad hoc work

Commit Push Pr by the numbers

  • 39 all-time installs (skills.sh)
  • Ranked #324 of 733 Git & Pull Requests skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Jul 29, 2026 (Skillselion catalog sync)
npx skills add https://github.com/devarfeen/agent-skills-kit --skill commit-push-pr

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs39
repo stars1
Security audit2 / 3 scanners passed
Last updatedJuly 23, 2026
Repositorydevarfeen/agent-skills-kit

What it does

Ship one GitHub-issue iteration by committing, pushing, and opening a PR that closes the linked issue with validated labels and shared ship policy.

Who is it for?

Best when you use GitHub issues with `ready-for-agent` / `ready-for-human` and gh CLI and want PR-based shipping instead of direct issue close.

Skip if: Repos without GitHub Issues, teams that do not use label-gated agent routing, or work that should bypass PR review entirely without an approved inline-issue path.

When should I use this skill?

You are ready to ship one GitHub-issue iteration via commit, push, and PR with `Closes #N` after label validation.

What you get

You get a pushed branch and a PR with policy-compliant title and body linked to `Closes #N`, or a explicit stop with triage routing when labels are invalid.

  • Git commit and push
  • PR title and body closing issue #N

By the numbers

  • 2 paired ship skills (commit-push-pr vs commit-push-close) share one byte-identical policy file

Files

SKILL.mdMarkdownGitHub ↗

commit-push-pr

Ship one GitHub-issue iteration as a reviewable PR (with an inline create-if-missing step for the issue):

1. Resolve or create the GitHub issue. 2. Commit the diff with a structured message. 3. Push the current branch (auto-create one off main/master first). 4. Open a PR with Closes #N, a summary, and a how-to-test plan.

Shared ship policy

Read `references/ship-policy.md` first. It holds the rules both ship skills share and that this workflow depends on: Label validation, Authorship policy, Env parity policy, Inline issue creation, Naming anchor, Commit message format, Pre-commit safety, and the Response footer. This SKILL.md only covers what is specific to opening a PR.

PR title and body

Title mirrors the commit subject:

<same text as commit subject>

Body:

Closes #<num>

## Summary
<one or two sentences — what changed and why>

## Decisions
- <only non-obvious choices; omit section if none>

## How to test
1. <step>
2. <step>
3. <expected result>

## Notes
- <follow-ups or known gaps; omit section if none>

Rules for How to test:

  • Concrete, runnable steps a reviewer can copy. Name the screen, command, endpoint, or button.
  • UI: where to click, what to enter, what to see.
  • API/server: exact curl or request, expected status/payload.
  • Internal/refactor with no user-facing surface: pnpm test path/to/file (or equivalent) plus what should still work end-to-end.
  • 3–6 steps. If you can't write a real test plan from the diff, ask the user before opening the PR — do not invent one.

The Closes #N line is mandatory and must be on its own line near the top of the body so GitHub auto-links and auto-closes the issue on merge. If linking multiple issues, list them as Closes #1, closes #2 (each needs its own closes keyword).

Workflow

1. Read state — run in parallel:

  • git status (no -uall)
  • git diff (staged + unstaged)
  • git log -5 --oneline
  • git branch --show-current
  • git remote get-url origin
  • Detect default branch: gh repo view --json defaultBranchRef -q .defaultBranchRef.name (fallback: main).

2. Resolve or create the issue — branch name → recent commits → conversation context. If none, switch to Inline issue creation (references/ship-policy.md) for valid small ad hoc work, then use the returned number for the rest of the workflow (commit Issue: line, PR Closes #<num>).

3. Read issue labels — for issues that already existed, run gh issue view <num> --json state,labels,title,url and validate against the Label validation table in references/ship-policy.md. If labels are missing/conflicting or the state is needs-triage, needs-info, or wontfix, stop and route back to /triage. For issues just created inline, skip this step — labels were set at creation.

4. Branch handling — if the current branch is main or master (or the detected default branch):

  • Stop before staging anything.
  • Propose a feature branch name: issue/<issue-num>-<slug> where <slug> is a short kebab-case derivation of the issue title (≤ 5 words).
  • Wait for the user to confirm the name (offer to edit).
  • git checkout -b <branch> — uncommitted changes follow the checkout into the new branch.

Otherwise, continue on the current branch.

5. Draft the commit message from the issue title and diff, per Commit message format in references/ship-policy.md. For ad hoc inline issues, the new issue title and commit subject must match (see Naming anchor).

6. Draft the PR title and body — title mirrors the commit subject with no routing marker; body has Closes #N, summary, optional decisions, how-to-test, optional notes (format above). If the test plan isn't obvious, ask the user before continuing.

Before presenting drafts, run the Authorship policy scrub and, if env files/keys changed, the Env parity policy sync pass — both in references/ship-policy.md.

7. Show the user the drafts and wait for one combined approval. Do not stage, push, or call gh pr create before approval:

  • Existing issue: commit message + PR title + PR body.
  • Inline-created issue: new-issue title + new-issue body + chosen category/state labels + commit message + PR title + PR body. After approval, create the issue first, then commit/push/PR in order.

8. Pre-commit safety — apply every check in Pre-commit safety (references/ship-policy.md) before staging.

9. Commit with HEREDOC:

   git commit -m "$(cat <<'EOF'
   <subject>

   Issue: #123

   Decisions:
   - ...

   Files:
   - ...
   EOF
   )"

10. Push the current branch:

  • Tracks a remote → git push.
  • No upstream → git push -u origin <branch>.

11. Open the PR against the detected default branch:

    gh pr create \
      --base "<default-branch>" \
      --head "<current-branch>" \
      --title "<subject>" \
      --body "$(cat <<'EOF'
    Closes #123

    ## Summary
    ...

    ## How to test
    1. ...
    2. ...
    3. ...
    EOF
    )"
  • If a PR already exists for this branch (gh pr list --head <branch> --json number), do not create a duplicate. Update the existing PR's title/body with gh pr edit <num> instead, and report that path back.

12. Report — one line: <SHA> pushed to <branch>; PR #<pr-num> opened (Closes #<issue-num>). Then append the Response footer from references/ship-policy.md (1-6 advisory suggestions).

Examples

Minimal

Commit:

wire signup form to /api/users

Issue: #204

Files:
- app/signup/page.tsx — submit handler + error state
- lib/api/users.ts — POST /users client

PR title: wire signup form to /api/users

PR body:

Closes #204

## Summary
Signup form now POSTs to /api/users and surfaces server errors inline.

## How to test
1. `pnpm dev`, open http://localhost:3000/signup
2. Submit with a duplicate email — expect inline "email already in use"
3. Submit with a fresh email — expect redirect to /welcome

Full

Commit:

add idempotency keys to checkout flow

Issue: #418

Decisions:
- Stored keys in Redis (24h TTL) over Postgres — read path is hot
- Reused existing `x-request-id` header instead of a new one

Files:
- server/checkout/handler.ts — key check before charge
- server/checkout/handler.test.ts — replay + race tests
- infra/redis.ts — TTL helper

Notes:
- Stripe webhook path still unguarded — next iteration

PR title: add idempotency keys to checkout flow

PR body:

Closes #418

## Summary
Checkout charges are now idempotent on `x-request-id`; replays return the original result instead of double-charging.

## Decisions
- Stored keys in Redis (24h TTL) over Postgres — the read path is hot
- Reused existing `x-request-id` header instead of introducing a new one

## How to test
1. `pnpm test server/checkout/handler.test.ts` — all green
2. Hit `POST /checkout` twice with the same `x-request-id` — second call returns the first response, no second Stripe charge
3. Hit twice with different IDs — two distinct charges as before

## Notes
- Stripe webhook path still unguarded — see follow-up #419

Checklist

Before reporting done, verify:

  • [ ] Issue resolved (or created inline) + labels read/created → one category label + ready state label
  • [ ] If on default branch, a feature branch was created and confirmed
  • [ ] Commit subject mirrors the GitHub issue title as closely as practical and has no routing marker
  • [ ] Issue: line present in commit body
  • [ ] No co-author or AI/tool attribution text in commit message, PR title/body, issue content, comments, release notes, or docs
  • [ ] If env keys changed: .env, .env.staging, .env.production were synchronized for add/remove/change operations
  • [ ] If env keys changed: .sample.env or .example.env updated with latest keys + safe placeholders
  • [ ] If env keys changed: README/docs references updated; any gitignored env files were still updated locally and reported
  • [ ] No secret files staged
  • [ ] Hooks ran (no --no-verify)
  • [ ] Push succeeded with upstream set
  • [ ] PR body has Closes #<num> on its own line near the top
  • [ ] PR body has Summary + How to test
  • [ ] No duplicate PR created (existing PR was edited instead)
  • [ ] Final report line printed
  • [ ] Optional Suggested next skills footer included (1-6 advisory suggestions, no gating)

Related skills

How it compares

Use instead of ad-hoc “commit and open PR” chat steps when you need label validation and a paired close-vs-PR ship policy.

FAQ

Who is commit-push-pr for?

Developers who ship agent-done work through GitHub issues and want one PR per iteration with enforced label rules.

When should I use commit-push-pr?

After implementation on a labeled `bug` or `enhancement` issue in `ready-for-agent` or `ready-for-human` during Ship; also at the end of Build tasks when your workflow requires a PR rather than closing the issue in place.

Is commit-push-pr safe to install?

It drives git push and GitHub PR creation via gh; review the Security Audits panel on this page and confirm repo write access before enabling in production repos.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.