Quality gates + conventional commits. Run tests, lint, and typecheck before committing. Format the commit message as a conventional commit. Blocks on failure.
Install
npx skillscat add strikersam/autonomous-ai-agency/smart-commit Install via the SkillsCat registry.
SKILL.md
Skill: smart-commit
When to Use
Use this skill every time you are ready to commit code. It replaces ad-hocgit add && git commit with a structured quality gate sequence.
Instructions
Step 1 — Confirm changelog is updated
git diff docs/changelog.mdIf the diff is empty and this is a code change (not chore/test/docs), updatedocs/changelog.md under ## [Unreleased] before continuing.
Step 2 — Run tests
pytest -xBlock on failure. Do not commit with failing tests. Fix the failure first.
Step 3 — Check for obvious issues
# Syntax check staged Python files
git diff --staged --name-only | grep '\.py$' | xargs python -m py_compile
# Confirm no secrets in staged files
git diff --staged | grep -iE '(SECRET_KEY\s*=\s*["\x27][^"\x27]{8}|password\s*=\s*["\x27][^"\x27]{4}|api_key\s*=\s*["\x27]sk-)'If any secrets are detected: stop immediately, do not commit.
Step 4 — Stage your changes
git status # review what changed
git diff --staged # confirm what's staged
git add <specific files> # stage by name, not -AStep 5 — Write a conventional commit message
Format: <type>(<scope>): <short description>
| Type | When to Use |
|---|---|
feat |
New feature visible to users |
fix |
Bug fix |
refactor |
Code change with no behaviour change |
test |
Adding or updating tests |
docs |
Documentation only |
chore |
Tooling, config, dependencies |
ci |
CI/CD changes |
style |
Formatting, whitespace (no logic change) |
perf |
Performance improvement |
security |
Security fix or hardening |
Examples:
feat(router): add task classification for long-context requests
fix(auth): reject tokens with empty bearer string
refactor(agent): extract planner prompt into prompts.py
security(key_store): hash keys before comparisonStep 6 — Commit
git commit -m "$(cat <<'EOF'
feat(scope): description here
- Additional context if needed
- Reference issue if applicable
https://claude.ai/code/session_<id>
EOF
)"Step 7 — Verify
git log --oneline -3 # confirm commit appeared
git status # confirm working tree is cleanAcceptance Checks
-
docs/changelog.mdupdated (or commit is chore/test/docs/ci/style exempt) -
pytest -xpassed - No secrets in staged diff
- Specific files staged (not
git add -A) - Conventional commit message used
-
git logconfirms commit