Claude Code Permissions Hook
Description
A PreToolUse hook for Claude Code for more granular permission controls
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
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
Awesome Go
A curated list of awesome Go frameworks, libraries and software
Development next.js
| The React Framework | 138360 | 1503 | 1 |
Development sharing-skills
skill for guidance.
Development root-cause-tracing
Use when errors occur deep in execution and you need to trace back to find the original trigger.
Development Template Skill
Minimal skeleton for a new skill project structure.
Development Third-party Notices
THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED IN PORTIONS OF THI
Development