Agent skill
write-commit-message
Use when creating git commits. Defines conventional commit format and message structure guidelines.
Install this agent skill to your Project
npx add-skill https://github.com/craigtkhill/stdd-agents/tree/main/skills/write-commit-message
SKILL.md
Commit Message Guidelines
Guidelines for writing clear, consistent git commit messages.
Conventional Commits Format
Use the conventional commits style:
<type>[optional scope]: <description>
CRITICAL: Single-line only. Never add a body or footer. The code and spec speak for themselves.
Commit Types
- feat: New feature
- fix: Bug fix
- test: Adding or updating tests
- docs: Documentation changes
- refactor: Code refactoring (no functional changes)
- style: Code style changes (formatting, whitespace)
- chore: Maintenance tasks, dependencies
- perf: Performance improvements
- ci: CI/CD configuration changes
- build: Build system changes
Scope (Optional)
Add scope in parentheses to provide additional context:
Breaking Changes
Indicate breaking changes with ! after type/scope:
Description Guidelines
- Use imperative mood ("add feature" not "added feature")
- Start with lowercase
- No period at the end
- Keep under 72 characters
- Be specific and descriptive
No Body, No Footer
Never add a commit body or footer. Every commit must be a single line only.
Do NOT include AI attribution, co-authored-by lines, or any other footers.
Before Committing
CRITICAL — all of the following MUST be true before committing:
- All tests pass (GREEN)
- Pre-commit hooks pass — run
prek run --all-filesand fix every issue - Check for remote updates:
git fetch - Review your changes:
git statusandgit diff - Stage relevant files:
git add <files> - Write clear commit message
❌ NEVER commit with failing tests ❌ NEVER commit without running pre-commit hooks ❌ NEVER commit half-finished work
When to Commit
Commit once per completed requirement in the STDD cycle:
spec written → tests RED → tests GREEN → hooks pass → COMMIT
- One commit per requirement (or tightly related group of requirements)
- Each commit must represent a complete, working state
- Do not batch multiple requirements into one commit
Integration with STDD Workflow
When following the spec-test-driven development workflow:
- Pick a requirement from spec.yaml
- Write test → see RED
- Implement → see GREEN
- Run ALL tests → all pass
- Run
prek run --all-files→ all hooks pass - Commit with a single-line conventional commit message
- Repeat for next requirement
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
test-driven-development
Use when writing tests or implementing code. Defines RED-GREEN-REFACTOR cycle and test execution workflow.
acceptance-test
Use when writing acceptance tests or adding scenarios to spec.yaml. Defines Given/When/Then format and acceptance test patterns.
specifying-requirements
Use when writing or updating spec.yaml files. Defines requirement format and user story structure.
spec-test-driven-development
Use when user requests new features or functionality. Defines complete workflow from specification through testing to implementation.
create-skill
Use when creating or modifying skills. Defines skill file structure, naming conventions, and integration patterns.
pre-commit-hooks
Use when running pre-commit hooks manually (e.g. before committing or after implementing). This project uses prek, not pre-commit. Defines the correct commands for running hooks.
Didn't find tool you were looking for?