-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
Describe the feature
Sim is an AI workflow builder that uses both Claude Code and Cursor. Neither .claude/settings.json nor .cursor/hooks.json currently exist — meaning there's no enforcement against agents bypassing git hooks via the hook-skip flag.
When an agent runs git commit or git push with the hook-bypass flag, it silently disables pre-commit, commit-msg, and pre-push hooks. Linters, type-checkers, and tests can all be skipped without any warning.
Proposed solution
Add block-no-verify@1.1.2 (github.com/tupe12334/block-no-verify) to both agent configs:
Claude Code — create .claude/settings.json:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [{ "type": "command", "command": "npx block-no-verify@1.1.2" }]
}
]
}
}Cursor — create .cursor/hooks.json:
{
"hooks": {
"beforeShellExecution": [
{ "command": "npx block-no-verify@1.1.2", "event": "beforeShellExecution" }
]
}
}Zero custom logic — the package handles detection and blocking.
Disclosure: I am the author and maintainer of block-no-verify.