tool-permission-policy

Author and audit Claude Code permission rules, modes, and MCP wildcard policies.

Updated Jun 28, 2026
One-click install
npx skills add https://github.com/JaviMontano/claude-plugins --skill tool-permission-policy-javimontano
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tool-permission-policy
Source: https://github.com/JaviMontano/claude-plugins/tree/main/plugins/claude-native-toolkit/skills/tool-permission-policy
Command: npx skills add https://github.com/JaviMontano/claude-plugins --skill tool-permission-policy-javimontano

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve? Writing Claude Code permission policies is error-prone: broad deny rules silently override narrow allows, invalid parameter-matching syntax gets ignored, and unsafe auto or bypassPermissions modes get recommended without guardrails. This Skill produces correct allow/ask/deny policies with explicit precedence analysis and safety validation. ## Core Features & Use Cases - Policy authoring and audit: Draft or review permissions.allow, permissions.ask, and permissions.deny arrays with correct Tool and Tool(specifier) syntax, including MCP wildcards and parameter matching. - Precedence and mode analysis: Build overlap tables showing deny-then-ask-then-allow effective results, and recommend the least-permissive permission mode (default, plan, acceptEdits, auto, dontAsk, bypassPermissions) with safety conditions. - Hooks boundary guidance: Clarify that hooks supplement but never override matching deny or ask rules. - Use Case: A team wants npm tests auto-approved, git push to always prompt, and all MCP tools denied except GitHub read tools. The Skill detects that a broad mcp__* deny blocks the GitHub allow exception and proposes a corrected policy with a precedence table and coverage gaps. ## Quick Start Ask the assistant to audit your Claude Code settings.json permissions and explain which rules actually take effect for each tool call.

Frequently Asked Questions about tool-permission-policy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write Claude Code permission rules for allow, ask, and deny?▼

Write rules as Tool or Tool(specifier), such as Bash(npm test) or Read(./.env), and place them in permissions.allow, permissions.ask, or permissions.deny in settings.json. Deny rules are evaluated first, then ask, then allow, and the first matching behavior wins regardless of specificity.

Why does my narrow allow rule not override a broad deny rule in Claude Code?▼

Claude Code evaluates deny before ask before allow, so a broad deny like Bash(aws *) always blocks a narrower allow like Bash(aws s3 ls). Broad denies cannot contain allowlist exceptions; you must narrow the deny rule itself or move the exception to a separate environment.

Can a PreToolUse hook override a permissions.deny rule?▼

No. Hooks are supplemental automation and cannot override matching deny or ask permission rules. A hook's allow output only lets the call continue to permission evaluation, where matching deny rules still block it and ask rules still prompt.

When is it safe to use bypassPermissions mode in Claude Code?▼

Use bypassPermissions only in isolated containers, VMs, or disposable worktrees without sensitive credentials or production access. Explicit ask rules and root/home deletion circuit breakers still prompt, and managed settings can disable bypass entirely where policy requires it.

How do MCP wildcard permission rules work in Claude Code?▼

Deny and ask rules may use mcp__* to target every MCP tool, but allow rules require a literal server prefix before the glob, such as mcp__github__get_*. Unanchored allow globs like mcp__* are skipped with a warning.

Does this permission syntax apply to Claude Platform API tools?▼

No. Claude Code permissions.* rules and Bash(...) syntax do not govern Claude Platform tools. Platform client-tool authorization belongs in the application handler, and server-tool request policy is configured separately through the Messages API.