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

Commit Push Close

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

Ship one GitHub-issue iteration by committing, pushing, and closing the linked issue with a comment when labels say ready-for-agent or ready-for-human.

About

commit-push-close packages a disciplined GitHub shipping loop for agent-driven fixes and enhancements: validate issue labels, produce a commit message and body that respect human-in-the-loop notes, push, and close the linked issue with an explanatory comment. Solo builders running Claude Code or Cursor against a labeled issue backlog use it when the iteration should end on the issue tracker rather than a pull request—sibling skill commit-push-pr covers the PR plus Closes #N path. The shared policy file is byte-identical across both skills so installs stay self-contained. Label gating is strict: one category label and a ready state, otherwise triage. That makes the skill a Ship-phase launch primitive for small teams that treat issues as the contract between human triage and autonomous implementation.

  • Ships one iteration: commit, push, then close GitHub issue with a closing comment (pairs with commit-push-pr for PR path
  • Enforces label matrix: exactly one of bug or enhancement plus ready-for-agent or ready-for-human
  • Stops on needs-triage, needs-info, wontfix, or missing labels and routes through /triage unless valid ad hoc inline issu
  • Keeps HITL/AFK routing in issue labels only—not in commit subjects, branches, PR titles, or issue titles
  • Shared Ship Policy duplicated with commit-push-pr for self-contained installs

Commit Push Close by the numbers

  • 38 all-time installs (skills.sh)
  • Ranked #328 of 733 Git & Pull Requests skills by installs in the Skillselion catalog
  • Data as of Jul 29, 2026 (Skillselion catalog sync)
npx skills add https://github.com/devarfeen/agent-skills-kit --skill commit-push-close

Add your badge

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

Listed on Skillselion
Installs38
repo stars1
Last updatedJuly 23, 2026
Repositorydevarfeen/agent-skills-kit

What it does

Ship one GitHub-issue iteration by committing, pushing, and closing the linked issue with a comment when labels say ready-for-agent or ready-for-human.

Files

SKILL.mdMarkdownGitHub ↗

commit-push-close

Four-step ship for one GitHub-issue iteration (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 to the current branch. 4. Close the GitHub issue with a comment explaining how to test it.

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 closing the issue directly.

Issue-close comment format

Posted as a comment on the issue right before closing:

Closed by <SHA> on `<branch>`.

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

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

Notes: <follow-ups or known gaps; omit line if none>

Rules for How to test:

  • Concrete, runnable steps a reviewer can copy. Name the screen, command, endpoint, or button.
  • If the change is UI: where to click, what to enter, what to see.
  • If the change is API/server: the exact curl or request, expected status/payload.
  • If the change is internal/refactor with no user-facing surface: how to verify via tests (pnpm test path/to/file, etc.) 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 posting — do not invent one.

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 (sanity-check the repo)

2. Resolve or create the issue — check, in order: branch name (e.g. feat/123-..., agent/PROJ-456-...), recent commits on this branch, conversation context. If no issue can be located, 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.

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. 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).

5. Draft the issue-close comment — summary + how-to-test from the diff (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.

6. Show the user the drafts and wait for approval before any write action. This is one combined confirmation, not three:

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

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

8. Commit with HEREDOC:

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

   Issue: #123

   Decisions:
   - ...

   Files:
   - ...
   EOF
   )"

9. Push the current branch:

  • Tracks a remote → git push.
  • No upstream → git push -u origin <branch>.
  • If the current branch is `main` or `master`: stop and confirm separately before pushing.

10. Close the issue — capture the new commit SHA, then:

    SHA=$(git rev-parse --short HEAD)
    gh issue close <num> --comment "$(cat <<EOF
    Closed by ${SHA} on \`<branch>\`.

    **Summary**
    ...

    **How to test**
    1. ...
    2. ...
    3. ...
    EOF
    )"

Use an unquoted heredoc (<<EOF, not <<'EOF') so ${SHA} interpolates. Escape any literal backticks/$ inside the body.

11. Report — one line: <SHA> pushed to <branch>; issue #<num> closed. 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

Close comment:

Closed by a1b2c3d on `feat/204-signup-wire`.

**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

Close comment:

Closed by 9f0e1a2 on `feat/418-idempotency`.

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

**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 marking the iteration done, verify:

  • [ ] Issue resolved (or created inline) + labels read/created → one category label + ready state label
  • [ ] 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, 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 (or, on main/master, was confirmed separately)
  • [ ] Issue closed with comment containing Summary + How to test
  • [ ] Final report line printed
  • [ ] Optional Suggested next skills footer included (1-6 advisory suggestions, no gating)

Related skills

This week in AI coding

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

unsubscribe anytime.