Invoking this skill IS the request. If the user message looks empty, that is normal and expected, the task is fully specified here. Never ask what to do.
Overview
Analyzes a skill's full content, SKILL.md and any sibling files in the same directory, to find tools it references or requires, then compares against the skill's allowed-tools frontmatter to find missing entries and entries that grant nothing.
allowed-tools is permission mechanics only: an entry earns its place by removing a permission prompt the skill would otherwise hit. It is not a manifest of the tools the skill uses.
Usage
/update-allowed-tools <skill name>
/update-allowed-tools @path/to/SKILL.md
Instructions
Parse argument: The argument is either a file path to a SKILL.md file, or a skill name/description. If no file path is provided, search for the skill using Glob in the current working directory (e.g., **/skills/**/<name>/SKILL.md). If there is no argument at all, run git status and target the most recently modified skill file in the working tree.
Read the skill file and separate the YAML frontmatter from the body content. Also read any other files in the same directory (sibling files referenced by or bundled with the skill).
Extract declared allowed-tools: Parse all entries under allowed-tools: in the frontmatter.
Scan all skill content (SKILL.md body + sibling files) for tool usage. Look for:
- Explicit tool names that prompt by default: e.g.,
Write, Edit, Bash, WebFetch, WebSearch, and mcp__* tools.
- Bash command patterns: e.g.,
git diff, git commit, make, npm, docker, python, curl, etc.
- For Bash commands found, the required allowed-tool format is
Bash(<command>:*) (e.g., git stash push needs Bash(git stash:*))
- For file tools with path patterns (Read, Write, Edit), note the paths referenced (e.g.,
/tmp/ needs Read(//tmp/**))
Compare: For each tool detected in the body, check if it's covered by an entry in allowed-tools. Rules:
Glob, Grep, and Read are permission-free within the project directory. Only add read rules for files outside the project (e.g., Read(//tmp/**)).
Write and Edit prompt for approval by default, inside the project too. allowed-tools grants permission rather than restricting tools, so add entries scoped to the paths the skill is meant to modify (e.g., Edit(CLAUDE.md), Edit(~/.config/**)). Never a bare Edit, a bare Write, or Edit(**), even when the skill edits paths only known at runtime: add nothing there and let the prompt fire. The author's own permission mode already covers their sessions, so a blanket grant only loosens the setups of everyone else who installs the skill. Use Edit(path) for file creation too: Claude Code checks file permissions against Edit(path) and Read(path) rules only, and never consults a Write(path) rule.
Bash commands always need explicit Bash(<command>:*) entries.
- A Bash pattern covers subcommands (e.g.,
Bash(git stash:*) covers git stash push).
- Exact match counts as covered (e.g.,
WebSearch matches WebSearch).
Skill(...), AskUserQuestion, and Agent entries grant nothing: skill invocation, asking the user, and spawning subagents never prompt by default, and where a user has gated them with ask/deny rules, a grant cannot override those rules. Never add these; remove any already present.
Update the skill file: Add missing entries to the allowed-tools list in the skill's YAML frontmatter and remove entries that grant nothing, using the Edit tool. If the list ends up empty, delete the allowed-tools field. Then report what was added and removed.
Validate: Re-read the updated file to confirm YAML frontmatter remains syntactically valid (proper indentation, no duplicate entries, correct list format).
1---2name: update-allowed-tools3description: Use when creating or editing a skill that uses Bash commands, file writes, or external tools and the allowed-tools frontmatter may be incomplete or carry entries that grant nothing4---56Invoking this skill IS the request. If the user message looks empty, that is normal and expected, the task is fully specified here. Never ask what to do.78# Overview910Analyzes a skill's full content, SKILL.md and any sibling files in the same directory, to find tools it references or requires, then compares against the skill's `allowed-tools` frontmatter to find missing entries and entries that grant nothing.1112`allowed-tools` is permission mechanics only: an entry earns its place by removing a permission prompt the skill would otherwise hit. It is not a manifest of the tools the skill uses.1314## Usage1516```17/update-allowed-tools <skill name>18/update-allowed-tools @path/to/SKILL.md19```2021## Instructions22231. **Parse argument**: The argument is either a file path to a SKILL.md file, or a skill name/description. If no file path is provided, search for the skill using Glob in the current working directory (e.g., `**/skills/**/<name>/SKILL.md`). If there is no argument at all, run `git status` and target the most recently modified skill file in the working tree.24252. **Read the skill file** and separate the YAML frontmatter from the body content. Also read any other files in the same directory (sibling files referenced by or bundled with the skill).26273. **Extract declared allowed-tools**: Parse all entries under `allowed-tools:` in the frontmatter.28294. **Scan all skill content** (SKILL.md body + sibling files) for tool usage. Look for:30 - Explicit tool names that prompt by default: e.g., `Write`, `Edit`, `Bash`, `WebFetch`, `WebSearch`, and `mcp__*` tools.31 - Bash command patterns: e.g., `git diff`, `git commit`, `make`, `npm`, `docker`, `python`, `curl`, etc.32 - For Bash commands found, the required allowed-tool format is `Bash(<command>:*)` (e.g., `git stash push` needs `Bash(git stash:*)`)33 - For file tools with path patterns (Read, Write, Edit), note the paths referenced (e.g., `/tmp/` needs `Read(//tmp/**)`)34355. **Compare**: For each tool detected in the body, check if it's covered by an entry in `allowed-tools`. Rules:36 - `Glob`, `Grep`, and `Read` are permission-free within the project directory. Only add read rules for files **outside** the project (e.g., `Read(//tmp/**)`).37 - `Write` and `Edit` prompt for approval by default, inside the project too. `allowed-tools` grants permission rather than restricting tools, so add entries scoped to the paths the skill is meant to modify (e.g., `Edit(CLAUDE.md)`, `Edit(~/.config/**)`). Never a bare `Edit`, a bare `Write`, or `Edit(**)`, even when the skill edits paths only known at runtime: add nothing there and let the prompt fire. The author's own permission mode already covers their sessions, so a blanket grant only loosens the setups of everyone else who installs the skill. Use `Edit(path)` for file creation too: Claude Code checks file permissions against `Edit(path)` and `Read(path)` rules only, and never consults a `Write(path)` rule.38 - `Bash` commands always need explicit `Bash(<command>:*)` entries.39 - A Bash pattern covers subcommands (e.g., `Bash(git stash:*)` covers `git stash push`).40 - Exact match counts as covered (e.g., `WebSearch` matches `WebSearch`).41 - `Skill(...)`, `AskUserQuestion`, and `Agent` entries grant nothing: skill invocation, asking the user, and spawning subagents never prompt by default, and where a user has gated them with ask/deny rules, a grant cannot override those rules. Never add these; remove any already present.42436. **Update the skill file**: Add missing entries to the `allowed-tools` list in the skill's YAML frontmatter and remove entries that grant nothing, using the Edit tool. If the list ends up empty, delete the `allowed-tools` field. Then report what was added and removed.44457. **Validate**: Re-read the updated file to confirm YAML frontmatter remains syntactically valid (proper indentation, no duplicate entries, correct list format).