Agent skill
commit
Create a git commit with proper message format and co-authorship
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/commit-reubenfrimpong-past-care-spring
SKILL.md
Git Commit Skill
Create a well-formatted git commit for staged changes.
Process
-
Analyze Changes
- Run
git statusto see all untracked and modified files (never use -uall flag) - Run
git diff --cachedto see staged changes - Run
git diffto see unstaged changes - Run
git log --oneline -5to see recent commit message style
- Run
-
Draft Commit Message
- Summarize the nature of changes (new feature, enhancement, bug fix, refactoring, test, docs)
- Use correct verb: "add" for new features, "update" for enhancements, "fix" for bugs
- Keep message concise (1-2 sentences) focusing on "why" not "what"
- Follow repository's existing commit message style
-
Safety Checks
- DO NOT commit files containing secrets (.env, credentials.json, etc.)
- Warn user if they request to commit sensitive files
- Stage specific files by name, avoid
git add -Aorgit add .
-
Create Commit Use HEREDOC format for proper formatting:
bashgit commit -m "$(cat <<'EOF' Your commit message here. Co-Authored-By: Claude Opus 4.5 <[email protected]> EOF )" -
Verify Success
- Run
git statusafter commit to confirm
- Run
Rules
- NEVER update git config
- NEVER use destructive commands (push --force, reset --hard, checkout ., clean -f)
- NEVER skip hooks (--no-verify, --no-gpg-sign)
- NEVER amend commits unless explicitly requested
- NEVER use -i flag (interactive mode not supported)
- NEVER push unless explicitly requested
- If pre-commit hook fails, fix issues and create NEW commit (don't amend)
User Request
$ARGUMENTS
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?