name: fix-permissions description: Suggest the minimal permission rule for the most recent denied tool call. Use when Claude was prompted for permission and you want to allow it permanently.
Fix Permissions
Instructions
When the user invokes this skill, they want to permanently allow a tool call that just prompted for permission. Your job is to suggest the most minimal, conservative permission rule.
Identify the most recent tool call that required user approval (the one that triggered the permission prompt).
Determine what type of tool it was:
Bash(...)— a shell commandRead(...)— reading a file outside the projectWebFetch(domain:...)— fetching from a URLWebSearch— web searchSkill(...)— invoking a skill
Suggest the most conservative rule that covers the denied action:
- For Bash: use the command prefix +
*wildcard. Prefer the shortest prefix that covers only the intended command family. Example:Bash(mkdir *)notBash(*). - For Read: use the most specific directory glob. Example:
Read(//private/tmp/**)notRead(///**). - For WebFetch: use the exact domain. Example:
WebFetch(domain:docs.python.org)notWebFetch(domain:*). - IMPORTANT: Use spaces not colons as separators in Bash rules.
Bash(mkdir *)NOTBash(mkdir:*).
- For Bash: use the command prefix +
Determine the right settings file:
~/.claude/settings.json— for general-purpose tools you'd want in any project (common CLI commands, commonly visited domains).claude/settings.local.json— for project-specific permissions (project scripts, project-specific domains)
Read the target settings file, check for duplicates or rules that already cover the new one, then add the rule if needed.
Present the suggested rule to the user and explain why it's minimal/conservative. Ask for confirmation before writing.
Examples
Bash command denied:
The command
mkdir -p /some/pathwas just prompted. Suggested rule:Bash(mkdir *)in~/.claude/settings.jsonThis covers allmkdirinvocations. Already haveBash(mkdir:*)but the colon syntax doesn't match — need space syntax.
Read outside project:
Reading
/tmp/test_output.logwas prompted. Suggested rule:Read(//private/tmp/**)in~/.claude/settings.jsonThis covers reading any file under /tmp.
WebFetch denied:
Fetching from
https://docs.python.org/3/library/re.htmlwas prompted. Suggested rule:WebFetch(domain:docs.python.org)in~/.claude/settings.jsonThis allows fetching from Python docs only, not all domains.