Claude Code Permissions Hook — Development skill for Claude Code
A PreToolUse hook for Claude Code for more granular permission controls.
How to install Claude Code Permissions Hook
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open kornysietsma/claude-code-permissions-hook and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Code Permissions Hook does
A PreToolUse hook for Claude Code for more granular permission controls.
Alternatives in Development
- Internet Court Skill — The trust layer for agent-to-agent commerce — natural-language mandates, ERC-7710 delegated permissions, x402 4.9k ★
- Ccundo — Integrates seamlessly with Claude Code to provide granular undo functionality by reading directly from Claude 1.4k ★
- WP Abilities API — WordPress capabilities and permissions API 902 ★
README
Command Permissions Hook for Claude Code
A PreToolUse hook for Claude Code that provides granular control over which tools Claude can use, with support for allow/deny rules, pattern matching, and security exclusions.
NOTE: This is a workaround for current (December 2025) limitations in Claude Code permissions - [setting Bash permissions](https://docs.claude.com/en/docs/claude-code/iam#tool-specific-permission-rules) doesn't work consistently. Built following Anthropic's [hook guidelines](https://docs.claude.com/en/docs/claude-code/iam#additional-permission-control-with-hooks).
This may be short-lived as Anthropic improves permissions. Use it if it helps, but you'll need basic Rust knowledge.
Features
- All configuration is via a single
.tomlfile - see example.toml for an example - Allow/deny rules with regex pattern matching for tool inputs
- Exclude patterns for handling edge cases (e.g., block
..in allowed paths) - Audit logging of tool use decisions to JSON file
Documentation
- Configuration Guide - How to write rules for each supported tool
- Tool Input Schemas - Reference for Claude Code tool input formats
Installation
Requires Rust. Install via [rustup](https://rustup.rs/) if you want to use this project. Rust is fun!
cargo build --release
Binary: `target/release/claude-code-permissions-hook`
Configuration
Create a TOML configuration file (see `example.toml`):
[audit]
audit_file = "/tmp/claude-tool-use.json"
# Audit level: off, matched (default), all
# - off: no auditing
# - matched: audit only tool use that hits a rule (allow/deny)
# - all: audit everything including passthrough
audit_level = "matched"
# Allow rules - checked after deny rules
[[allow]]
tool = "Read"
file_path_regex = "^/Users/korny/Dropbox/prj/.*"
file_path_exclude_regex = "\\.\\." # Block path traversal
[[allow]]
tool = "Bash"
command_regex = "^c
Related Skills
Pursue
Hand Kimi an objective to pursue AUTONOMOUSLY across multiple turns (experimental goal mode), bounded by a har
Overleaf Sync Now
Stops Claude Code and Codex CLI from silently overwriting your Overleaf web edits with a stale local Dropbox c
Freeze
Freeze files matching a pattern — blocks Edit/Write to matched files via a session-scoped PreToolUse hook. Use
Narthex
Prompt-injection defenses for Claude Code. A PreToolUse Bash hook blocks compositional credential-exfiltration
Agent Approval Gate
PreToolUse hook for Claude Code: blocks agent spending, account creation and fund moves, queues them for human
Verify Gate
Manage the verify-gate skill — install/uninstall the PreToolUse hook, add custom claim rules, or check status.
Related Agents
Ccreview Fixer
Fix agent for the ccreview workflow. Its Bash and edits are held to a per-run allowlist by the plugin's PreToo
Permissions Manager
Manage tool permission rules. Use when user says 'allow', 'deny', or 'ask' for a command, wants to modify perm
AI Controls Author
AI system spec, eval suite, tool permission matrix, HITL workflow (taxonomy 4.15). Used by ai-controls-team.