commit-style
Skill0 starsChanged 31 days agoMITView on GitHub
Write clean, reviewable git commits. Use when the user asks to commit, stage changes, split work into commits, write or fix a commit message, or prepare a branch for a pull request. Follows the repository's own conventions first, then Conventional Commits.
- Reads credentials
10 other projects use a version of this.
Adopted by
Most recently taken up by
- jskswamy/skillstheir own version, first seen Nov 8, 2026
- ghvinashvili/specagenttheir own version, first seen Nov 1, 2026
- GabrielHenriqueCA/cortex-aitheir own version, first seen Oct 11, 2026
- redis/go-redistheir own version, first seen Oct 8, 2026
- sherifattia/skillstheir own version, first seen Sep 12, 2026
- caikiji/skills-labtheir own version, first seen Sep 7, 2026
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- redis/go-redis★ 22ksame name
- ghvinashvili/specagent★ 7same name
- caikiji/skills-lab★ 4same name
- jskswamy/skills★ 3same name
- karashiiro/agent-skills★ 2same name
- GabrielHenriqueCA/cortex-ai★ 1same name
- mimoccc/my-claude-skills★ 1same name
- sherifattia/skills★ 1same name
- sudokoi/skills★ 0same name
- TheophilusChinomona/idev★ 0same name
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 repository68 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- accessibilitySkill
- api-designSkill
- api-versioningSkill
- authSkill
- background-jobsSkill
- cachingSkill
- capacity-planningSkill
- changelogSkill
- chaos-engineeringSkill
- ci-cdSkill
- circuit-breakerSkill
- claude-best-practicesSkill
- code-commentsSkill
- code-hygieneSkill
- code-reviewSkill
- code-structureSkill
- concurrency-and-lockingSkill
- database-transactionsSkill
- data-consistencySkill
- debug-infra-startupSkill
- debug-sessionSkill
- demo-video-creatorSkill
- demo-video-script-creatorSkill
- dependency-injectionSkill
- dependency-updateSkill
- disk-cleanupSkill
- distributed-tracingSkill
- dockerSkill
- env-configSkill
- env-setupSkill
- error-handlingSkill
- event-driven-architectureSkill
- feature-flagsSkill
- file-storageSkill
- graceful-shutdownSkill
- idempotencySkill
- input-validationSkill
- jars-engineering-blogsmithSkill
- jars-workshop-builderSkill
- licensingSkill
- loggingSkill
- memory-and-allocationsSkill
- migrate-dbSkill
- monitoringSkill
- multi-tenancySkill
- notificationsSkill
- openapiSkill
- paginationSkill
- perf-profileSkill
- pr-descriptionSkill
- query-optimizationSkill
- rate-limitingSkill
- refactorSkill
- releaseSkill
- runbook-writerSkill
- searchSkill
- secrets-auditSkill
- simplifySkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 8 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
1
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 21
Never commit secrets: Stop and tell the user if a staged file looks like one.
- Very specific: line 39
If user.name / user.email are unset or look wrong for this repository, ask before committing.
- Distinctive: line 40
Never change git config on your own.
- Distinctive: line 50
Before staging anything, check for:
- Distinctive: line 81
When interactive staging is not available, write the intended version of a mixed file with only one change applied, commit it, then restore …
- Distinctive: line 86
Use the repository's format.
- Distinctive: line 125
Do not narrate the diff line by line.
- Distinctive: line 155
Run the project's fast checks (lint, format, unit tests) when they exist, so a commit never breaks the build on its own.
- Distinctive: line 183
Never do this to commits that are already pushed or shared, unless the user explicitly asks and understands that a force-push follows.
“Common” is measured: kept by at least 6 in 10 of the 8 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
Commit style
Turn a working tree into a short series of small, honest commits that a reviewer can read top to bottom. Every commit does one thing, builds on its own, and says why it exists.
Ground rules
- The repository's rules win. A
CONTRIBUTING.md,CLAUDE.md,AGENTS.md, commitlint config, or PR template overrides anything in this skill. Read them before the first commit. - The user's rules win over the repository's defaults for things the repository leaves open (identity, attribution lines, sign-off, whether to push).
- Never push, force-push, amend a pushed commit, or rewrite history unless the user asks for that exact action in this session.
- Never skip hooks (
--no-verify) or signing. If a hook fails, fix the cause and commit again as a new attempt. - Never commit secrets. Stop and tell the user if a staged file looks like one.
Workflow
1. Learn the house style
git log --oneline -20 # the format people actually use
git log -5 --format='%an <%ae>%n%B---' # bodies, trailers, sign-offs
git config user.name; git config user.emailAlso check for CONTRIBUTING.md, commitlint.config.*, .commitlintrc*, .czrc,
.pre-commit-config.yaml, and .github/pull_request_template.md.
Note: the type list, whether scopes are used, the subject's capitalisation, issue-reference
style (Fixes #12, COG-123, (SDK-898)), and any required trailers (Signed-off-by for DCO).
If user.name / user.email are unset or look wrong for this repository, ask before committing.
Never change git config on your own.
2. Read the whole change
git status --short
git diff # unstaged
git diff --staged # already stagedBefore staging anything, check for:
| Look for | Action |
.env, keys, tokens, *.pem, credentials in code | Do not stage. Tell the user. |
Build output, caches, node_modules/, __pycache__/, dist/ | Do not stage. Suggest a .gitignore entry. |
| Large binaries or datasets | Ask first. |
| Debug prints, commented-out code, stray TODOs you added | Remove, or ask. |
| Unrelated edits mixed into one file | Stage by hunk (step 3). |
3. Plan the commits
Group the changes by intent, not by file. One commit equals one reason to change:
- a bug fix and the test that proves it: one commit
- a refactor and a feature built on it: two commits, the refactor first
- formatting-only changes: their own commit, so the real diff stays readable
- dependency bumps: their own commit, with lockfiles included
Order the commits so each one leaves the project working: the foundation first, then the features, then the docs.
Tell the user the plan in one line per commit before you start, when there are more than two.
Stage precisely. Never use git add -A / git add . blindly on a mixed tree:
git add path/to/file another/file
git add -p path/to/file # interactive; not available to agents without a TTYWhen interactive staging is not available, write the intended version of a mixed file with only one change applied, commit it, then restore the rest. Or ask the user to split it.
4. Write the message
Use the repository's format. When it has none, use Conventional Commits:
<type>(<optional scope>): <Summary>
<Body: what changed and why. Wrap at 72 characters.>
<Footers: issue references, BREAKING CHANGE, trailers>Subject line
- Imperative mood, as an instruction: "Add retry to upload", not "Added" or "Adds".
- 50 characters or fewer (hard limit 72), with no trailing period.
- Capitalise the summary unless the log shows lowercase is the convention.
- Say what the commit does, not how: "Fix timezone drift in reports", not "Change line 40".
Types
| Type | Use for |
feat | New behaviour a user can notice |
fix | Wrong behaviour made right |
docs | Documentation only |
refactor | Code change with no behaviour change |
perf | Faster or leaner, same behaviour |
test | Adding or fixing tests only |
build | Build system, packaging, dependencies |
ci | CI configuration and scripts |
style | Formatting, whitespace, lint fixes |
chore | Maintenance that fits nowhere else |
revert | Reverting an earlier commit |
Body (skip it for a truly trivial change)
- Explain the why: the problem, the motivation, the trade-off you chose.
- Mention what a reviewer cannot see in the diff: a root cause, a measurement, a rejected alternative.
- Do not narrate the diff line by line. The code already shows how.
Footers
- Issue links in the repository's style:
Fixes #123,Refs COG-42. BREAKING CHANGE: <what breaks and how to migrate>(also add!after the type:feat!:).- Trailers only when the repository or the user requires them, e.g.
Signed-off-by:(usegit commit -s), orCo-authored-by:for real co-authors.
Pass multi-line messages safely, with a heredoc or a file, never with escaped \n:
git commit -F - <<'EOF'
fix(api): Return 400 for read-only query violations
Write queries sent to the read-only endpoint surfaced as a 500 with the
database's raw message. Map the error to a 400 that tells the user to
enable writes, so the UI can show a helpful hint.
Fixes #31
EOF5. Verify each commit
git show --stat HEAD # the right files, nothing extra
git log --oneline -5 # the series reads wellRun the project's fast checks (lint, format, unit tests) when they exist, so a commit never breaks the build on its own. If a pre-commit hook rewrote files, stage those changes and commit again. Do not bypass the hook.
6. Report
Finish with the list of commits made (hash subject), anything you deliberately left
unstaged and why, and whether anything was pushed (by default, nothing).
Examples
| Bad | Good |
update stuff | fix(auth): Refresh expired tokens before retrying |
Fixed the bug. | fix: Prevent double submit on slow networks |
feat: added new dashboard page and also fixed lint and bumped deps | Three commits: build: Bump vite to 8.3.2, style: Apply lint fixes, feat(ui): Add usage dashboard page |
WIP | Squash the work-in-progress commits before review, if the user agrees |
Splitting an existing messy commit (only when asked)
For an unpushed last commit:
git reset --soft HEAD~1 # keep the changes, staged
git reset # unstage everything
# then stage and commit in logical groups, as in steps 3 and 4Never do this to commits that are already pushed or shared, unless the user explicitly asks and understands that a force-push follows.
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.

