# Claude Code silently skipped 3 of my 7 deny rules. Check yours

> Source: <https://dev.to/paste_ready_engineer/claude-code-silently-skipped-3-of-my-7-deny-rules-check-yours-2bld>
> Published: 2026-12-06 08:07:19+00:00

**Recommendation:** Audit hand-written Claude Code deny rules per project with the `claude -p` skipped-rule check, and use uppercase tool names and the `domain:` prefix for WebFetch.
More in the playbook "Securing agents and AI tools": <https://wpnews.pro/playbooks/agent-security>

*I've been adding "never do this" rules to Claude Code for months. I had never checked whether any of them actually worked. Three of the seven I tested didn't, and nothing told me.*

Every time I hand more work to an agent, I add another deny rule. "Don't push with --force." "Don't read .env." I wrote them, so I assumed they worked.

Then a line in the notes for a recent Claude Code update (2.1.332) stopped me. Roughly: if you try to add a rule through `/permissions` that would be skipped at the next startup, Claude Code now refuses and tells you why. Skipped? Most of my rules didn't come from `/permissions`. I wrote them by hand in settings.json, or asked Claude to write them, and they're already sitting in my projects.

So I wrote seven deny rules on purpose, mixing common styles with common mistakes. Three were skipped without stopping anything: the session started, the exit code was 0, and every other rule still applied. One command per project shows you every skipped rule.

In a throwaway folder I made a `.claude/settings.json` with seven deny rules:

```
{
  "permissions": {
    "deny": [
      "rm -rf",
      "Bash(rm -rf:*)",
      "Bash(curl:*)",
      "bash(curl:*)",
      "WebFetch(evil.example.com)",
      "WebFetch(domain:evil.example.com)",
      "Read(./.env)"
    ]
  }
}
```

Then I started Claude Code in that folder. It started fine and answered fine. Exit code 0. Nothing looked off.

But stderr said this (paths shortened):

```
These settings entries were skipped; the rest of each source is in effect:
  .claude/settings.json (permissions.deny): Invalid permission rule "rm -rf" was skipped: Tool names must start with uppercase. Use "Rm -rf"
  .claude/settings.json (permissions.deny): Invalid permission rule "bash(curl:*)" was skipped: Tool names must start with uppercase. Use "Bash"
  .claude/settings.json (permissions.deny): Invalid permission rule "WebFetch(evil.example.com)" was skipped: WebFetch permissions must use "domain:" prefix. Use "domain:hostname" format
```

Three of seven, gone:

`rm -rf`` Use "Rm -rf"`, which is just as wrong. What you actually want is `Bash(rm -rf:*)`.` bash(curl:*)``Bash`.` WebFetch(evil.example.com)``domain:` prefix, so `WebFetch(domain:evil.example.com)`.
So the version of me who wrote `bash(curl:*)` thought curl was blocked, and it wasn't blocked at all.

What scares me is how quiet it is. The other rules keep working, so everything behaves normally. There's no moment where you'd notice. In a real setup the stderr line scrolls by once at startup, if you even see it.

If you've ever written settings by hand, this is worth a minute. I've been surprised by this kind of quiet config problem before. This one was about an API key that ended up in plain text:

Run this in the project folder:

```
claude -p "ok" --allowedTools Read < /dev/null 2>&1 | grep "was skipped"
```

The `< /dev/null` matters. Without it, `claude -p` waits about three seconds for stdin before it runs. `--allowedTools Read` keeps the test run read-only, so you're not handing a fresh session any power just to check its settings.

It reports on the settings Claude Code loads for that folder, so run it once in each project you care about.

I ran it on three of my side projects, which had 71, 9 and 34 rules. Zero skipped. I was relieved. But I want to be honest about what changed: before, my confidence was "probably fine". After, it was "checked".

I also tried the lazy route: asking Claude Code to read the broken test file and find the mistakes, without changing anything.

It found the same three rules, explained each one, and gave the correct form. It said the other four were written correctly. It even added a fair warning I hadn't thought about: `Bash(curl:*)` only blocks commands that *start* with curl, so a command that calls curl some other way can slip past. Same result as the command, plus one useful extra.

The prompt is at the end. The command is still what I'd trust first, because it shows what Claude Code actually loaded. The prompt is nice when you want explanations, or want to tidy up while you're there.

If you'd rather eyeball your settings, these are the patterns that got skipped for me:

`git push --force`. Wrap it: `bash(...)`, `read(...)`, `webfetch(...)`. Use `Read`, `WebFetch`.` WebFetch(example.com)` becomes `WebFetch(domain:example.com)`.
Rules written by an AI deserve the same check. Mine came out right, but I can see how a model would happily write `bash(curl:*)`. It looks perfectly reasonable.

What I'd keep from all this:

**Over to you:** what's the one deny rule you'd never run an agent without? Tell me in the comments. I'm curious what other people consider non-negotiable.

If you'd rather have Claude check it for you, paste this in your project. It only reads:

```
Read .claude/settings.json in this project and check every rule under "permissions".
Find any rule Claude Code will silently skip because of how it is written. Do not change any files.
One line per problem: rule | why it is skipped | correct form.
```

Related: deny rules cover what the agent does. Skills are a second door, because they can run commands before Claude even reads them. I wrote about gating those here:

If you want that gate set up for you, it's a $9 skill: [skill-gate on Gumroad](https://pastereadyengineer.gumroad.com/l/skill-gate).

🎁 New here? Start with my free skill: [mcp-key-check](https://pastereadyengineer.gumroad.com/l/mcp-key-check) finds the API keys your MCP setup left in plain text and prints the commands to fix them. Pay what you want, $0 is fine.

If this was useful, a ❤️ and a follow would mean a lot. I write about what actually happens when I put AI to work on my side projects.

*The experiments and numbers in this post come from my own projects. I wrote it with the help of AI (Claude).*
