Git Commit Writer
Skill9 starsChanged 8 months agoMITView on GitHub
Generates conventional commit messages from staged changes or a diff.
In this repository61 other files it gives its agents.
- Accessibility Audit HelperSkill
- Agent Context File WriterSkill
- Agent Evaluation Framework BuilderSkill
- AI Feature Spec WriterSkill
- API Documentation GeneratorSkill
- REST API Endpoint DesignerSkill
- Architecture ExplainerSkill
- Article RepurposerSkill
- Auth Flow PlannerSkill
- Blog Outline GeneratorSkill
- Breaking Change DetectorSkill
- Bug Root Cause AnalyzerSkill
- Caching Strategy AdvisorSkill
- Changelog CuratorSkill
- Code Review ChecklistSkill
- Database Schema ReviewerSkill
- Docker Compose GeneratorSkill
- Documentation Gap FinderSkill
- Edge Case DiscoverySkill
- Error Log SummarizerSkill
- FAQ GeneratorSkill
- Flaky Test AnalyzerSkill
- Form UX OptimizerSkill
- Hallucination Risk ReviewerSkill
- Hybrid Search ArchitectSkill
- Incident Postmortem WriterSkill
- Issue to PR PlannerSkill
- Landing Page Copy ImproverSkill
- LangGraph State Machine DesignerSkill
- LLM Cost OptimizerSkill
- LLM Tracing and Observability SetupSkill
- MCP Integration AssistantSkill
- MCP Server BuilderSkill
- Migration Guide WriterSkill
- Newsletter Summary WriterSkill
- Observability ChecklistSkill
- Playwright Test BuilderSkill
- PR Description WriterSkill
- Prompt Injection Defense AuditorSkill
- Prompt RefinerSkill
- Prompt Version Control WorkflowSkill
- RAG Chunking Strategy AdvisorSkill
- RAG Workflow PlannerSkill
- React Component ReviewerSkill
- README WriterSkill
- Refactor PlannerSkill
- Release Notes GeneratorSkill
- Responsive Layout ReviewerSkill
- SDK Quickstart WriterSkill
- SEO Content OptimizerSkill
- SEO Metadata GeneratorSkill
- Social Post Thread WriterSkill
- Sprint Summary GeneratorSkill
- SQL Query OptimizerSkill
- Stack Trace AnalyzerSkill
- Technical Blog Post WriterSkill
- Tech Debt AuditorSkill
- Troubleshooting Guide BuilderSkill
- Unit Test ImproverSkill
- Unit Test WriterSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 12 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
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
- Distinctive: line 18
Use this when you want consistent, meaningful commit history without having to remember the format every time.
- Very specific: line 34
Add the contents of the "Prompt / Instructions" section below to your .cursorrules file, or paste it into the Cursor AI pane before asking …
- Distinctive: line 42
When asked to write a commit message, follow these steps:
- Distinctive: line 44
Read the diff: If not provided, ask for git diff --staged output.
- Distinctive: line 62
Use the imperative mood: "add", "fix", "remove" — not "added", "fixing", "removes"
- Distinctive: line 63
Do not capitalize the first word after the colon
- Distinctive: line 64
Do not end with a period
- Distinctive: line 66
Write the body: if the change needs explanation:
- Distinctive: line 67
Leave a blank line between subject and body
- Distinctive: line 70
Use bullet points for multiple distinct changes
- Distinctive: line 72
Add a footer: if applicable:
- Distinctive: line 87
If the diff contains multiple unrelated changes, flag this and suggest splitting into separate commits.
- Distinctive: line 125
If you paste a large diff with changes spanning many files and concerns, the agent may suggest splitting it.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
Git Commit Writer
What this skill does
This skill directs the agent to read a git diff (or a plain description of changes) and produce a well-formed commit message following the Conventional Commits specification. It chooses the right type (feat, fix, chore, docs, refactor, test, style, perf, ci), picks an appropriate scope, writes a concise subject line, and — when the change is large enough to warrant it — adds a descriptive body.
Use this when you want consistent, meaningful commit history without having to remember the format every time.
How to use
Claude Code / Cline
Copy this file to .agents/skills/git-commit-writer/SKILL.md in your project root.
Then ask the agent:
- "Write a commit message for my staged changes using the Git Commit Writer skill."
- "Here's a diff. Use the Git Commit Writer skill to produce a commit message."
For Claude Code, you can also run git diff --staged first and paste the output into the chat.
Cursor
Add the contents of the "Prompt / Instructions" section below to your .cursorrules file, or paste it into the Cursor AI pane before asking for a commit message.
Codex
Paste the diff into the Codex chat along with the instructions from the section below. Codex works best when you include the full diff rather than a summary.
The Prompt / Instructions for the Agent
When asked to write a commit message, follow these steps:
- Read the diff. If not provided, ask for
git diff --stagedoutput. Understand every file changed. - Determine the commit type using these rules:
feat— a new feature or behavior visible to users or callersfix— a bug fixrefactor— code restructuring with no behavior changeperf— performance improvementtest— adding or fixing testsdocs— documentation only (README, comments, etc.)style— formatting, whitespace, lint (no logic change)chore— build scripts, dependencies, toolingci— CI/CD pipeline changes
- Choose a scope (optional but recommended). The scope is the part of the codebase most affected, in lowercase:
auth,api,ui,db,parser, etc. Use the folder name or module name if unsure. - Write the subject line (first line of the commit):
- Format:
type(scope): short description - Max 72 characters
- Use the imperative mood: "add", "fix", "remove" — not "added", "fixing", "removes"
- Do not capitalize the first word after the colon
- Do not end with a period
- Format:
- Write the body if the change needs explanation:
- Leave a blank line between subject and body
- Explain why the change was made, not what (the diff shows what)
- Wrap lines at 72 characters
- Use bullet points for multiple distinct changes
- Add a footer if applicable:
- Breaking changes:
BREAKING CHANGE: description - Issue references:
Closes #123orFixes #456
- Breaking changes:
- Output format:
type(scope): short imperative description
Optional body explaining the why behind the change.
Can be multiple paragraphs. Wrap at 72 chars.
Optional footer: Closes #123If the diff contains multiple unrelated changes, flag this and suggest splitting into separate commits.
Example
Input to Agent:
"Here's my staged diff. Write a commit message using the Git Commit Writer skill.
diff --git a/server/auth.ts b/server/auth.ts index 3a1b2c..9f4e5d 100644 --- a/server/auth.ts +++ b/server/auth.ts @@ -42,6 +42,12 @@ export async function login(email: string, password: string) { const user = await db.users.findOne({ email }); if (!user) throw new AuthError('User not found'); + + if (user.lockedUntil && user.lockedUntil > new Date()) { + throw new AuthError('Account is temporarily locked. Try again later.'); + } + const valid = await bcrypt.compare(password, user.passwordHash); if (!valid) { + await incrementFailedAttempts(user.id); throw new AuthError('Invalid password'); } ```"
Output from Agent:
fix(auth): lock accounts after repeated failed login attempts
Adds a check for the `lockedUntil` field before attempting password
comparison. Also increments a failed-attempt counter on each bad
password so the locking mechanism has data to act on.Notes
- If you paste a large diff with changes spanning many files and concerns, the agent may suggest splitting it. That is intentional behavior — large atomic commits make history harder to read.
- The skill does not run
git commitautomatically. It only produces the message text for you to review and use. - For monorepos, use the package or workspace name as the scope (e.g.,
feat(api-gateway): ...).
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.

