Commit Skill
Run pre-commit quality gates, then commit and push.
Steps
If in a Rust workspace, run in order — stop and report if any fail:
cargo fmt --allcargo clippy --all-targets -- -D warningscargo test --quiet(orcargo nextest runif nextest is available)
Run
git statusto identify changed files. Stage only relevant files (not secrets,.env, large binaries).Run
git diff --stagedto review what's being committed.Write a conventional commit message:
- Format:
<type>(<scope>): <description> - Types:
feat,fix,refactor,chore,docs,test - Keep the subject line under 72 characters
- Add a body if the change is non-obvious
- Format:
Commit with
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>trailer.Push to the current branch's remote tracking branch.
Report the commit hash and pushed ref.
Rules
- Never skip clippy or tests. If they fail, fix them before committing.
- Never use
--no-verify. - Never commit
.envfiles, secrets, or*.local.*files. - Do not ask the user to run anything — execute all steps yourself.