Agent skill
commit
Smart commit — validate, stage, and commit with a conventional commit message
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/commit-g-zenr-relay-api
SKILL.md
Create a clean, validated commit for the current changes.
Step 1 — Pre-commit Validation
Run the test and type-check commands (see project config). If either fails: STOP. Fix the issues first — never commit broken code.
Step 2 — Review Changes
git status
git diff --staged
git diff
Understand what changed, which files are affected, and which layer (core/service/api/tests).
Step 3 — Stage Files
- Stage only relevant files — never
git add .blindly - NEVER stage
.env, credentials, or secrets - NEVER stage build artifacts (see stack concepts in project config for list)
- Verify
.gitignorecovers sensitive files
Step 4 — Generate Commit Message
Use conventional commit format:
<type>(<scope>): <short description>
<optional body explaining why, not what>
Types:
feat— New feature or endpointfix— Bug fixrefactor— Code restructuring without behavior changetest— Adding or updating testsdocs— Documentation changeschore— Config, dependencies, toolingsecurity— Security-related changes
Scopes: api, core, service, auth, config, middleware, tests, docker
Step 5 — Commit
git commit -m "<conventional message>"
Step 6 — Verify
git log --oneline -1
git status
Confirm the commit was created and working tree is clean.
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?