Agent skill
git-smart-commit
Create one or more well-scoped commits with good messages. Use when asked to commit/save changes with good granularity, Conventional Commits, or "良い粒度でコミット".
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/git-smart-commit
Metadata
Additional technical details for this skill
- short description
- Create commits with good granularity and messages
SKILL.md
Goal
- Turn current changes into clean commit(s) with clear messages and minimal scope.
Inputs (ask only if missing)
- Commit intent/topic (one sentence).
- Whether to split into multiple commits (if unclear).
- Required checks (if the user is specific).
Non-goals / Guardrails
- Do not rewrite history (no amend/rebase/force-push) unless explicitly requested.
- Do not touch unrelated files.
- Do not discard local changes unless explicitly requested.
Steps
- Inspect state
git status --porcelaingit diff --stat- If no changes: report and stop.
- Ensure a feature branch
git branch --show-current- If on default branch, create:
git switch -c codex/<topic>-<YYYYMMDD>.
- Decide commit granularity (default: 1)
- Split only when there is a clear separation (refactor/feature/tests/docs).
- Explain the split briefly before staging.
- Stage and commit
- Stage only relevant paths (use
git add -pif partial staging is needed). - Compose Conventional Commit message:
type(scope): summary. - Commit with
git commit -m "<subject>" -m "<optional body>".
- Verify and report
git log -1 --onelinegit status --porcelain- If checks are required by the repo, run the smallest relevant set:
- Prefer
yarn lintfor quick validation. - If behavior changed, add
yarn build(andyarn build:firefoxif relevant).
- Prefer
Output format
- Commit(s) created: hash + subject.
- Files included per commit (short list).
- Checks run (or explicitly skipped).
- Remaining dirty files, if any.
Edge cases
- Untracked files: confirm whether to include.
- Mixed concerns in one file: use partial staging if requested.
Trigger examples
- "良い粒度でコミットして"
- "Conventional Commits でコミット作って"
- "この変更をコミットして"
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?