git-commit
Skill9 starsChanged 6 months agoApache-2.0View on GitHub
Commit discipline for any agent or human committing to this repo. Verify identity before the first commit, follow the conventional-commits format with task traceability, exclude secrets via .gitignore, attribute human and AI contributors honestly.
- Reads credentials
- Commits and pushes
194 other projects use a version of this.
Adopted by
Most recently taken up by
- Shavakan/claude-marketplacetheir own version, first seen Nov 29, 2026
- 27Aaron/skillstheir own version, first seen Nov 29, 2026
- autohandai/community-skillstheir own version, first seen Nov 29, 2026
- MorningStar0709/trae-agent-enhancementstheir own version, first seen Nov 29, 2026
- dhruvanbhalara/skillstheir own version, first seen Nov 29, 2026
- CodelyTV/agent-harnesstheir own version, first seen Nov 29, 2026
Used with
Projects with it also use git-pr, git-branch and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
klauswgSkillgit-pr
Prepare, review, publish, or update a complete GitHub pull request for the current repository, including local commit readiness, safe push strategy, semantic title validation, repository-native PR templates, issue linking, and checks verification. Use when the user asks to draft, create, submit, publish, open, or update a pull request. Always require the user to review and explicitly approve the exact final PR before any push or GitHub write.
Also in 13 projects that use this
MicrosoftSkillgit-branch
Branch management for implementation. Use when you need to create a branch, switch branches, checkout, or verify branching strategy before implementing code. Do not use for commits (use git-commit), pull requests (use pull-request), or advanced git operations (rebase, merge).
Also in 6 projects that use this
mjun0812Skillgithub-pr-create
Pull Requestを作成するSkill。現在のbranchからpull requestを作成する。言語指定可能。 ユーザーが「PR作って」「pull request作成して」のように依頼したら使うこと。
Also in 3 projects that use this
klauswgSkillgit-issue
Prepare, review, create, or update evidence-based GitHub issues for the current repository with duplicate detection, repository-native templates, valid labels, and post-publication verification. Use when the user asks to draft, file, submit, publish, edit, or refine a GitHub issue, bug report, feature request, performance issue, or technical proposal. Always require the user to review and explicitly approve the exact final issue before any GitHub write.
Also in 3 projects that use this
mgiovaniSkilldocs-adr
Create a numbered Architecture Decision Record (ADR) documenting a technical
Also in 3 projects that use this
gologo13Skillgit-push
Push current branch to origin and sync with remote updates; keywords: git, rebase. Use only on explicit request; before execution, review diffs and list impact scope.
Also in 8 projects that use this
- +1 more from klauswg
Other versions194 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 194
- github/awesome-copilot★ 42ksame name
- doocs/leetcode★ 37ksame name
- tisfeng/Easydict★ 15ksame name
- doocs/md★ 14ksame name
- spinabot/brigade★ 11ksame name
- PC2005-cloud/dsh-pet★ 6.8ksame name
- GitTools/GitVersion★ 3.1ksame name
- igorescodro/alkaa★ 1.6ksame name
- microsoft/hve-core★ 1.6ksame name
- mattmireles/gemma-tuner-multimodal★ 1.5ksame name
184 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository61 other files it gives its agents.
- rules/CLAUDE.mdCLAUDE.md
- acceptance-criteria-authorSkill
- adr-authorSkill
- api-contract-authorSkill
- backend-logging-traceabilitySkill
- ba-design-completenessSkill
- ba-ingestion-pipelineSkill
- ba-iteration-planningSkill
- ba-mode-augmentSkill
- ba-mode-external-sourceSkill
- ba-mode-multi-docSkill
- ba-mode-requirements-folderSkill
- ba-mode-reverse-engineerSkill
- ba-mode-single-docSkill
- ba-post-implementationSkill
- be-framework-coding-standardSkill
- c4-authorSkill
- codebase-inventorySkill
- data-lifecycle-contractsSkill
- design-system-authorSkill
- docker-deploymentSkill
- external-integration-adequacySkill
- fe-framework-coding-standardSkill
- figma-canvas-layoutSkill
- figma-design-handoffSkill
- figma-requirements-extractionSkill
- figma-srs-mappingSkill
- flutter-implementationSkill
- flutter-performanceSkill
- flutter-platform-integrationSkill
- format-boundary-contractsSkill
- incident-debuggingSkill
- intent-archaeologySkill
- kubernetes-deploymentSkill
- local-deploymentSkill
- migration-safetySkill
- observability-readinessSkill
- playwright-authorSkill
- qa-author-by-taskSkill
- qa-author-by-usSkill
- qa-execution-runnerSkill
- react-native-implementationSkill
- react-native-performanceSkill
- react-native-platform-integrationSkill
- release-readinessSkill
- rollback-readinessSkill
- sa-architecture-designSkill
- sa-brownfield-extractSkill
- secrets-config-auditSkill
- security-compliance-checklistSkill
- solution-defaultsSkill
- ssh-remote-operationsSkill
- staging-deploymentSkill
- task-sizingSkill
- <kebab-case-name-matching-folder>Skill
- test-case-authorSkill
- third-party-dependency-evaluationSkill
- ui-test-executionSkill
- ui-ux-page-scopingSkill
- user-story-authorSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 0 are common, 5 are distinctive, and 11 are very specific to this project.
0
Common
Most of the 153 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
11
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
- Very specific: line 25
Identity check (one-time per worktree): Run git config user.email && git config user.name.
- Very specific: line 26
.gitignorecheck (one-time per repo): Verify the repo has a .gitignore covering at minimum: env files, secrets, IDE artifacts, build … - Very specific: line 33
Add the task reference: Every commit made for a master-plan task should reference that task (e.g., Refs: T-014 in the footer, or …
- Distinctive: line 77
Default subject-line regex (tighten per project as needed):
- Very specific: line 110
Every commit has a named user.email and user.name.
- Very specific: line 116
AI agents →
Generated-By:trailer: When a Claude Code sub-agent is the primary author, the commit should declare its role (Generated-By: … - Very specific: line 125
No secrets in commit history.
- Distinctive: line 126
No PII (names, emails of users / customers, internal IDs) in commit messages.
- Very specific: line 127
No force-pushing to shared branches.
- Very specific: line 131
Never commit with user.email or user.name empty.
- Very specific: line 132
Never commit a message that fails the conventional-commits regex.
- Very specific: line 133
Never commit a .env, *.pem, *.key, or any other secret-class file.
- Distinctive: line 134
Never include PII or customer identifiers in commit messages or commit bodies.
- Distinctive: line 135
Never git push, git pull, git merge, git rebase, or git cherry-pick from a sub-agent worktree.
- Distinctive: line 136
Never use a personal email for organizational work commits.
- Very specific: line 137
Every task-scoped worktree commit carries either Refs: T-NNN (or scope-tail (T-NNN)) for master-plan work, or Refs: <artifact-path> for kit …
“Common” is measured: kept by at least 6 in 10 of the 153 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Git Commit Discipline
When to use
Any time an agent (or human) is about to run git commit in a worktree or the main branch. Also at project setup, before the first commit, to verify identity and .gitignore. The skill applies cross-phase — BA's SRS edits, SA's architecture edits, Dev's code changes, DevOps's deploy scripts, non-SDLC agents' report files all flow through the same commit discipline.
agents: [all] is a sentinel — this skill is registered under Cross-cutting in .claude/skills/registry.md and applies to every agent in the kit.
Inputs and outputs
- Inputs: the change to commit; the master-plan task ID (
T-NNN) it serves if applicable; the agent role making the commit; for human-contributed work, the human's name + email - Outputs: a well-formed conventional commit in the current local worktree, with identity, traceability, and any required attribution trailers
Procedure
- Identity check (one-time per worktree). Run
git config user.email && git config user.name. If either returns empty, halt — do not commit. Tell the user to configure (see "Configuring identity" below). .gitignorecheck (one-time per repo). Verify the repo has a.gitignorecovering at minimum: env files, secrets, IDE artifacts, build outputs, OS files, the kit's own.tmpstaging files. Usereferences/gitignore-template.mdas the baseline.- Stage the changes.
git add <paths>— nevergit add .blindly. Verify withgit statusandgit diff --cachedbefore committing. - Compose the commit message per
references/conventional-commits-format.md:- Subject line:
<type>(<scope>): <description>— short, lowercase, no trailing period - Blank line, then body (optional but encouraged for non-trivial commits)
- Blank line, then footer trailers (task ref, attribution)
- Subject line:
- Verify message against the regex in
conventional-commits-format.md. If it doesn't match, rewrite — don't bypass with--no-verify. - Add the task reference. Every commit made for a master-plan task should reference that task (e.g.,
Refs: T-014in the footer, or scope-tagged likefeat(billing)(T-014): …). - Add attribution trailers where they apply (see
references/compliance-policy.md):Co-authored-by: <name> <email>when a human's contribution shaped this commit (notably thedesign-human-editedFigma flow per CLAUDE.md §4)Generated-By: <agent-role>when an agent (Claude Code instance) is the primary author
- Commit.
git commit -m "..."for single-line, orgit committo open the editor for multi-line. - Do not push or merge local worktree history. A sub-agent worktree under
.worktrees/<role>-<task-id>/is detached and local-only. Never rungit push,git pull,git merge,git rebase, orgit cherry-pickfrom it. The Orchestrator promotes validated file content to main by path-scoped ingestion per.claude/rules/worktree-isolation.md§5.
Configuring identity
Required values:
user.email— for organizational work, prefer your corporate email domain; never use a personal email for work commitsuser.name— full name (real name, not a handle)
Commands:
# Per-repo (preferred for clarity; lives in .git/config):
git config user.email "you@example.com"
git config user.name "Your Full Name"
# Global (applies across all repos on this machine):
git config --global user.email "you@example.com"
git config --global user.name "Your Full Name"The skill does not auto-configure on the agent's behalf — identity is a human-attested fact, not something an agent should infer. Refuse to commit if unconfigured; surface the gap.
Commit message format (summary; see reference for full spec)
<type>(<scope>): <description>
<optional body — wrap at 72 chars; multiple paragraphs OK>
<optional footer trailers — one per line>
Refs: T-NNN
Co-authored-by: <name> <email>
Generated-By: <agent-role><type>:feat | fix | docs | style | refactor | perf | test | chore | build | ci | revert<scope>: lowercase, dash-separated; for application work prefer area names (api,web,auth,billing, etc.) or kit areas (agents,rules,skills,hooks,docs)<description>: present-tense imperative, lowercase first letter, no period, ≤72 chars total subject line
Default subject-line regex (tighten per project as needed):
^(feat|fix|docs|style|refactor|perf|test|chore|build|ci|revert)(\([a-z0-9-]+(\)\([A-Z]-[0-9]+\))?\))?: [a-z][^.\n]{0,71}$The optional (T-NNN) scope-tail captures the task ID directly in the subject (feat(billing)(T-014): add voucher application). Equivalent footer style: Refs: T-014 on its own line.
See references/conventional-commits-format.md for the full type catalog with descriptions, scope conventions, and worked examples (good and bad).
.gitignore essentials
Categories that must be excluded:
- Secrets:
.env*(except.env.example/.env.template/.env.sample),*.pem,*.key,*.p12,*.pfx,id_rsa*,*.crt,*.cer - Local environment:
node_modules/,.venv/,__pycache__/,.tox/,*.pyc,.cache/ - Build artifacts:
dist/,build/,target/,bin/,out/,*.log - IDE / editor:
.vscode/(unless team-shared),.idea/,*.swp,.DS_Store,Thumbs.db - Kit staging:
*.tmp,CLAUDE.md.*.tmp(the kit's awk staging files; remember to delete them after edits)
Allowlisted (always committable):
.env.example,.env.template,.env.sample— these document required env keys without leaking values- Lock files (
package-lock.json,yarn.lock,poetry.lock,go.sum,Cargo.lock) — these make builds reproducible
Full template: references/gitignore-template.md.
The privacy-check hook (.claude/hooks/privacy-check.cjs) refuses reads/writes against the secret patterns at runtime — .gitignore is the static defense layer, the hook is the dynamic one.
Compliance requirements
Identity
- Every commit has a named
user.emailanduser.name. No anonymous or default-tooling identities (root@...,unknown, etc.). Refuse to commit otherwise. - For organizational work, identity should match the corporate email pattern. The skill doesn't hard-enforce this — it's a project policy line in
references/compliance-policy.md.
Attribution
- Human contributors →
Co-authored-by:trailer. Applies when a human shaped the commit beyond mere review — most notably thedesign-human-editedFigma flow per CLAUDE.md §4 (the human's edits are treated as co-authored, not as a reviewer correction). - AI agents →
Generated-By:trailer. When a Claude Code sub-agent is the primary author, the commit should declare its role (Generated-By: be-dev,Generated-By: ba, etc.). Org-specific AI-authorship policy may require more (model version, prompt log reference); flagged as policy territory in the reference.
Traceability
- Every task-scoped commit references its master-plan task —
Refs: T-NNNin the footer, or via the scope-tail(T-NNN)in the subject. Commits made outside of master-plan work (kit edits, infra scripts, non-SDLC reports) reference the relevant artifact path or noteRefs: nonein the footer. - Non-SDLC report commits (researcher / debugger / code-reviewer / oq-resolver outputs) reference their report path:
Refs: docs/research-reports/<topic-slug>.md.
Hygiene
- No secrets in commit history. If a secret ever lands in a commit, the secret is compromised — rotate immediately, then scrub history (
git filter-repoorBFG). Prevention is far cheaper than remediation; the.gitignore+ privacy-check hook are the prevention layer. - No PII (names, emails of users / customers, internal IDs) in commit messages. Commit history is durable and broadcasts widely; PII in
git logis a leak. - No force-pushing to shared branches. Sub-agents do not push at all from
.worktrees/<role>-<task-id>/; those detached commits stay local and are discarded after validated file-content promotion.
Hard Rules
- Never commit with
user.emailoruser.nameempty. If either is missing, halt and ask the user to configure. - Never commit a message that fails the conventional-commits regex. Rewrite — never bypass with
--no-verify. - Never commit a
.env,*.pem,*.key, or any other secret-class file. Ifgit statusshows one, stop and add it to.gitignorebefore continuing. - Never include PII or customer identifiers in commit messages or commit bodies. Reference issues / tickets by ID, not by user.
- Never
git push,git pull,git merge,git rebase, orgit cherry-pickfrom a sub-agent worktree. Local worktree commits are not integration history. - Never use a personal email for organizational work commits.
- Every task-scoped worktree commit carries either
Refs: T-NNN(or scope-tail(T-NNN)) for master-plan work, orRefs: <artifact-path>for kit / docs work. No commits without traceability.
References
references/conventional-commits-format.md— full type catalog, scope conventions, regex variants, worked examplesreferences/gitignore-template.md— categorized.gitignorewith rationale per sectionreferences/compliance-policy.md— identity / attribution / signing / residency — defaults plus areas where your organization's policy applies- CLAUDE.md §5 — Worktree isolation (where the commit happens) — moved to
.claude/rules/worktree-isolation.md§5 - CLAUDE.md §8 — Master plan task IDs for traceability — moved to
.claude/rules/master-plan-discipline.md§8 - CLAUDE.md §4 — Design lifecycle (the
design-human-editedco-authorship trigger) — moved to.claude/rules/parallel-execution.md§4 .claude/hooks/privacy-check.cjs— runtime defense against committing secrets;.gitignoreis the static defense layer
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.

