Skip to main content
Tips

practitioner tip

Automate Skill Permissions with allowed-tools

AIErudit angle: Granting an agent exactly the tools it needs — and nothing more — is the balance between friction and safety in production AI workflows. This tip shows how the allowed-tools frontmatter field pre-approves specific tools and Bash/MCP patterns so a multi-tool skill runs without dozens of prompts while unlisted actions still require approval. It is a governance skill for shipping trustworthy automations.

allowed-toolspermissionsclaude-codetips
Tip visual

Published: Feb 21, 2026 Updated: 2026-05-25

Original: https://wmedia.es/en/tips/claude-code-allowed-tools-skill-permissions

When a skill orchestrates multiple tools — SSH connections, web searches, external APIs, Git — Claude Code asks for approval on each one. For content creation skills, that means dozens of confirmation prompts per run. The allowed-tools field in the frontmatter grants automatic approval only for the tools you specify: selective freedom, not blanket access.

It's the implicit 6th rule of skill design — the other five (description, progressive disclosure, <500 lines, explain the why, evals) live in The 5 rules Anthropic publishes for creating skills. allowed-tools earns its own tip because the syntax has nuances worth mastering before using it in production.

The most practical approach is to discover it backwards: run the skill manually a few times, approve each tool by hand, note the pattern. After 2-3 runs you'll know exactly what it needs. That's when you formalize it in the frontmatter.

Result:

Setup

1. Run the skill without allowed-tools

Each time Claude asks for permission, note two things: the tool name and the exact command. After a few runs you'll have the complete list.

2. Add allowed-tools to the frontmatter

---
name: publish-article
description: Generate and publish a blog article
allowed-tools: Read, Write, Edit, Glob, Grep, WebSearch, WebFetch, Bash(ssh *), Bash(mv *), Bash(git *), mcp__notion__notion-create-pages, mcp__notion__notion-fetch
---

The syntax follows three patterns:

  • Native tools: direct name — Read, Write, WebSearch
  • Bash commands: Bash(pattern *) — the * accepts any argument after the pattern
  • MCP tools: full tool name — mcp__server__tool-name

3. Verify

Invoke the skill. Listed tools run without confirmation. Anything not in the list still requires approval — that's the control you keep.

Reference

PatternAllows
ReadRead any file
Bash(ssh *)Any SSH command
Bash(git *)Any Git operation
Bash(npm run *)Only npm scripts
WebSearchWeb searches
mcp__notion__notion-fetchOnly Notion fetch tool

For advanced patterns and real-world examples, see the Claude Code skills guide.

Official docs: Extend Claude with skills