Precommit — Git skill for Claude Code
Review code, run tests, write a git commit message with context.
How to install Precommit
Installs to ~/.claude/commands/scalus3-scalus-precommit.md
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/scalus3/scalus/HEAD/.claude/commands/precommit.md -o ~/.claude/commands/scalus3-scalus-precommit.md Restart Claude Code, or start a new session, for it to be picked up.
What Precommit does
allowed-tools: Bash(git status:*), Bash(git diff:*), Bash(git branch:*), Bash(git log:*), Bash(sbtn quick:*), Bash(sbtn scalafmtAll:*) description: Review code, run tests, write a git commit message with context
Context
- Current git status: !
git status - Current git diff: !
git diff HEAD - Current branch: !
git branch --show-current - Recent commits: !
git log --oneline -10
Your task
- Review code (use code reviewer agent)
- Run
optimizecommand - Run tests and code for
Alternatives in Git
- Merge Command — Finalize worktree work: update docs, commit, merge to main, clean up 1.3k ★
- Commit Msg — 生成 Git Commit Message 1k ★
- Fix GitHub Issue — by jeremymailen - Analyzes and fixes GitHub issues using a structured approach with GitHub CLI for issue detai 708 ★
Full documentation available on GitHub
View Source RepositoryRelated Skills
GitCommit
You are a commit message generator. Read the provided git diff and write a concise imperative commit message.
Msg
Suggest a commit message for the current staged changes. Do not commit. Do not stage. Do not run any git write
PR Ready
Verify the branch is ready to open a PR — typecheck, tests, lint, diff summary, commit message suggestion
Address Review Preexisting Unrelated Precommit Failure
Use when a local pre-merge/pre-push gate goes red on work your PR did not introduce. Covers two verified varia
Bob Fix Precommit
Run pre-commit on a git repo and resolve everything it fires, where safe to auto-fix. Never auto-allowlists se
Tenet
The review gate for code that agents write: rules in plain language, judged on every commit
Related Agents
Commit Analyzer
Analyzes git changes and generates commit messages. Returns only the message to preserve main thread context.
Tp Commit Writer
PROACTIVELY use this when the user is about to commit a NON-TRIVIAL change (new feature, fix, refactor) and as
Commit Craft
Expert at creating clean, logical git commits following conventional commit format. Use when user requests git