claude-code - 💡(How to fix) Fix [BUG] deny: ["Skill"] permission setting does not block slash command skill invocation

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error Messages/Logs

(No error message — the skill silently executes despite the deny rule)

Code Example

(No error message — the skill silently executes despite the deny rule)

---

{
     "permissions": {
       "deny": ["Skill"]
     }
   }
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

When Skill is added to the deny list in .claude/settings.local.json, slash commands that map to skills (e.g., /code_review_v4) still expand and execute the skill content, bypassing the permission setting.

The Skill tool call is correctly blocked when the assistant explicitly invokes it (the user is prompted and can deny). However, slash commands auto-expand skill content via <command-name> tag injection before any permission check occurs, so the skill runs regardless of the deny setting.

What Should Happen?

When Skill is in the deny list, slash commands that map to skills should be blocked (or the user should be prompted for approval), consistent with how tool-level permission checks work for other tools.

Error Messages/Logs

(No error message — the skill silently executes despite the deny rule)

Steps to Reproduce

  1. Add "Skill" to the deny list in .claude/settings.local.json:
    {
      "permissions": {
        "deny": ["Skill"]
      }
    }
  2. Type a slash command that maps to a skill (e.g., /code_review_v4)
  3. The skill content is expanded and begins executing automatically — no permission prompt appears

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.89

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

zsh

Additional Information

The deny rule does take effect for explicit Skill tool calls made by the assistant during a session — those correctly trigger a user prompt. Only the initial slash command auto-expansion bypasses the check.

extent analysis

TL;DR

Modify the permission check to occur before slash command auto-expansion to ensure skills in the deny list are blocked.

Guidance

  • Review the code responsible for slash command auto-expansion and skill execution to identify where the permission check can be integrated.
  • Consider adding a pre-execution hook for slash commands that checks the deny list before expanding and executing the skill content.
  • Investigate if the existing permission check for explicit Skill tool calls can be reused or adapted for slash command auto-expansion.
  • Verify that the modified permission check correctly blocks skills in the deny list and prompts the user for approval when necessary.

Example

No code snippet is provided as the issue does not contain sufficient information about the codebase.

Notes

The solution may require modifications to the Claude Code's permission system and slash command handling. The exact implementation details will depend on the codebase and its architecture.

Recommendation

Apply a workaround by modifying the permission check to occur before slash command auto-expansion, as this is the most direct way to address the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] deny: ["Skill"] permission setting does not block slash command skill invocation