ClaudeHack
0.000

Run /fewer-permission-prompts to build an allowlist from your own transcripts

Terminal / Productivity / Cost Optimization·13 hours ago·verified 13 hours ago·easy·~5 min setup·verified

Instead of guessing which commands to allowlist or giving up and skipping permissions entirely, let Claude read your past sessions and propose the rules you have already been approving.

The problem

Approval fatigue pushes people straight to blanket auto-approve. Writing a permissions allowlist by hand is the safe alternative, but you never know which commands to list until you have already been interrupted by them.

The hack

Run `/fewer-permission-prompts`. It scans your transcripts for the read-only Bash and MCP tool calls you keep approving and writes a prioritized allowlist into project `.claude/settings.json`.

Why it works

The allowlist is derived from calls you already approved by hand, so it is scoped to your actual workflow instead of a generic list. You get most of the speed of skipping permissions without granting anything you have not already vetted.

Setup

1. Use Claude Code normally for a few sessions so there is history to learn from. 2. Run `/fewer-permission-prompts`. 3. Review the proposed rules — this writes to project settings, which are shared if you commit them. 4. Trim anything that is not genuinely read-only before accepting. 5. Pair it with deny rules for `.env` reads and `git push` so the allowlist can never widen into something destructive.

Code

# In .claude/settings.json, deny rules are checked before allow rules:
{
  "permissions": {
    "deny": ["Read(./.env)", "Read(./.env.*)", "Bash(git push:*)"]
  }
}

Additional details

Deny rules are evaluated before ask and allow rules, and no allow rule can override a deny. That ordering is what makes the generated allowlist safe to accept: put your hard limits in `deny` first, and anything `/fewer-permission-prompts` adds afterwards cannot reach past them. Two deny rules worth having regardless: block reading `.env` files so secrets never enter context, and block `git push` so publishing stays a decision you make even when committing is automatic.

Source

youtube·View original →·by Simon Scrapes

Does this still work?

0 said it works · 0 said it's broken

Related

Discussion

No comments yet. Be the first to say whether this worked for you.