Agent skill
commit
Analyzes staged changes and generates a high-quality, conventional commit message, then executes the commit.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/commit-dobraga-dotfiles
SKILL.md
Smart Commit Skill
When I say "commit this" or "generate a commit message," follow this workflow:
1. Intelligence Gathering
- Run
git diff --cachedto see exactly what is being committed. - Identify Change Type: Determine if it is a
feat,fix,docs,style,refactor,test, orchore. - Analyze Scope: Identify the specific module or component affected (e.g.,
api,models,ui).
2. Generate the Message
Follow the Conventional Commits specification:
<type>(<scope>): <short summary in imperative mood>
[optional body: explain the WHY, not just the WHAT]
[optional footer: relate to Issue IDs, e.g., Closes #123]
don't add Co-Authored-By on message
3. Execution
- Present the generated message to the user.
- Run
git commit -m "[message]"(or-m "[subject]" -m "[body]"for multi-line).
4. The Gotcha
Warning: Remind the user if they are committing too many unrelated changes at once (non-atomic commits). If the diff is too large, suggest splitting it into two separate commits.
Why this works for you
- Context Aware: Because it runs
git diff --cached, it knows exactly what you've staged, unlike generic AI tools that look at your whole folder. - Structured: It forces the "Conventional Commit" format, which makes your
git loglook professional and machine-readable.
Example Interaction
User: "Claude, commit these Pydantic changes."
Claude:
Proposed Message:
feat(models): implement Pydantic v2 validation for User schema
Updated UserRecord to inherit from BaseModel and added EmailStr validation for the email field. This prevents malformed data from reaching the service layer.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?