commit-staged
Skill67 starsChanged 50 days agoMITView on GitHub
Generates and commits conventional-commits messages by analyzing staged git diffs — fast and fork-context safe. Use when the user asks to commit staged changes, needs a type-scope-description message generated from the current diff, or wants scope selection guidance and pre-commit hook handling.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- drasi-project/drasi-coretheir own version, first seen Oct 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- drasi-project/drasi-core★ 122same 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 repository41 other files it gives its agents.
- AGENTS.mdAGENTS.md
- rules/AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- research/CLAUDE.mdCLAUDE.md
- .cursor/rules/backlog-before-work.mdcCursor rule
- agent-browserSkill
- beadsSkill
- cccSkill
- copy-editingSkill
- daily-releasesSkill
- graph-engineeringSkill
- rebaseSkill
- receiving-pr-reviewsSkill
- topic-specialistSkill
- workshop-question-framingSkill
- agent-browserSkill
- boilSkill
- complete-milestoneSkill
- cove-prompt-designSkill
- create-merge-request-changelogSkill
- create-milestoneSkill
- design-anti-patternsSkill
- evaluate-sdlc-layersSkill
- example-argument-substitutionSkill
- external-pattern-integratorSkill
- fact-checkSkill
- ghSkill
- git-history-reconSkill
- group-items-to-milestoneSkill
- knowledge-explorerSkill
- linear-walkthroughSkill
- modern-gitSkill
- prepare-walkthrough-presentationSkill
- readme-badgerSkill
- refresh-researchSkill
- research-curatorSkill
- session-historianSkill
- seven-prompt-content-engineSkill
- skill-research-processSkill
- start-milestoneSkill
- universe-of-thoughtsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 16 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
Follow conventional commits format (no footer, except for breaking change footer):
- Distinctive: line 76
Use imperative mood ("add feature" not "added feature")
- Distinctive: line 77
Keep first line under 50 characters
- Distinctive: line 79
No period at end of summary
- Distinctive: line 84
Use vague messages like "update" or "fix stuff"
- Distinctive: line 86
Write paragraphs in summary line
- Distinctive: line 91
When committing multiple related changes:
- Distinctive: line 112
Single module/directory: Use that module name
- Distinctive: line 117
Multiple files in same area: Use the common parent
- Distinctive: line 121
Cross-cutting changes: Use the primary affected area OR omit scope
- Distinctive: line 126
Root config files: Use the config type
- Distinctive: line 188
Note breaking changes: If applicable
- Distinctive: line 192
Use git add -p for selective staging:
- Distinctive: line 221
Test before commit: - Ensure code works
- Distinctive: line 223
Keep it focused: - Don't mix unrelated changes
- Distinctive: line 243
If you are blocked by a pre-commit or prek hook, you should stop, and announce your intended commit message, and that it was blocked, and …
≈ “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
Analyze these staged changes and generate commit message, then commit the changes:
!uv run prek run >/dev/null 2>&1 || git add -u
!git --no-pager status || true
!git --no-pager diff --cached || true
!git --no-pager diff --cached --stat || true
<user_notes> $ARGUMENTS </user_notes>
Commit message format
Follow conventional commits format (no footer, except for breaking change footer):
<type>(<scope>): <description>
[optional body]Types
- feat: New feature
- fix: Bug fix
- docs: Documentation changes
- style: Code style changes (formatting, missing semicolons)
- refactor: Code refactoring
- test: Adding or updating tests
- chore: Maintenance tasks
Examples
Feature commit:
feat(auth): add JWT authentication
Implement JWT-based authentication system with:
- Login endpoint with token generation
- Token validation middleware
- Refresh token supportBug fix:
fix(api): handle null values in user profile
Prevent crashes when user profile fields are null.
Add null checks before accessing nested properties.Refactor:
refactor(database): simplify query builder
Extract common query patterns into reusable functions.
Reduce code duplication in database layer.Commit message guidelines
DO:
- Use imperative mood ("add feature" not "added feature")
- Keep first line under 50 characters
- Capitalize first letter
- No period at end of summary
- Explain WHY not just WHAT in body
DON'T:
- Use vague messages like "update" or "fix stuff"
- Include technical implementation details in summary
- Write paragraphs in summary line
- Use past tense
Multi-file commits
When committing multiple related changes:
refactor(core): restructure authentication module
- Move auth logic from controllers to service layer
- Extract validation into separate validators
- Update tests to use new structure
- Add integration tests for auth flow
Breaking change: Auth service now requires config objectScope Rules
Scope MUST identify WHERE in the codebase, NOT what type of change.
The scope is a module, component, or directory name - never a description of the change itself.
Determining Scope
Single module/directory: Use that module name
- Changes to
src/auth/*.py→auth - Changes to
plugins/gitlab-skill/→gitlab-skill
- Changes to
Multiple files in same area: Use the common parent
- Changes to
skills/python3-dev/assets/*.py→assetsorpython3-dev
- Changes to
Cross-cutting changes: Use the primary affected area OR omit scope
- Config + code changes → use primary area:
feat(auth): add OAuth support - Truly scattered changes → omit:
chore: update dependencies across modules
- Config + code changes → use primary area:
- Root config files: Use the config type
pyproject.tomllinting rules →lintorruffpyproject.tomldependencies →deps.github/workflows/→ci
Scope Anti-Patterns
NEVER use these as scopes - they describe WHAT, not WHERE:
| ❌ Wrong | ✅ Correct | Why |
docs | readme, api-docs, skills | "docs" is a change type, not a location |
tests | auth-tests, api | Be specific about what's being tested |
types | models, api | Types belong to a module |
refactor | (use as type, not scope) | "refactor" is a type, not a location |
bugfix | (use fix as type) | "bugfix" is a type, not a location |
Scope Examples
By domain:
feat(auth): add JWT authenticationfix(payments): handle currency conversionrefactor(users): extract validation logic
By layer:
feat(api): add user profile endpointfix(db): resolve connection pool leakchore(ci): update Node version to 20
By plugin/skill:
feat(gitlab-skill): add MR approval supportfix(python3-dev): correct shebang detectiondocs(commit-staged): clarify scope selection
Breaking changes
Indicate breaking changes clearly:
feat(api)!: restructure API response format
BREAKING CHANGE: All API responses now follow JSON:API spec
Previous format:
{ "data": {...}, "status": "ok" }
New format:
{ "data": {...}, "meta": {...} }
Migration guide: Update client code to handle new response structureTemplate workflow
- Review changes:
git diff --staged - Identify type: Is it feat, fix, refactor, etc.?
- Determine scope: What part of the codebase?
- Write summary: Brief, imperative description
- Add body: Explain why and what impact
- Note breaking changes: If applicable
Interactive commit helper
Use git add -p for selective staging:
# Stage changes interactively
git add -p
# Review what's staged
git diff --staged
# Commit with message
git commit -m "type(scope): description"Amending commits
Fix the last commit message:
# Amend commit message only
git commit --amend
# Amend and add more changes
git add forgotten-file.js
git commit --amend --no-editBest practices
- Atomic commits - One logical change per commit
- Test before commit - Ensure code works
- Reference issues - Include issue numbers if applicable
- Keep it focused - Don't mix unrelated changes
- Write for humans - Future you will read this
Commit message checklist
- Type is appropriate (feat/fix/docs/etc.)
- Scope identifies WHERE (module/directory), NOT what type of change
- Scope is NOT a banned word:
docs,tests,types,refactor,bugfix - Summary is under 50 characters
- Summary uses imperative mood
- Body explains WHY not just WHAT
- Breaking changes are clearly marked
- Related issue numbers are included
Finally, you will commit the changes with the generated commit message, without using --no-verify:
git commit -m "<commit-message>"If you are blocked by a pre-commit or prek hook, you should stop, and announce your intended commit message, and that it was blocked, and requires a linting-agent to be run against the issues found.
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.

