jack-git-commit
Skill1 starsChanged 2 months agoApache-2.0View on GitHub
Structured git commit skill for all agents and humans. Use when: committing code changes, the user says "commit", "/jack-git-commit", a worker completes a task and needs to commit, or any agent needs to record work in git. Generates Conventional Commit messages with traceable metadata footers (Goal, Step, Worker) so git log serves as a self-documenting work ledger. Enforces atomic commits and explicit staging, then pushes the current branch unless the project says not to.
- Reads credentials
- Commits and pushes
In this repository11 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ai-knowledge-harvesterSkill
- branded-pptxSkill
- chat-conversation-loggerSkill
- competing-pr-triageSkill
- conversation-loggerSkill
- drawioSkill
- excalidrawSkill
- hlx-admin-api-executorSkill
- playwright-demo-videoSkill
- podcast-slides-videoSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 8 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 29
Body: Only when the *why* isn't obvious.
- Distinctive: line 46
Only include fields you actually know.
- Very specific: line 63
Before staging, verify .gitignore exists and covers common entries.
- Very specific: line 74
If .gitignore doesn't exist at all, warn and ask before proceeding — don't commit without one.
- Distinctive: line 80
After staging, run git status to show what will be committed
- Distinctive: line 86
Before proposing the commit:
- Distinctive: line 95
If the user said "commit only X," still ASK before dropping a prompt log — never silently exclude
- Distinctive: line 105
Before composing the message, recall what capabilities produced the staged changes:
- Very specific: line 112
Add each as a footer line (Skill:, Plugin:, MCP:, Tools:).
- Distinctive: line 121
When in doubt: if the tool's *output* shaped what you wrote, record it.
- Distinctive: line 179
Push by default: follow step 7. Never force-push unless the human asks
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Jack Commit
Git history is the ledger. Every commit is queryable, traceable to its origin, and reviewable without external databases.
Commit, then push. Finished work goes to the remote on the current branch without asking, unless the project's instructions say not to. See step 7 for when to stop. Never force-push unless the human asks in the current message.
Format
type(scope): summary
Body: why, not what. Skip if diff is self-explanatory.
Footer metadata (one per line, only what's known)Types: Standard Conventional Commits — feat, fix, refactor, docs, test, chore, style, perf.
Scope: Infer from primary directory/module. Examples: (vendor), (executive-loop), (skills). Omit if changes span too many areas.
Summary: Imperative mood, lowercase after colon, no period, max 72 chars total.
Body: Only when the why isn't obvious. What motivated the change, what was rejected, what edge case this covers.
Footer Metadata
Key: value lines that make git log --grep a queryable ledger.
| Field | When | Example |
Goal: | Worker executing a goal bundle | Goal: P2-finance-dashboard |
Step: | Multi-step execution | Step: 3/5 |
Worker: | Autonomous agent commit | Worker: claude, Worker: codex, Worker: kimi |
Skill: | Skill(s) invoked during the work | Skill: jack-git-commit, drawio |
Plugin: | Plugin(s) used | Plugin: ai-builder-kit/executive-loop |
MCP: | MCP server(s) used | MCP: claude-in-chrome, context7 |
Tools: | Claude tools / notable Bash commands used | Tools: WebSearch, WebFetch, Bash(rg, jq, gh pr view) |
Co-Authored-By: | Attribution desired | Co-Authored-By: Claude <noreply@anthropic.com> |
Only include fields you actually know. Zero footer fields is fine — but if a skill, plugin, MCP server, or notable tool was used to produce the change, always record it. These are provenance: which capability authored what.
Workflow
1. Read state
git status --porcelain
git diff --staged --stat
git diff --staged
git log --oneline -5Nothing staged and nothing modified → stop with "Nothing to commit."
2. Check .gitignore
Before staging, verify .gitignore exists and covers common entries. Warn the user if any of these are missing:
node_modules/
.env
.env.*
.DS_Store
dist/
*.logIf .gitignore doesn't exist at all, warn and ask before proceeding — don't commit without one.
3. Stage
- Nothing staged? → Stage the files this work changed, by path. Other agents may share the checkout, so leave changes you didn't make alone. Never
git add -A. - Something already staged? → Only commit what's staged, don't add more
- After staging, run
git statusto show what will be committed
3a. Always sweep in prompt logs and session records
Prompt logs (ai-docs/**/prompt-log*.md, ai-docs/**/*session*.md, .claude/projects/**/session-*.md) and retros (ai-docs/**/retro-*.md) are the provenance trail for the commits around them. They should NEVER be filtered out as "unrelated" — git history is only queryable if the why-we-did-this note lands in the same branch as the what-we-did diff.
Before proposing the commit:
git status --porcelain | grep -E '^\?\? .*(prompt-log|retro-|session).*\.md$' || trueIf any match:
- Stage them into the current commit (do not split into a separate commit unless the user explicitly asks)
- Mention them in the commit body under a
Provenance:line if space allows - If the user said "commit only X," still ASK before dropping a prompt log — never silently exclude
This rule exists because on 2026-04-11 a prompt log for v2.1.6 was left untracked for two commits, breaking the "git log is the ledger" guarantee.
4. Check for mixed concerns
Review the staged diff and group changes by logical intent. If there is more than one concern, make one commit per concern, in dependency order, without asking. Only stop to ask if the split isn't clear.
4a. Record skills, plugins, MCP servers, and tools used
Before composing the message, recall what capabilities produced the staged changes:
- Skill(s) invoked this session that shaped the diff (e.g.,
drawio,pptx,excalidraw,playwright-cli) - Plugin(s) active during the work
- MCP server(s) whose tools were called to produce or verify the change (e.g.,
context7for docs lookups,claude-in-chromefor browser testing,stitchfor design) - Tools — Claude built-in tools (
WebSearch,WebFetch,Agent,NotebookEdit, etc.) and notable Bash commands that materially shaped the change (e.g.,rg,jq,gh pr view,curl,npm test,pytest,terraform plan)
Add each as a footer line (Skill:, Plugin:, MCP:, Tools:). If none were used, omit. Never fabricate — only list what was actually invoked in the conversation that produced this commit.
What counts as "notable" for Tools::
- ✅ External research (
WebSearch,WebFetch,gh,curlto a real API) - ✅ Verification / test runs whose output influenced the diff (
npm test,pytest,terraform plan,cargo check) - ✅ Code analysis that drove decisions (
rg/grep,jq,ast-grep) - ✅ Spawned
Agentsubagents - ❌ Trivial built-ins:
Read,Edit,Write,ls,cat,git status/diff/log,mkdir
When in doubt: if the tool's output shaped what you wrote, record it. If it was just navigation, skip it.
5. Generate message
feat(vendor): add Kimi wire protocol support
Implements bidirectional streaming for Kimi agent SDK,
replacing the CLI fallback with native wire communication.
Goal: P1-multi-vendor-workers
Step: 2/4
Worker: claude
Skill: jack-git-commit
MCP: context7
Tools: WebSearch, Bash(rg, npm test)6. Commit
git commit -m "$(cat <<'EOF'
<the approved message>
EOF
)"HEREDOC for multi-line. Never --no-verify. Hook failure → show output and stop.
7. Push
Push the current branch once the work is committed, without asking:
git push origin HEAD # first push of a branch: git push -u origin HEAD| Situation | Action |
| Side branch | Push |
main | Push, unless the project's instructions say not to |
| Project says not to push | Leave it local and say so |
| Public repo | Read the diff for secrets and personal data first, then push |
| Critical: production other people rely on, money, credentials, hard to undo | Stop and ask |
| Still iterating live with the human | Hold the commit and push until the thread settles |
| Remote moved | git pull --rebase, then push |
| Push rejected or a hook blocks it | Show the output and stop |
8. Confirm
Committed: feat(vendor): add Kimi wire protocol support
3 files changed, 147 insertions(+), 12 deletions(-)
Pushed: origin/feat-multi-vendorRules
- Push by default: follow step 7. Never force-push unless the human asks
- Stage smart: nothing staged → stage the paths this work changed, never
git add -A; something staged → commit only that - Always sweep prompt logs & retros —
ai-docs/**/prompt-log*.md,ai-docs/**/retro-*.md, session records. These are provenance, not "unrelated files." Never silently exclude them. - Atomic: one logical change per commit; split mixed concerns
- Respect hooks — never
--no-verify - Don't fabricate — only include metadata you actually know
- Always record capability provenance — if a skill, plugin, MCP server, or notable tool/Bash command materially shaped the change, add
Skill:/Plugin:/MCP:/Tools:footer lines. Never silently omit. - Ask when uncertain — unclear intent → ask before committing
- Universal — same format for human, Claude, Codex, Kimi
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

