| name | hooks-permission-request-hook |
| description | Generate a PermissionRequest hook with auto-approve/deny rules. Use when needing a safer alternative to --dangerouslySkipPermissions tailored to your project stack. |
| args | [--strict] [--category <name>...] |
| allowed-tools | Read, Write, Edit, Glob, Grep, Bash, TodoWrite |
| argument-hint | --strict to deny unknown commands, --category git|test|lint|build|gh|deny |
| disable-model-invocation | true |
| created | "2026-03-13T00:00:00.000Z" |
| modified | "2026-07-18T00:00:00.000Z" |
| compatibility | claude-code |
| reviewed | "2026-04-29T00:00:00.000Z" |
/hooks:permission-request-hook
Generate a PermissionRequest hook that auto-approves safe operations, auto-denies dangerous ones, and passes everything else through for user decision. A safer, project-aware alternative to --dangerouslySkipPermissions.
When to Use This Skill
| Use this skill when... | Use /hooks:hooks-configuration instead when... |
|---|
| You want auto-approve/deny rules for Claude Code permissions | Configuring other hook types (PreToolUse, Stop, SessionStart) |
Replacing --dangerouslySkipPermissions with targeted rules | Need general hooks knowledge or debugging |
| Setting up project-specific permission automation | Writing entirely custom hook logic from scratch |
| You need a test harness to validate approve/deny behavior | Understanding hook lifecycle events |
Auto Mode vs PermissionRequest Hook
Auto mode (Claude Code 2.1.83+) routes most approve/deny decisions through a classifier model. It overlaps with — but does not replace — a PermissionRequest hook. Choose this skill when you need any of:
- Deterministic, auditable rules — the classifier's probabilistic answer is unsuitable for compliance contexts
- Project-specific deny lists that go beyond the default trust set
- Hard 0% false-positive guarantees for specific commands (the hook is exact, the classifier is not)
- Pre-approve narrow patterns so they skip the classifier round-trip and avoid latency/token cost
Hooks coexist with auto mode — they fire alongside the classifier. See .claude/rules/auto-mode.md for the full auto-mode model and how it interacts with allow rules and subagents.
Context
Detect project stack:
- Lockfiles: !
find . -maxdepth 1 \( -name 'package-lock.json' -o -name 'yarn.lock' -o -name 'pnpm-lock.yaml' -o -name 'bun.lockb' -o -name 'poetry.lock' -o -name 'uv.lock' -o -name 'Cargo.lock' -o -name 'go.sum' -o -name 'Gemfile.lock' \)
- Project files: !
find . -maxdepth 1 \( -name 'package.json' -o -name 'pyproject.toml' -o -name 'requirements.txt' -o -name 'Cargo.toml' -o -name 'go.mod' -o -name 'Gemfile' \)
- Existing settings: !
find . -path '*/.claude/settings.json' -maxdepth 3 -type f