Agent skill
commit
Stage and commit changes using conventional commits — analyzes diffs, groups changes, and creates well-structured commit messages
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/commit-generaljerel-chalk-skills
SKILL.md
Stage files and create commits following conventional commit standards. Analyzes the diff to determine the appropriate commit type, scope, and message. Supports granular commits (splitting unrelated changes into separate commits).
Workflow
-
Check state — Run
git statusandgit diff --statto see all changes (staged + unstaged + untracked). -
Analyze changes — Read the diff to understand:
- What files changed and in what areas
- Whether changes are related or should be split into multiple commits
- The nature of each change (new feature, bug fix, refactor, docs, test, chore)
-
Determine commit strategy:
- If all changes are related → single commit
- If changes span unrelated areas → suggest splitting into granular commits
- Ask the user if unsure about grouping
-
Stage files —
git addthe relevant files for each commit. Stage specific files by name, notgit add -Aorgit add .. -
Draft commit message — Follow conventional commit format:
<type>(<scope>): <description> [optional body with more detail]Types:
feat— new featurefix— bug fixrefactor— code restructure without behavior changedocs— documentation changestest— adding or updating testschore— build, config, dependency changesstyle— formatting, whitespace (no logic change)perf— performance improvement
Scope: the area of the codebase affected (e.g.,
auth,api,ui,canvas). -
Commit — Run
git commit -m "<message>"using a HEREDOC for multi-line messages. -
Report — Show the commit hash and summary. If there are remaining uncommitted changes, note them.
Rules
- If the user provides a message via
-margument, use it as-is (still stage files appropriately) - Never use
git add -Aorgit add .— always stage specific files - Never commit files that look like secrets (
.env, credentials, API keys, tokens) - If pre-commit hooks fail, fix the issue and create a NEW commit (never
--amendunless explicitly asked) - Never use
--no-verifyto skip hooks - Keep commit messages concise: subject line under 72 characters
- The body (if needed) should explain WHY, not WHAT (the diff shows what)
- Check recent
git logto match the repo's existing commit style - For granular commits, commit in logical order (e.g., refactor before feature)
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?