Type BashPermission | ReadPermission | EditPermission | WritePermission | WebFetchPermission | WebSearchPermission | GlobPermission | GrepPermission | TaskPermission | NotebookEditPermission | SkillPermission | McpToolPermission
Schema URL https://catalog.lintel.tools/schemas/claude-code/permission/latest.json

Validate with Lintel

npx @lintel/lintel check

A permission rule string that controls tool access in Claude Code. Rules follow the format Tool or Tool(specifier) and appear in:

Rules are evaluated in order: deny → ask → allow. The first matching rule wins, so deny rules always take precedence. See manage permissions.

Any of

1. Bash Permission string
2. Read Permission string
3. Edit Permission string
4. Write Permission string
7. Glob Permission string
8. Grep Permission string
9. Task Permission string
11. Skill Permission string
12. MCP Tool Permission string

Definitions

BashPermission string

Matches Bash tool commands. Supports wildcard patterns with * at any position in the specifier.

  • Bash — matches all Bash commands (equivalent to Bash(*))
  • Bash(npm run build) — matches the exact command npm run build
  • Bash(npm run *) — prefix match with word boundary (matches npm run test but not npm runtime)
  • Bash(npm*) — prefix match without word boundary (matches both npm run and npmrc)
  • Bash(* --version) — suffix match
  • Bash(git * main) — middle wildcard (matches git checkout main, git merge main)

The space before * matters: Bash(ls *) enforces a word boundary requiring a space, while Bash(ls*) does not. The legacy :* suffix syntax (e.g. Bash(npm:*)) is equivalent to * but is deprecated — use Bash(npm *) instead. Claude Code is shell-operator aware — a rule like Bash(safe-cmd *) won't match safe-cmd && dangerous-cmd. See Bash permission caveats.

Examples:
  • "Bash"
  • "Bash(npm run build)"
  • "Bash(npm run *)"
  • "Bash(git commit *)"
  • "Bash(* --version)"
  • "Bash(* --help *)"
  • "Bash(git * main)"
  • "Bash(ls*)"
ReadPermission string

Matches Read tool operations. Read rules also apply best-effort to other built-in tools that read files, including Grep and Glob.

Specifiers use gitignore pattern syntax with four path types:

PatternMeaningExample
ReadAll file reads
Read(./path) or Read(path)Relative to current directoryRead(*.env)
Read(/path)Relative to project rootRead(/src/**/*.ts)
Read(~/path)Relative to home directoryRead(~/.zshrc)
Read(//path)Absolute filesystem pathRead(//Users/alice/secrets/**)

* matches files in a single directory; ** matches recursively across directories. Note: /Users/alice/file is relative to the project root — use //Users/alice/file for absolute paths. See Read and Edit rules.

Examples:
  • "Read"
  • "Read(./.env)"
  • "Read(./.env.*)"
  • "Read(*.env)"
  • "Read(src/**)"
  • "Read(/src/**)"
  • "Read(~/Documents/*.pdf)"
  • "Read(~/.zshrc)"
  • "Read(//Users/alice/secrets/**)"
  • "Read(./secrets/**)"
EditPermission string

Matches Edit tool operations. Edit rules apply to all built-in tools that modify files, including Write. Uses the same gitignore pattern syntax as Read with four path types (./, /, ~/, //).

  • Edit — all file edits
  • Edit(/src/**/*.ts) — TypeScript files under project src/
  • Edit(/docs/**) — files in <project>/docs/ (NOT the filesystem /docs/ and NOT <project>/.claude/docs/)
  • Edit(~/.config/**) — files in home config directory
  • Edit(//tmp/scratch.txt) — absolute path

* matches files in a single directory; ** matches recursively across directories. See Read and Edit rules.

Examples:
  • "Edit"
  • "Edit(/src/**/*.ts)"
  • "Edit(/docs/**)"
  • "Edit(~/.config/**)"
  • "Edit(//tmp/scratch.txt)"
WritePermission string

Matches Write tool operations. Edit rules also apply to Write since Edit covers all built-in tools that modify files. Uses the same gitignore pattern syntax as Read and Edit with four path types (./, /, ~/, //).

* matches files in a single directory; ** matches recursively across directories. See Read and Edit rules.

Examples:
  • "Write"
  • "Write(/src/**)"
  • "Write(~/.config/**)"
WebFetchPermission string

Matches WebFetch tool requests. Supports domain-based filtering with the domain: specifier prefix.

  • WebFetch — all web fetch requests
  • WebFetch(domain:example.com) — only requests to example.com

Note: Using WebFetch alone does not prevent network access. If Bash is allowed, Claude can still use curl, wget, or other tools to reach any URL. For reliable URL filtering, consider combining Bash deny rules with WebFetch domain rules. See WebFetch rules.

Examples:
  • "WebFetch"
  • "WebFetch(domain:example.com)"
  • "WebFetch(domain:api.github.com)"
WebSearchPermission string

Matches WebSearch tool operations. No specifier support — applies to all web searches. See permission system.

Examples:
  • "WebSearch"
GlobPermission string

Matches Glob tool operations for file pattern matching. Glob is a read-only tool — Read permission rules also apply to Glob on a best-effort basis. See permission system.

Examples:
  • "Glob"
GrepPermission string

Matches Grep tool operations for content searching. Grep is a read-only tool — Read permission rules also apply to Grep on a best-effort basis. See permission system.

Examples:
  • "Grep"
TaskPermission string

Matches Task (subagent) operations. Controls which subagents Claude can spawn.

  • Task — all subagents
  • Task(Explore) — the Explore subagent (read-only codebase exploration)
  • Task(Plan) — the Plan subagent (implementation planning)
  • Task(general-purpose) — the general-purpose subagent
  • Task(my-custom-agent) — a custom subagent defined in .claude/agents/

Add to deny rules or use the --disallowedTools CLI flag to disable specific agents. See Task permission rules.

Examples:
  • "Task"
  • "Task(Explore)"
  • "Task(Plan)"
  • "Task(general-purpose)"
  • "Task(my-custom-agent)"
  • "Task(worker, researcher)"
NotebookEditPermission string

Matches NotebookEdit tool operations for editing Jupyter notebook (.ipynb) cells. See permission system.

Examples:
  • "NotebookEdit"
SkillPermission string

Matches Skill tool invocations. Controls which skills Claude can trigger via the Skill tool.

  • Skill — all skills
  • Skill(commit) — the specific commit skill
  • Skill(my-plugin:my-skill) — a namespaced plugin skill

Skills are invoked as /slash-commands by users or programmatically by other skills. See skills.

Examples:
  • "Skill"
  • "Skill(commit)"
  • "Skill(deploy)"
  • "Skill(my-plugin:my-skill)"
McpToolPermission string

Matches MCP (Model Context Protocol) tool operations. MCP tools follow the naming pattern mcp__<server>__<tool> where <server> is the server name configured in Claude Code.

  • mcp__puppeteerall tools from the puppeteer server
  • mcp__puppeteer__* — wildcard matching all tools from the puppeteer server
  • mcp__puppeteer__puppeteer_navigate — the specific puppeteer_navigate tool

Server names come from MCP server configuration in .mcp.json, settings files, or plugin manifests. See MCP permission rules.

Examples:
  • "mcp__puppeteer"
  • "mcp__puppeteer__*"
  • "mcp__puppeteer__puppeteer_navigate"
  • "mcp__github__create_issue"
  • "mcp__slack__send_message"