An Agent Skill that follows disciplined Git workflows: break large code changes into small, modular, atomic commits; produce a Commit Plan; verify step by step; and draft a pull request description. Works with Cursor, Codex, OpenCode, Claude Code, and similar AI coding assistants.
- Atomic commits: Split big changes into single-purpose commits you can validate on their own
- Commit Plan: Plan before you code—clear intent and verification for each commit
- Conventional Commits: Consistent, spec-compliant commit messages
- PR draft: Auto-generated PR text with a verification checklist, risks, and rollback notes
- Committing code or opening a PR
- Untangling a large set of changes
- Standardizing how you commit
- Any conversation that mentions commit, push, or pull request
# 1. Install (npx recommended)
npx add-skill qCanoe/commit-prompt-skill -g
# 2. Invoke in an agent chat
# Say: "Help me commit these changes" or "Create a PR"
# Or use /commit-prompt if your client supports itUse add-skill for one-command setup across Cursor, Codex, OpenCode, Claude Code, and more:
# Project-local install
npx add-skill qCanoe/commit-prompt-skill
# User-wide install (available everywhere)
npx add-skill qCanoe/commit-prompt-skill -g
# Non-interactive (CI/CD)
npx add-skill qCanoe/commit-prompt-skill -g -yClone or copy this repo into your agent’s skills directory:
# Cursor
git clone https://github.com/qCanoe/commit-prompt-skill.git ~/.cursor/skills/commit-prompt
# Codex
git clone https://github.com/qCanoe/commit-prompt-skill.git ~/.codex/skills/commit-prompt
# OpenCode
git clone https://github.com/qCanoe/commit-prompt-skill.git ~/.config/opencode/skill/commit-prompt
# Claude Code
git clone https://github.com/qCanoe/commit-prompt-skill.git ~/.claude/skills/commit-prompt- Single responsibility: One logical change per commit
- Buildable: After every commit, the codebase should still run
- Verifiable: Attach evidence (short summary of tests / lint / build)
- Readable: Aim for ≤300 lines per commit diff (if larger, explain why)
- ❌ Mixing unrelated edits in one commit (formatting, renames, dependency bumps, features)
- ❌ One giant “everything” commit
- ❌ Restructuring the codebase while shipping new behavior in the same commit
- Create a branch:
feature/<topic>orfix/<topic> - Sync the default branch:
git fetch --all --prune, thengit rebase origin/main - Baseline checks: run tests + build + lint; capture a short summary of the output
Before writing code, output a Commit Plan. Planning rules:
- Infra / refactors before features
- Add or extend tests before changing behavior
- Whole-repo formatting gets its own commit—first or last
For each slice, repeat:
- Implement the change
- Run the verification commands that belong to that slice
- Stage precisely with
git add -p(avoid blindgit add .) - Commit using Conventional Commits
- Emit a Commit Record
- Push (batch pushes are fine—as long as each commit was verified)
Finish with a PR description draft (Summary, Scope, Verification, Risk & Rollback).
Follow Conventional Commits:
type(scope): imperative summary
[optional body]
[optional footer]
Types: feat | fix | refactor | chore | test | docs | build | ci | perf | style
commit-prompt/
├── SKILL.md # Skill definition, workflow, checklist
├── templates.md # Commit Plan, Commit Record, PR draft, scope hints
├── examples.md # Six walkthroughs (auth, bugfix, formatting, deps, docs/CI, split vs merge)
├── README.md # This file
└── LICENSE # MIT
- Full templates: templates.md
- Worked examples: examples.md
| Symptom | Likely cause | What to do |
|---|---|---|
| Skill not loading | Wrong install path | Confirm ~/.cursor/skills/commit-prompt exists and contains SKILL.md |
add-skill missing |
No Node.js | Install Node.js 18+ or use manual git clone |
Default branch isn’t main |
Project uses master, etc. |
Say so in chat, or replace origin/main in the skill |
| Different verify commands | Repo-specific tooling | Tell the agent your test / lint / build commands |
MIT
Issues and pull requests are welcome.