← Browse by Chapter
Get the Book →
#75Chapter 14 — Permissions and the Sandbox
Read my current permission rules and tell me which of them I should keep. For each existing allow rule, give me: the rule, the file it comes from, one example command it allows that I probably intended, and one example command it allows that I probably did not. Then flag every rule that has one of these four shapes: a wildcard before the subcommand; a wildcard following an environment runner or an interpreter; a path pattern with a single leading slash that looks like it was meant as an absolute path; a path rule on a tool whose path rules are never consulted. Propose a replacement set: exact commands where I run one exact command, a wildcard after the subcommand where I need a family, an ask rule instead of an allow for anything that publishes, pushes, deploys or deletes. Do not edit any settings file.

Mastering Claude Code
These prompts are excerpts from the book. Get the full collection with explanations and use cases.