Agent skill
commit
Create well-organized git commits for all staged and unstaged changes. NEVER push.
Install this agent skill to your Project
npx add-skill https://github.com/mitch-mitchel/claude-starter/tree/main/skills/commit
SKILL.md
Git Commit
Create well-organized git commits for all staged and unstaged changes. NEVER push.
Process
-
Run lint/format first using this priority:
a. Local CLAUDE.md - Check for
pre-commit-command:in repo's CLAUDE.mdmarkdownpre-commit-command: make lintb. Task runners - Check for and use if available:
make lintormake format(check Makefile for targets)npm run lintornpm run format(check package.json scripts)yarn lint/pnpm lint
c. Pre-commit - If
.pre-commit-config.yamlexists:bashpre-commit run --all-filesd. Direct tools (fallback) - Run if config exists:
Config file Command pyproject.tomlwith ruffruff check --fix . && ruff format ..eslintrc*oreslint.config.*npx eslint --fix ..prettierrc*orprettier.config.*npx prettier --write ..djlintrcor pyproject with djlintdjlint --reformat .biome.jsonnpx biome check --apply . -
Stage any auto-fixed files before proceeding
-
Understand all changes
- Run
git status(never use-uallflag) - Run
git diffto understand modifications
- Run
-
Group related changes into logical commits (by feature, fix, or concern)
-
For each group:
- Stage the relevant files with
git add <files> - Commit with conventional commit format:
type(scope?): description - Valid types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
- Stage the relevant files with
-
Show summary of commits created
Rules
- Keep commits atomic - one logical change per commit
- Write clear, concise commit messages (imperative mood)
- Include scope when it adds clarity (e.g.,
feat(chat):,fix(docker):) - NEVER run
git push- only stage and commit locally - If unsure how to group changes, ask the user
- If lint/format fails after auto-fix, re-stage and retry
Known issues
macOS sandbox noise: You may see errors like zsh:1: operation not permitted: /tmp/claude-501/cwd-*. These are harmless - commands still execute correctly. This is a known Claude Code bug (see GitHub issues #22109, #21654). Ignore these warnings.
Example output
Created 3 commits:
a1b2c3d feat(auth): add login endpoint
d4e5f6g fix(api): handle null response
g7h8i9j docs: update README with setup instructions
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
review-pr
Review pull requests using GitHub CLI. Invoke with /review-pr <pr-number-or-url>
handoff
Compact the current conversation into a handoff document for another agent to pick up.
setup-pre-commit
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
git-guardrails-claude-code
Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.
obsidian-vault
Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian.
edit-article
Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.
Didn't find tool you were looking for?