git_hooks
Generate pre-commit hooks to enforce code quality, check or preview existing hooks, and run security scans, TODO checks, lint, or tests before commits.
Instructions
Generate pre-commit git hooks for code quality. Supports actions: "status" to check existing hooks, "preview" to see what a hook would do, "generate" to create a hook script. Hooks can run security_scan, find_todos, or custom commands.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>"
},
"name": "git_hooks"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | "status" shows current hooks, "preview" shows what would run, "generate" creates the hook file | |
| checks | No | Checks to include: "security", "todos", "lint", "test" |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| action | Yes | ||
| hookPath | No | ||
| installed | No |