Verified against Claude Code · 2026-07-25
Configure a Claude Code permissions allowlist that matches how the team actually works
A prompt that audits a described workflow and produces a settings.json permissions block — allow, ask, and deny lists — scoped to exactly the tool patterns that workflow needs, instead of a blanket approval that trades away the point of having a permission system.
The prompt
Ready to copy — highlighted parts are example details you can swap.
Produce a Claude Code settings.json permissions block for this team's actual workflow, scoped as narrowly as the workflow allows rather than defaulting to broad approval out of convenience. HOW THIS TEAM ACTUALLY WORKS A small team using Claude Code for day-to-day feature work on a Next.js app; changes go through a human-reviewed pull request before merging to main, so read, edit, and test cycles are frequent but nothing reaches production without a human looking at the diff first. ACTIONS THAT SHOULD NEVER REQUIRE A PROMPT (safe, repetitive, no side effect outside version control already reviewed by a human before merge) Running the existing test and lint commands, reading and editing files inside the repo, running git status, git diff, and git log. ACTIONS THAT SHOULD ALWAYS ASK, EVEN IF THAT MEANS INTERRUPTING A LONG AGENTIC RUN Any git commit, git push, or npm install of a new dependency, even on a feature branch. ACTIONS THAT SHOULD NEVER BE ALLOWED FROM THIS TOOL AT ALL Any git push --force to main, any rm -rf, any command that reaches a production database connection string, any npm publish. PRODUCE 1. An allow list of exact tool patterns, not broad categories — a scoped pattern like Bash(npm run test:*) rather than a bare Bash entry that would silently also approve every other shell command the agent might ever construct. 2. An ask list for the always-confirm actions, using patterns specific enough that a close-but-different command is not accidentally caught by the same rule and skipped past confirmation. 3. A deny list for the never-allowed actions, and confirm each entry there could not be satisfied by some other tool or a slightly different phrasing of the same command that the deny pattern does not cover — a deny list with a gap is not a safety measure, it is the appearance of one. 4. For every pattern proposed, one line stating what a slightly broader version of that same pattern would additionally permit, so the actual scope of each rule is visible rather than assumed from its name alone. CONSTRAINTS - Do not propose a wildcard pattern anywhere it can be avoided. If a genuinely wide allowance is unavoidable for the workflow to function at all, say so explicitly and name the specific risk being accepted, rather than adding the wildcard silently. - Cross-check the three lists against each other: flag any pattern that could match under both allow and ask, or under both ask and deny, since an overlapping rule's actual behavior depends on evaluation order the person reading this file will not necessarily know to check. - If Local developer machines only, not CI — a human is always present to answer an ask prompt. indicates this configuration runs unattended, such as in CI, treat every ask entry as if it will silently block the run rather than pause it, since there is no human present to answer, and flag which entries that would affect. - Where a pattern could plausibly be satisfied by more than one tool, such as a file deletion reachable through both Bash and a dedicated file-editing tool, cover every route to the same outcome rather than closing only the one that happens to come to mind first. OUTPUT The complete permissions JSON block, followed by the scope-visibility notes and any overlap or wildcard warnings.
Customize
Optional — swap in your own details for the highlighted parts above.
Why this works
A permission pattern in Claude Code's settings.json is matched literally against the tool call the agent is actually attempting, which is why the difference between an allow entry of Bash and one of Bash(npm run test:*) is not a style preference — the first approves every shell command the agent will ever construct for as long as that setting stands, including ones nobody anticipated when the rule was written, while the second approves exactly one family of invocations and nothing else. This distinction matters more for an agentic coding tool than for almost any other kind of software permission, because the actions being gated are not a fixed menu a user clicks through — they are commands an agent constructs on the fly from its own reasoning about how to accomplish a task, so a broad allow rule is implicitly pre-approving commands that do not exist yet at the time the rule is written. The ask category has a behavior that only becomes visible in an unattended context: on a developer's own machine, ask pauses for a human to answer, but in CI or any run with nobody present to respond, an ask entry functions as a silent block rather than a pause, which is precisely why the workflow-context variable in this prompt forces that distinction to be checked explicitly rather than assumed — a permission set that works exactly as intended on a laptop can silently stall or fail an unattended pipeline run for a completely different reason than the one anyone expects. Cross-checking for overlap between the three lists exists because pattern matching does not raise an error when two rules could both match the same call — the actual behavior in that case depends on an evaluation order most people configuring this file have never had reason to look up, so an overlap is not a redundancy, it is an ambiguity that behaves consistently once, in testing, and then differently the one time it actually matters. Ultimately, the deeper reason any of this deserves this much precision is that a CLAUDE.md rule and a hook can both, in principle, be reasoned about or worked around inside a given turn, while a deny-listed permission pattern is not a suggestion the agent is weighing — it is the actual enforcement boundary of what the tool is capable of attempting at all, regardless of what the model currently believes is justified.
Verified against
Claude Code Sonnet 4.6 · 2026-07-25
Changelog
- 2026-07-25 — Initial publish, verified against Claude Code settings.json permissions (Sonnet 4.6).
Building this for real?
This is a free starting point. If you'd rather have custom software built and running for your business, that's Scult's day job.
EXPLORE CUSTOM SOFTWARE
