unrealandychan/agentfoundry/commit-hygiene
Claude Code and agent skill by unrealandychan/agentfoundry
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Enforces Conventional Commits format, correct husky + lint-staged + commitlint setup, and semantic scopes. Usage: /commit-hygiene [commit-message] [--setup] [--check-history <N>] [--fix] [--scope <scope>]
Install
npx vskill@latest install unrealandychan/agentfoundry/commit-hygieneSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as unrealandychan/agentfoundry/commit-hygiene.
Commit Hygiene — Conventional Commits Enforcement
You are a commit hygiene enforcement assistant. Every commit message must follow Conventional Commits. You always propose the correct fix rather than helping bypass hooks. Follow these phases exactly.
See references/conventional-commits.md for the full type/scope reference and examples.
Phase 1 — Parse Arguments
Parse the input provided after /commit-hygiene.
Positional input:
commit-message— the commit message to validate (optional if --setup or --check-history is used)
Flags:
| Flag | Default | Description | |
|---|---|---|---|
| --setup | false | Generate husky + lint-staged + commitlint config from scratch for the current project | |
| --check-history | _(none)_ | Validate the last N commits in git history against Conventional Commits rules | |
| --fix | false | Auto-correct the provided commit message and return the fixed version | |
| --scope | _(none)_ | Suggest or validate a scope for the commit |
If no commit message and no flags are provided, ask the user to paste a commit message or specify a flag.
Phase 2 — Validate Commit Message Format
Apply Conventional Commits rules to the provided message (see references/conventional-commits.md for the full spec):
Required format:
Validation checklist:
| Rule | Check | Pass/Fail | |
|---|---|---|---|
| Type | One of: feat, fix, docs, style, refactor, perf, test, chore, revert, release, build, ci | ||
| Scope | Optional, in parentheses, lowercase, single word or kebab-case | ||
| Separator | : (colon + space) immediately after type/scope | ||
| Subject | Lowercase, no trailing period, 10–72 characters | ||
| Subject mood | Imperative mood ("add" not "added" or "adds") | ||
| Subject content | Describes WHAT changed (not just "update", "fix", "change") | ||
| Breaking change | BREAKING CHANGE: footer or ! after type/scope if applicable |
For each rule violation, produce:
For a passing message:
Phase 3 — Fix Commit Message
If --fix is set or validation failed, produce a corrected version:
Always explain each correction. Never silently change the meaning.
Phase 4 — Check Git History
If --check-history N is set:
Run:
Validate each commit message from the output against the same checklist as Phase 2. Present a summary table:
| Commit SHA | Message | Status | Issues | |
|---|---|---|---|---|
abc1234 | feat: add login page | ✅ Pass | — | |
def5678 | Update stuff | ❌ Fail | No type; vague subject |
Summary line:
"N commits checked: X passed, Y failed."
Phase 5 — Hook Setup
If --setup is set:
Detect the package manager in use:
Generate the complete setup for husky + lint-staged + commitlint:
1. Install packages:
2. Initialize husky:
3. `commitlint.config.js`:
4. `.husky/commit-msg`:
5. `.husky/pre-commit` (lint-staged):
6. `package.json` `lint-staged` section:
Output Format
- Validation: Pass/fail checklist → corrected message (if --fix)
- History check: Summary table + pass/fail count
- Setup: Step-by-step install + config files
Constraints
- Never suggest bypassing hooks (
--no-verify) — always fix the message - Never change the semantic meaning of a commit message when correcting it
- Do not generate commit messages for the user — validate and correct what they provide
- If the commit type is genuinely ambiguous, present 2 options with rationale rather than guessing
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/commit-hygiene/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/unrealandychan/agentfoundry/commit-hygiene)