beta

Conventional Commits Hook

Hooks

Hook that enforces conventional commit message format on every commit.

1603/23/2026
shell1 file
hook.sh596 B
# Conventional Commits Hook

## Configuration (settings.json)
```json
{
  "hooks": {
    "postToolUse": [
      {
        "matcher": "Bash",
        "command": "if echo \"$TOOL_INPUT\" | grep -q 'git commit'; then echo \"Reminder: Use conventional commits (feat:, fix:, chore:, docs:, refactor:, test:)\"; fi"
      }
    ]
  }
}
```

## Commit Format
```
<type>(<scope>): <subject>

<body>

<footer>
```

## Types
- feat: new feature
- fix: bug fix
- chore: maintenance
- docs: documentation
- refactor: code restructuring
- test: adding tests
- ci: CI/CD changes
- perf: performance improvement