create-commits
Skill0 starsChanged 10 months agoMITView on GitHub
Creates git commits following the Conventional Commits specification. Performs git status to identify changes, reviews diffs to understand scope, collaborates with humans on staging files, and generates valid commit messages optimized for both agents and humans. Handles edge cases including reverts, amends, merge commits, and rebase commits. Use when committing changes, creating git commits, staging files, or when the user asks to commit code changes.
In this repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
Show its rules and text
We split this skill into the rules it gives an agent
34 rules. About 0 are common, 30 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈30
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Use this skill when:
- Distinctive: line 20
Follow this workflow for every commit:
- Distinctive: line 23
Run git status to see all changes (staged, unstaged, untracked)
- Distinctive: line 27
Read diffs for modified files using git diff (unstaged) or git diff --cached (staged)
- Distinctive: line 28
Read new files that were added
- Distinctive: line 34
Ask which files should be included in the commit
- Distinctive: line 41
Check for breaking changes (API changes, config changes, etc.)
- Distinctive: line 44
Write a clear, concise description following Conventional Commits format
- Distinctive: line 46
Add breaking change footer if applicable
- Very specific: line 49
Run git commit -m "<message>" or git commit for multi-line messages
- Distinctive: line 50
Verify the commit was created successfully
- Distinctive: line 54
Follow the Conventional Commits specification:
- Distinctive: line 88
Use imperative mood: "add feature" not "added feature" or "adds feature"
- Distinctive: line 90
No period at the end
- Very specific: line 110
In footer: Add BREAKING CHANGE: footer
- Very specific: line 167
Use Refs: footer to link related issues
- Distinctive: line 181
Keep the same type and scope if changes are minor (typos, formatting)
- Very specific: line 183
Add (amend) note in body if helpful for context
- Distinctive: line 195
Don't modify unless user explicitly requests it
- Distinctive: line 196
If creating manual merge commit, use format:
- Distinctive: line 209
Follow Conventional Commits format for each commit message
- Distinctive: line 214
If no changes to commit:
- Distinctive: line 216
Don't create empty commits unless explicitly requested
- Distinctive: line 217
If requested, use git commit --allow-empty with appropriate message
- Distinctive: line 221
If changes span multiple concerns:
- Distinctive: line 222
Preferred: Create separate commits for each concern
- Distinctive: line 223
Alternative: Use a single commit with multiple scopes if changes are tightly coupled
- Distinctive: line 224
Ask the user if unsure about splitting commits
- Distinctive: line 235
Always check status first: - Never assume what files changed
- Distinctive: line 237
Collaborate with humans: - Ask before staging, discarding, or committing
- Distinctive: line 238
One logical change per commit: - Keep commits focused and atomic
- Distinctive: line 246
Never commit without user approval: - Always confirm before executing git commit
- Distinctive: line 249
Handle conflicts gracefully: - If staging fails, explain why and suggest solutions
- Distinctive: line 250
Respect user preferences: - If user has commit message preferences, follow them
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Create Commits
When to Use
Use this skill when:
- The user asks to commit changes, create a commit, or stage files
- You need to commit code changes after making modifications
- The user wants to create a commit message following Conventional Commits
- You need to handle special commit scenarios (revert, amend, merge, rebase)
Core Workflow
Follow this workflow for every commit:
- Check repository status
- Run
git statusto see all changes (staged, unstaged, untracked) - Identify which files were modified, added, deleted, or renamed
- Run
- Review changes to understand scope
- Read diffs for modified files using
git diff(unstaged) orgit diff --cached(staged) - Read new files that were added
- Understand the purpose and impact of changes
- Identify the scope (e.g.,
auth,api,ui,docs)
- Read diffs for modified files using
- Collaborate on staging
- Present the list of changed files to the user
- Ask which files should be included in the commit
- Stage files using
git add <file>orgit add -pfor partial staging - Discard unwanted changes only with explicit user approval using
git restore <file>orgit checkout -- <file>
- Determine commit type and scope
- Analyze changes to identify the appropriate type (feat, fix, docs, etc.)
- Determine scope from the files changed (e.g.,
feat(auth),fix(api)) - Check for breaking changes (API changes, config changes, etc.)
- Create commit message
- Write a clear, concise description following Conventional Commits format
- Include body if additional context is needed
- Add breaking change footer if applicable
- Execute commit
- Run
git commit -m "<message>"orgit commitfor multi-line messages - Verify the commit was created successfully
- Run
Commit Message Format
Follow the Conventional Commits specification:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]Types
- feat: New feature (correlates with MINOR in SemVer)
- fix: Bug fix (correlates with PATCH in SemVer)
- docs: Documentation changes
- style: Code style changes (formatting, missing semicolons, etc.)
- refactor: Code refactoring without changing functionality
- perf: Performance improvements
- test: Adding or updating tests
- build: Build system or dependency changes
- ci: CI/CD configuration changes
- chore: Other changes that don't modify src or test files
- revert: Reverting a previous commit
Scope
Scope is optional and should be a noun describing the codebase section:
feat(auth): Authentication featurefix(api): API bug fixdocs(readme): README documentationrefactor(utils): Utility functions refactoring
Description
- Use imperative mood: "add feature" not "added feature" or "adds feature"
- Lowercase (except for proper nouns)
- No period at the end
- Be specific and concise
- Focus on what changed, not why (why goes in body if needed)
Body (Optional)
- Provide additional context about the change
- Explain the "why" behind the change
- Reference related issues:
Closes #123orFixes #456 - Separate from description by blank line
Breaking Changes
Indicate breaking changes in two ways:
- In type/scope: Append
!before colonfeat(api)!: change authentication endpoint - In footer: Add
BREAKING CHANGE:footerfeat(api): change authentication endpoint BREAKING CHANGE: The /auth endpoint now requires API key in header instead of query parameter
Examples
Simple feature commit
feat(auth): add JWT token refresh endpoint
Adds POST /auth/refresh endpoint that accepts refresh token and returns new access token.
Implements token rotation for enhanced security.Bug fix with scope
fix(api): prevent null pointer in user validation
When user object is null, the validation middleware now returns 400 instead of crashing.Documentation update
docs(readme): update installation instructions
Adds Node.js 18+ requirement and clarifies environment variable setup.Breaking change
feat(api)!: migrate to v2 authentication
BREAKING CHANGE: Authentication now uses Bearer tokens instead of API keys.
Update your clients to use Authorization header.Revert commit
revert: feat(api): add rate limiting
This reverts commit abc123def456.
Rate limiting caused issues with batch operations.
Refs: #789Edge Cases
Reverting Commits
When reverting:
- Use type
revert - Reference the commit SHA(s) being reverted in the body
- Explain why the revert is necessary
- Use
Refs:footer to link related issues
revert: feat(api): add caching layer
This reverts commit abc123def456.
Caching caused stale data issues in production.
Refs: #456Amending Commits
When amending (git commit --amend):
- Keep the same type and scope if changes are minor (typos, formatting)
- Change type/scope if the amendment significantly alters the commit's purpose
- Add
(amend)note in body if helpful for context
fix(api): correct typo in error message
(amend) Fixed typo: "eror" -> "error"Merge Commits
For merge commits created by git merge:
- Git automatically creates merge commit messages
- Don't modify unless user explicitly requests it
- If creating manual merge commit, use format:
merge: integrate feature-branch into main
Merges feature-branch that adds user authentication.
Resolves conflicts in auth middleware.Rebase Commits
During interactive rebase (git rebase -i):
- Each commit can be reworded individually
- Follow Conventional Commits format for each commit message
- Maintain logical grouping of changes
Empty Commits
If no changes to commit:
- Inform the user that there are no changes
- Don't create empty commits unless explicitly requested
- If requested, use
git commit --allow-emptywith appropriate message
Multiple Related Changes
If changes span multiple concerns:
- Preferred: Create separate commits for each concern
- Alternative: Use a single commit with multiple scopes if changes are tightly coupled
- Ask the user if unsure about splitting commits
Example of splitting:
feat(auth): add login endpoint
feat(auth): add logout endpoint
docs(auth): update API documentationBest Practices
- Always check status first - Never assume what files changed
- Read diffs before committing - Understand the full scope of changes
- Collaborate with humans - Ask before staging, discarding, or committing
- One logical change per commit - Keep commits focused and atomic
- Write clear descriptions - Future you (and other agents) will thank you
- Use scopes consistently - Establish and follow project conventions
- Reference issues - Link commits to issues/tickets when applicable
- Be specific - "fix bug" is less helpful than "fix null pointer in user validation"
Collaboration Guidelines
- Never commit without user approval - Always confirm before executing
git commit - Present options clearly - Show what will be committed and ask for confirmation
- Explain your reasoning - Share why you chose a particular type/scope
- Handle conflicts gracefully - If staging fails, explain why and suggest solutions
- Respect user preferences - If user has commit message preferences, follow them
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.

