[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77KT0NC3YJ6XESKM8P3AW60":3,"skill-same:01M77KT0NC3YJ6XESKM8P3AW60":147},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":35,"ownerDescription":36,"updatedAt":37,"install":38,"resources":50},"01M77KT0NC3YJ6XESKM8P3AW60","audit-permission-state",null,"When the bundled fewer-permission-prompts skill resolves in this session, prefer it to reduce prompts via an allowlist; this skill to see the state in effect. Report-only: merges every settings scope into the allow\u002Fask\u002Fdeny set in effect with source and precedence per rule, and flags allow rules auto mode drops. Use when: 'what permissions are actually in effect', 'which of my rules survive auto mode', 'is my managed policy being read'. A rule ignored for its shape: `audit-permission-grants`.","melodic-software\u002Fclaude-code-plugins","melodic-software","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F58273638?v=4","01M77JVQTXNGKCE4MDFY2BC936","Melodic Software","01M77JVQVN9QDWKAH6W03ANP76",30,"MIT","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\ndescription: \"When the bundled fewer-permission-prompts skill resolves in this session, prefer it to reduce prompts via an allowlist; this skill to see the state in effect. Report-only: merges every settings scope into the allow\u002Fask\u002Fdeny set in effect with source and precedence per rule, and flags allow rules auto mode drops. Use when: 'what permissions are actually in effect', 'which of my rules survive auto mode', 'is my managed policy being read'. A rule ignored for its shape: `audit-permission-grants`.\"\nargument-hint: \"[--unattended] [--scopes] [--entry-diff] [--lint] [--managed] [--block] [--oracle] [--critique]\"\nuser-invocable: true\ndisable-model-invocation: false\nmetadata:\n  workflow-stage: anytime\n  summary: Report the permission rules actually in effect and what auto mode drops\n---\n\n**Arguments.** `[--unattended] [--scopes] [--entry-diff] [--lint] [--managed] [--block] [--oracle] [--critique]`. Full form: (none) every read-only stage | [--scopes] [--entry-diff] [--lint] [--managed] [--block] narrow | [--oracle] [--critique] priced\n\n## Purpose\n\nFor \"where is this rule written\", use `\u002Fpermissions`. This skill answers a different question: it\ncomputes the merged allow\u002Fask\u002Fdeny outcome itself, locally and off a live session, as line records a\nscript can read, and it reports a scope it could not read apart from one that was empty.\n\n- **Pointer**: when deciding whether a built-in surface already exports the merged set, fetch\n  [CLI commands](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fcli-reference#cli-commands) and the `\u002Fpermissions`\n  row of [commands: all commands](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fcommands#all-commands) live.\n- **Recheck trigger**: a release note mentions a permissions export or a `\u002Fpermissions` export\n  action, or either section adds one.\n\nIt answers a question the siblings do not. `audit-permission-grants` asks whether the grants you\n**wrote** are durable and portable; `audit` asks whether your config files are **correct**. This\nskill asks what is **in effect**: which scopes exist on this machine, which of them this reader\ncould actually open, and what each one holds.\n\n## Scope boundary (route out)\n\n- Grant portability and auto-mode durability (P1\u002FP2\u002FP3) → `harness-config:audit-permission-grants`.\n- Settings-file correctness **outside the permission plane** (schema and unknown keys, baseline\n  deny\u002Fask presence, deny-rule placement, MCP, hooks, plugin drift) → `harness-config:audit`. The\n  permission plane's own dead config, the `disableAutoMode` type trap, and rules that cannot match\n  stay here, in Phase 4: they are read across all five scopes at once, which is this skill's asset\n  and not something a project-scope reader can do.\n- The instruction layer (CLAUDE.md, a natively read AGENTS.md, rules, auto-memory) → the\n  `harness-memory` plugin.\n\n## Boundary, native Claude Code surfaces\n\nTwo native surfaces act on the same permission rules this skill reports, so \"fix my permissions\"\ncan mean any of the three.\n\n- **`fewer-permission-prompts` (bundled skill)**: writes an allowlist into project settings to cut\n  prompts. Either the model or the person may run it.\n- **`\u002Fpermissions` (built-in command).** The person's interactive editor for rules by scope and\n  for auto mode's classifier rules. This skill never runs it.\n- **This skill (marketplace plugin).** Computes the effective merged set across every scope, off a\n  live session, with source, precedence, auto mode drops, and dead config. It writes nothing.\n\n**Routing.** When the bundled `fewer-permission-prompts` skill resolves in this session, prefer it\nfor reducing prompts by writing an allowlist; prefer this skill to see what is in effect. When the\nreport ends with a rule the person wants added, removed, or moved, offer it to the person:\nIf \u002Fpermissions is available in your session (gate basis: it varies by version and host; records\nin [reference\u002Fnative-surfaces.md](reference\u002Fnative-surfaces.md)), you can run it to view and edit\nthese rules interactively. When the caller passes\n`--unattended`, the run records that offer in its output instead of asking;\nwithout that flag it asks.\n\n**Mutation gate.** `fewer-permission-prompts` writes project settings, and `\u002Fpermissions` writes\nwhichever scope the person edits. This skill never chains into either on its own behalf.\n\n**Availability is never assumed.** Settings, version and host decide whether either surface\nresolves; this section states what to do\nwhen they resolve, never that they are present. The four-part records live in\n[reference\u002Fnative-surfaces.md](reference\u002Fnative-surfaces.md).\n\n## Report-only, permanently\n\n**This skill writes no settings file, in any scope, under any flag.** That is the contract, and it\nholds including under `--oracle`. It is not the same as writing nothing at all: `--oracle` spawns a\nreal `claude -p` session, and a session rewrites `~\u002F.claude.json` and adds project, session-env,\nsecurity, subagent and backup state under your config directory. The flag prints that before it\nspawns anything. Every other action writes nothing anywhere. This skill treats managed policy as\nread-only by construction: it reads the managed sources and never authors them.\n\n- **Pointer**: when deciding which managed sources exist and who can write each, fetch\n  [managed settings: where each mechanism stores the policy](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fmanaged-settings#where-each-mechanism-stores-the-policy)\n  live.\n\n## Arguments\n\nParse `$ARGUMENTS`. **Flags narrow; they never widen.**\n\n- (no argument): every read-only stage, in order, through one entry point. See \"Run it\" below.\n- `--unattended`, anywhere: the caller declares nobody is present, which changes only the\n  `\u002Fpermissions` offer (see \"Boundary\" above). It is not a stage flag and `audit.sh` refuses it: drop\n  it from the arguments \"Run it\" passes.\n- `--scopes`: surface records only, no rule inventory and no downstream stage. Use when the question\n  is \"which scopes exist and which could you read\", not \"what is in them\".\n- `--entry-diff`: inventory, merge, and the auto-mode entry diff (Phase 3).\n- `--lint`: inventory and the permission-plane lint (Phase 4).\n- `--managed`: inventory and the managed-conformance report (Phase 6).\n- `--block`: the `autoMode` block lint (Phase 5). Reads the CLI, not the inventory, so it runs alone.\n- `--oracle`: with `--entry-diff`, cross-check the prediction against the harness's own drop\n  narration. **Spawns a real `claude -p` session**; never fires without this flag. See its cost\n  notice, which the run prints before anything is spawned.\n- `--critique`: with `--block`, add `claude auto-mode critique`. Slow, and it truncates or returns\n  nothing while still exiting 0, so its result is reported as unavailable rather than as clean.\n\n## Run it\n\nOne entry point runs each stage once and fans the inventory out, instead of walking every scope once\nper pipeline (with `--unattended` dropped from the arguments):\n\n```shell\nbash \"${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Faudit-permission-state\u002Fscripts\u002Faudit.sh\" $ARGUMENTS\n```\n\nThe phases below document what each stage decides and how to read it. Every stage script stays\nindependently invocable and composes on its own, which is what `draft-auto-mode-rules` and\n`audit-pass` rely on; `audit.sh` is a convenience caller, never a gateway.\n\n**Read the `status=` token on every summary line before the counts above it.** `status=read` means\nthe stage saw every scope; `status=incomplete` means at least one could not be opened and the counts\ncover only what was read. A finding count of zero under `status=incomplete` is not a clean bill.\n\n## Phase 1: Discover and inventory\n\nStage: `permission-state.sh`, the deterministic spine every other stage consumes. It emits one record\nper line:\n\n```text\n\u003Cscope> \u003Csurface> \u003Cstatus> \u003Cpath>          one per settings surface\nrule \u003Cscope> \u003Csurface> \u003Ckind> \u003Crule text>  one per allow\u002Fask\u002Fdeny entry\nNOTE: \u003Ctext>                               anything the operator must know\n```\n\n| Field | Values |\n| --- | --- |\n| `scope` | `managed`, `user`, `project`, `local`, `startdir-local` |\n| `surface` | `file`, `dropin-dir`, `dropin-file:\u003Cname>`, `registry`, `plist` (managed); `toplevel` (project, see Scopes); `settings` elsewhere |\n| `status` | `present`, `absent`, `unreadable`, `invalid-json`, `skipped`, `not-applicable` |\n| `kind` | `allow`, `ask`, `deny` |\n\n## Phase 2: Merge into the effective set\n\nStage: `permission-merge.sh`, fed the inventory. It reports what is actually in force, each rule\ncarrying its provenance. It passes the records above through, then appends:\n\n```text\nCAVEAT: \u003Ctext>                                                 what bounds the claim\neffective \u003Ckind> scopes=\u003Ca,b> precedence_basis=\u003Ctoken> \u003Crule>  one per live rule\ninert \u003Ckind> scopes=\u003Ca,b> outranked_by=\u003Ckind> \u003Crule>           one per beaten entry\ncarveout \u003Ckind> source=\u003Cscope>:\u003Csurface> [bare] \u003Crule>         one per ! Read\u002FEdit rule\n```\n\nThese mechanics decide those records, and conflating them produces confident wrong answers:\n\n- **The merge treats rules as merging across scopes, never overriding**, so the same rule in the\n  same list at two scopes has no winner. Both are live, and `scopes=` names every contributor.\n  Never report one of them as having overridden the other.\n- **The merge decides kind by the fixed evaluation order `scripts\u002Fpermission-merge.sh` encodes,\n  across scopes, and records which rule made another inert.** That `inert` record is what answers\n  \"why is my allow rule ignored\". When checking that order and whether scope rank enters it, fetch\n  [settings: permission rules combine differently than you expected](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fsettings#permission-rules-combine-differently-than-you-expected)\n  live.\n- **The merge treats a bare tool name as reaching every call of that tool.** A whole-tool deny\n  makes every other rule naming that tool inert, other denies included, with the one exception\n  `reference\u002Fcriteria.md` names. A whole-tool ask leaves no scoped allow for that tool in effect.\n  Both print a `NOTE:` naming the tool.\n- **The merge keeps a `!` carve-out inside its own source.** A deny or ask `Read` or `Edit` rule\n  whose pattern starts with `!` is reported as a `carveout` record naming the one file it came\n  from, never merged across scopes, so never read it as reopening a path another file blocks. A\n  carve-out whose pattern is a bare `!` is tagged `bare`, and its effect is a known gap the merge\n  does not model.\n  - **Pointer**: when you need what a carve-out reaches, fetch\n    [permissions: Read and Edit](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fpermissions#read-and-edit) live.\n\n`reference\u002Fcriteria.md` maps every `precedence_basis` token to the docs section it follows from,\nand states the two standing bounds the run prints.\n\n## Phase 3: What entering auto mode drops\n\nThis stage predicts which of your broad allow rules auto mode sets aside on entry, with no notice,\nuntil the session leaves auto mode again, and which carry over.\n\n**It describes a transition most run shapes never make, so state the precondition when you report\nit.** The run prints, as a `DIFF-NOTE`, the run shapes we treat as starting in auto mode; carry it\nrather than presenting the diff as unconditional. `reference\u002Fcriteria.md` §\"The auto-mode entry\ndiff\" and §\"The precondition: which sessions enter auto mode at all\" hold the pointers.\n\nStage: `automode-entry-diff.sh`, fed the merge.\n\n```text\nDIFF-NOTE: \u003Ctext>                                     classifyAllShell state, bounds\nentry-diff dropped class=\u003Cclass> scopes=\u003Ca,b> \u003Crule>  dropped on entry\nentry-diff suspended reason=classifyAllShell ...      suspended while auto mode is active\nentry-diff kept scopes=\u003Ca,b> \u003Crule>                   carries over\nentry-diff summary allow_before=\u003Cn> dropped=\u003Cn> suspended=\u003Cn> kept=\u003Cn>\n```\n\n- **The diff covers allow rules only.** We treat deny and ask as evaluated before the classifier\n  in every mode, so they are not part of this diff. Do not report them as \"surviving\".\n- **Neither label is permanent.** `dropped` and `suspended` both describe what is in force while auto\n  mode is active; the rules are restored when the session leaves it, and nothing edits a settings\n  file. The two labels are kept apart because the remedies differ: a `dropped` rule is fixable by\n  narrowing that rule, while `suspended` is a global switch no rule edit reaches.\n- **`class` names the reason**: `blanket`, `interpreter-wildcard`, `package-manager-run`,\n  `agent`, or `monitor`. The three shell shapes come from `lib\u002Fpermission-patterns.sh`, the\n  vocabulary `audit-permission-grants` check P1 also scans with; `agent` and `monitor` are\n  whole-tool classes this script tests on the tool token, `monitor` with the version bound\n  `reference\u002Fcriteria.md` §\"The auto-mode entry diff\" records.\n- **`autoMode.classifyAllShell` inverts the answer wholesale.** The stage treats it, when true, as\n  suspending *every* Bash and PowerShell allow rule, so narrow rules do **not** carry over. It\n  resolves the key only from the scopes it treats the classifier as reading, so a project- or\n  local-scope copy is reported inert rather than obeyed. `reference\u002Fcriteria.md` holds the pointers.\n- **`--oracle` is opt-in and priced.** It spawns a real `claude -p` session to corroborate the\n  prediction. Measured cost: your settings files are untouched, but `~\u002F.claude.json` is rewritten and\n  project, session-env, security and subagent state appear under your config directory. A capture\n  that yields nothing is **unavailable**, never an empty drop set.\n\n## Phase 4: Configuration that is written but never read\n\nThe permission plane accepts things it silently ignores. This finds them across every scope at once,\nbefore a session starts:\n\nStage: `permission-plane-lint.sh`, fed the inventory.\n\n```text\nfinding \u003Cseverity> [\u003Ccheck>] \u003Cscope> \u003Cdetail>\nlint summary findings=\u003Cn> checks_run=\u003Cn> status=\u003Cread|incomplete>\n```\n\nEleven checks: three `C2-*` dead-config gates, `C5-disableType`, and seven `C6-*` rules-that-cannot-match, including a malformed Tool(content) rule and an uncompilable Read\u002FEdit path.\n`reference\u002Fcriteria.md` maps each to the docs section it follows from and lists the legitimate rule\nshapes the checks are written NOT to flag.\n\n- **`C5-disableType` is the one to read first.** It flags any value other than the string\n  `\"disable\"` as a false lockout: valid JSON the operator believes locks auto mode out. When deciding which value\n  locks it out, fetch\n  [settings reference: `disableAutoMode`](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fsettings-reference#disableautomode)\n  live (as of 2026-11-03; recheck when that section changes the value that disables auto mode).\n- **The three `C2` gates stay separate findings.** Different scope sets, different version histories:\n  an operator who fixed one and saw the count drop would reasonably believe they had fixed all three.\n- **`findings=0` is a clean bill only under `status=read`.** Under `status=incomplete` a scope could\n  not be opened and was never linted; the accompanying `LINT-NOTE` names which.\n- **Advisory: the lint always exits 0 when it ran.** Exit 2 means it could not run at all, never\n  \"nothing found\".\n\n## Phase 5: The `autoMode` classifier block\n\nA different surface from everything above: four natural-language sections an LLM classifier reads,\nnot permission rules the harness matches. Independent of the pipeline, it reads the CLI, not stdin:\n\n```shell\nbash \"${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Faudit-permission-state\u002Fscripts\u002Fautomode-block-lint.sh\" [--critique]\n```\n\n- **`C4-defaults`**: a customized section that omits `\"$defaults\"`. We treat such a section as\n  **replacing** the built-in list rather than adding to it, so the finding names how many built-in\n  entries are gone. `reference\u002Fcriteria.md` §\"The `autoMode` block lane\" holds the pointer.\n- **`C2b-contradiction`**: the same subject in `allow` and in a deny section.\n- **`C3-shadowed`**: an entry an earlier `hard_deny` already forecloses, so it can never fire.\n- **`C5-provenance`**: a date or issue reference in an entry you wrote.\n- **`--critique` surfaces `claude auto-mode critique`, wrapped and never replaced.** It owns the\n  semantic judgment. What this adds is honesty about it: measured across three consecutive runs on one\n  unchanged config, output was truncated mid-sentence twice and empty once, **exiting 0 every time**.\n  A mid-sentence cut is reported as truncated; an empty result says \"critique returned nothing; run it\n  yourself\" rather than implying your rules are clean.\n\n**This lane is optional.** It needs `python3` because\n`claude auto-mode config` emits raw control characters inside string values. `jq` rejects the output\noutright, and no line-oriented POSIX filter can repair it, since the offending byte is a raw line feed\ninside a string. Absent `python3` or `claude`, the lane prints a visible skip notice and exits 0; every\nother stage still runs.\n\n**Exit status is never trusted here.** A run that exits 0 having produced nothing is reported\n`status=unavailable` with an explicit \"this is NOT a clean bill\". The distinction between \"your block\nis clean\" and \"the block was never read\" is the whole point.\n\n## Phase 6: What managed policy actually enforces\n\nAn administrator deploys managed policy believing it is policy. Some of it is; some is not, and\nnothing surfaces which. Stage: `managed-conformance.sh`, fed the inventory.\n\n- **`managed enforced deny \u003Crule>`**: the strongest thing an administrator can write. We treat a\n  managed permission rule as outranked by no level, command line included, and a tool denied at\n  any level as allowed at none.\n- **`managed loosenable rule …`**: the interaction that surprises people, reported when a\n  lower-scope rule of an earlier-evaluated kind outranks a managed rule, because an administrator\n  reads the managed rule as policy. When deciding how managed rules rank and evaluate, fetch\n  [permissions: settings precedence](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fpermissions#settings-precedence)\n  live.\n- **`managed loosenable autoMode`**: we report a managed `autoMode` section as **additive, not a\n  policy boundary**, since a developer's own entries can loosen it.\n- **`managed loosenable lockout`**: `disableAutoMode` set to anything but the string `\"disable\"`.\n\n`reference\u002Fcriteria.md` §\"Managed policy, and what it does not buy\" holds the pointers for all\nfour.\n\n**This report never prescribes.** It says what the consumer's own policy does and does not achieve;\nevery rule string it prints came from a file it read. It ships no security floor of its own.\n\n**Completeness is bounded on every run.** \"Managed\" means the local admin surfaces only. We do not\nfold the server-managed cache into the effective set, and do not treat it as the live policy. When\ndeciding where the cache lives and how current it is, fetch\n[server-managed settings: fetch and caching behavior](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fserver-managed-settings#fetch-and-caching-behavior)\nlive. A surface that could not be read gets its own note saying so, because an administrator\nreading silence as \"no policy deployed\" is the failure this report exists to prevent. The note\nroutes that diagnosis to the Organization policy line in `\u002Fstatus` and `claude doctor`.\n\n- **Pointer**: for where a managed source and a policy that failed to load are shown, see\n  [Read the source in \u002Fstatus](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fmanaged-settings#read-the-source-in-\u002Fstatus)\n  and the `\u002Fstatus` row of [All commands](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fcommands#all-commands).\n- **As of**: 2026-09-28\n- **Recheck trigger**: those pages drop the Organization policy line or stop naming `\u002Fstatus` as the\n  place a managed source is shown.\n\n## Reading the output honestly\n\n\u003C!-- fresh-eyes-exempt: external-input -- the material judged here is the consumer's own configuration as read by a deterministic script; no step in this skill judges output this skill authored -->\n\nInterpret and report the records below; the judgment is over the consumer's configuration, never over\nanything this skill produced. The status vocabulary carries the whole point of the skill, so do not\ncollapse it in the report:\n\n- **`absent` means looked and found nothing.** **`skipped` means could not look.** Never present a\n  `skipped` surface as \"no policy\". Say the surface was not read and why. The script emits a `NOTE:`\n  naming the reason every time.\n- **Every scope and every managed surface emits a record on every OS**, including the ones that do\n  not apply here (`not-applicable`). A surface missing from the output is a defect in this reader,\n  not evidence about the machine.\n- **`managed` means the LOCAL managed surfaces.** The script does not fold the server-managed cache\n  at `~\u002F.claude\u002Fremote-settings.json` into the effective set, and treats the Organization policy\n  line in `\u002Fstatus` as the failure read. The script says so on every run; carry it into the report\n  rather than implying completeness.\n- **An `ask` finding names where the contract lives**: the auto mode config page, and the\n  upstream issue anthropics\u002Fclaude-code#83766 against it. Carry the caveat `reference\u002Fcriteria.md` §\"Ask rules under auto\n  mode\" words, with its pointer, when reporting an `ask` result, and point at\n  `permissions.deny` where the outcome must hold regardless.\n- **`invalid-json` is not `absent`.** A malformed settings file contributes no rules to the\n  inventory. Report the parse failure, not an empty scope, and do not describe a managed parse\n  failure as silent non-enforcement: we treat an unparsable managed source as stopping Claude Code\n  at startup, on the versions the pointer names, and an unparsable user, project, or local file as a\n  reported settings error.\n  - **Pointer**: for managed sources that fail to parse, fetch\n    [managed settings: find entries Claude Code dropped](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fmanaged-settings#find-entries-claude-code-dropped)\n    live; for other settings files, fetch\n    [settings: fix a broken settings file](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fsettings#fix-a-broken-settings-file)\n    live.\n\n## Scopes\n\nFive: `managed`, `user`, `project`, `local` and `startdir-local`. `local` and `startdir-local` are\nthe two easy to get wrong; when deciding where the local file is read from, fetch\n[settings: where Claude Code keeps the local file in a git repository](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fsettings#where-claude-code-keeps-the-local-file-in-a-git-repository)\nlive.\nThe reader takes its own working directory as the session's primary working directory, the one input\nfor `project` and `local`. Run it from the directory the session started in (or last moved to with\n`\u002Fcd`). Below the repository root it reads two shared files, `project settings` from its own\ndirectory and `project toplevel` from the root, and no other. So after an in-session Bash `cd`, the\nstart directory's file is not read unless it is the root's: a session started in `repo\u002Fa` that ran\n`cd b` gets `repo\u002Fa\u002Fb` and the root, never `repo\u002Fa`. Both files it reads feed the merge, and the set\ncan over-report the one not in force. Say which directory the session started in when that decides\nthe answer. When judging whether a `cd` still carries over, fetch\n[tools reference: what persists between commands](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Ftools-reference#what-persists-between-commands)\nlive.\n`managed`\nis four admin surfaces per OS, not one file, plus a `remote-cache` record for the server-managed\ncache that is not folded into the effective set. `reference\u002Fcriteria.md` §Scopes has the full table\nand the dated record.\n\n**The reader resolves every condition we treat as keeping the local file beside\n`.claude\u002Fsettings.json` instead**, and the basis line names which applied. One further case, the\nAgent SDK's `resolveSettings()` helper, is stated rather than detected, because it is a helper's\nbehavior and not a session property. `reference\u002Fcriteria.md` §\"The four start-directory\nconditions, and the one that is not detectable\" holds the list and its pointer.\n\n**A cloud session reads a different scope set, and the run says so.** We treat a user-scope record\nin a cloud session as describing the container, not the operator. The reader detects a cloud\nsession by `CLAUDE_CODE_REMOTE`, the only entrypoint variable it branches on.\n`reference\u002Fcriteria.md` §Scopes holds both records.\n\n## Prerequisites\n\n- **`jq`, required for correctness.** Absent, the script stops at the entry point with\n  `ERROR: jq required` and exit 2, followed by the install command for the platform when it finds\n  one. Report the environment gap and that install line; do not report a clean bill.\n- **`reg` (Windows) and `defaults` (macOS), required for an optional feature.** Absent, that one\n  managed surface is `skipped` with a visible notice and everything else still runs.\n\n## Gotchas\n\nFailure modes that produce a confidently wrong answer, and the honest limits of what has been\nverified on real hardware, are in [reference\u002Fgotchas.md](reference\u002Fgotchas.md). Read it when a result\nlooks wrong, when debugging a stage by hand, or before trusting a managed surface on macOS or Linux.\n","**Arguments.** `[--unattended] [--scopes] [--entry-diff] [--lint] [--managed] [--block] [--oracle] [--critique]`. Full form: (none) every read-only stage | [--scopes] [--entry-diff] [--lint] [--managed] [--block] narrow | [--oracle] [--critique] priced\n\n## Purpose\n\nFor \"where is this rule written\", use `\u002Fpermissions`. This skill answers a different question: it\ncomputes the merged allow\u002Fask\u002Fdeny outcome itself, locally and off a live session, as line records a\nscript can read, and it reports a scope it could not read apart from one that was empty.\n\n- **Pointer**: when deciding whether a built-in surface already exports the merged set, fetch\n  [CLI commands](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fcli-reference#cli-commands) and the `\u002Fpermissions`\n  row of [commands: all commands](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fcommands#all-commands) live.\n- **Recheck trigger**: a release note mentions a permissions export or a `\u002Fpermissions` export\n  action, or either section adds one.\n\nIt answers a question the siblings do not. `audit-permission-grants` asks whether the grants you\n**wrote** are durable and portable; `audit` asks whether your config files are **correct**. This\nskill asks what is **in effect**: which scopes exist on this machine, which of them this reader\ncould actually open, and what each one holds.\n\n## Scope boundary (route out)\n\n- Grant portability and auto-mode durability (P1\u002FP2\u002FP3) → `harness-config:audit-permission-grants`.\n- Settings-file correctness **outside the permission plane** (schema and unknown keys, baseline\n  deny\u002Fask presence, deny-rule placement, MCP, hooks, plugin drift) → `harness-config:audit`. The\n  permission plane's own dead config, the `disableAutoMode` type trap, and rules that cannot match\n  stay here, in Phase 4: they are read across all five scopes at once, which is this skill's asset\n  and not something a project-scope reader can do.\n- The instruction layer (CLAUDE.md, a natively read AGENTS.md, rules, auto-memory) → the\n  `harness-memory` plugin.\n\n## Boundary, native Claude Code surfaces\n\nTwo native surfaces act on the same permission rules this skill reports, so \"fix my permissions\"\ncan mean any of the three.\n\n- **`fewer-permission-prompts` (bundled skill)**: writes an allowlist into project settings to cut\n  prompts. Either the model or the person may run it.\n- **`\u002Fpermissions` (built-in command).** The person's interactive editor for rules by scope and\n  for auto mode's classifier rules. This skill never runs it.\n- **This skill (marketplace plugin).** Computes the effective merged set across every scope, off a\n  live session, with source, precedence, auto mode drops, and dead config. It writes nothing.\n\n**Routing.** When the bundled `fewer-permission-prompts` skill resolves in this session, prefer it\nfor reducing prompts by writing an allowlist; prefer this skill to see what is in effect. When the\nreport ends with a rule the person wants added, removed, or moved, offer it to the person:\nIf \u002Fpermissions is available in your session (gate basis: it varies by version and host; records\nin [reference\u002Fnative-surfaces.md](reference\u002Fnative-surfaces.md)), you can run it to view and edit\nthese rules interactively. When the caller passes\n`--unattended`, the run records that offer in its output instead of asking;\nwithout that flag it asks.\n\n**Mutation gate.** `fewer-permission-prompts` writes project settings, and `\u002Fpermissions` writes\nwhichever scope the person edits. This skill never chains into either on its own behalf.\n\n**Availability is never assumed.** Settings, version and host decide whether either surface\nresolves; this section states what to do\nwhen they resolve, never that they are present. The four-part records live in\n[reference\u002Fnative-surfaces.md](reference\u002Fnative-surfaces.md).\n\n## Report-only, permanently\n\n**This skill writes no settings file, in any scope, under any flag.** That is the contract, and it\nholds including under `--oracle`. It is not the same as writing nothing at all: `--oracle` spawns a\nreal `claude -p` session, and a session rewrites `~\u002F.claude.json` and adds project, session-env,\nsecurity, subagent and backup state under your config directory. The flag prints that before it\nspawns anything. Every other action writes nothing anywhere. This skill treats managed policy as\nread-only by construction: it reads the managed sources and never authors them.\n\n- **Pointer**: when deciding which managed sources exist and who can write each, fetch\n  [managed settings: where each mechanism stores the policy](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fmanaged-settings#where-each-mechanism-stores-the-policy)\n  live.\n\n## Arguments\n\nParse `$ARGUMENTS`. **Flags narrow; they never widen.**\n\n- (no argument): every read-only stage, in order, through one entry point. See \"Run it\" below.\n- `--unattended`, anywhere: the caller declares nobody is present, which changes only the\n  `\u002Fpermissions` offer (see \"Boundary\" above). It is not a stage flag and `audit.sh` refuses it: drop\n  it from the arguments \"Run it\" passes.\n- `--scopes`: surface records only, no rule inventory and no downstream stage. Use when the question\n  is \"which scopes exist and which could you read\", not \"what is in them\".\n- `--entry-diff`: inventory, merge, and the auto-mode entry diff (Phase 3).\n- `--lint`: inventory and the permission-plane lint (Phase 4).\n- `--managed`: inventory and the managed-conformance report (Phase 6).\n- `--block`: the `autoMode` block lint (Phase 5). Reads the CLI, not the inventory, so it runs alone.\n- `--oracle`: with `--entry-diff`, cross-check the prediction against the harness's own drop\n  narration. **Spawns a real `claude -p` session**; never fires without this flag. See its cost\n  notice, which the run prints before anything is spawned.\n- `--critique`: with `--block`, add `claude auto-mode critique`. Slow, and it truncates or returns\n  nothing while still exiting 0, so its result is reported as unavailable rather than as clean.\n\n## Run it\n\nOne entry point runs each stage once and fans the inventory out, instead of walking every scope once\nper pipeline (with `--unattended` dropped from the arguments):\n\n```shell\nbash \"${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Faudit-permission-state\u002Fscripts\u002Faudit.sh\" $ARGUMENTS\n```\n\nThe phases below document what each stage decides and how to read it. Every stage script stays\nindependently invocable and composes on its own, which is what `draft-auto-mode-rules` and\n`audit-pass` rely on; `audit.sh` is a convenience caller, never a gateway.\n\n**Read the `status=` token on every summary line before the counts above it.** `status=read` means\nthe stage saw every scope; `status=incomplete` means at least one could not be opened and the counts\ncover only what was read. A finding count of zero under `status=incomplete` is not a clean bill.\n\n## Phase 1: Discover and inventory\n\nStage: `permission-state.sh`, the deterministic spine every other stage consumes. It emits one record\nper line:\n\n```text\n\u003Cscope> \u003Csurface> \u003Cstatus> \u003Cpath>          one per settings surface\nrule \u003Cscope> \u003Csurface> \u003Ckind> \u003Crule text>  one per allow\u002Fask\u002Fdeny entry\nNOTE: \u003Ctext>                               anything the operator must know\n```\n\n| Field | Values |\n| --- | --- |\n| `scope` | `managed`, `user`, `project`, `local`, `startdir-local` |\n| `surface` | `file`, `dropin-dir`, `dropin-file:\u003Cname>`, `registry`, `plist` (managed); `toplevel` (project, see Scopes); `settings` elsewhere |\n| `status` | `present`, `absent`, `unreadable`, `invalid-json`, `skipped`, `not-applicable` |\n| `kind` | `allow`, `ask`, `deny` |\n\n## Phase 2: Merge into the effective set\n\nStage: `permission-merge.sh`, fed the inventory. It reports what is actually in force, each rule\ncarrying its provenance. It passes the records above through, then appends:\n\n```text\nCAVEAT: \u003Ctext>                                                 what bounds the claim\neffective \u003Ckind> scopes=\u003Ca,b> precedence_basis=\u003Ctoken> \u003Crule>  one per live rule\ninert \u003Ckind> scopes=\u003Ca,b> outranked_by=\u003Ckind> \u003Crule>           one per beaten entry\ncarveout \u003Ckind> source=\u003Cscope>:\u003Csurface> [bare] \u003Crule>         one per ! Read\u002FEdit rule\n```\n\nThese mechanics decide those records, and conflating them produces confident wrong answers:\n\n- **The merge treats rules as merging across scopes, never overriding**, so the same rule in the\n  same list at two scopes has no winner. Both are live, and `scopes=` names every contributor.\n  Never report one of them as having overridden the other.\n- **The merge decides kind by the fixed evaluation order `scripts\u002Fpermission-merge.sh` encodes,\n  across scopes, and records which rule made another inert.** That `inert` record is what answers\n  \"why is my allow rule ignored\". When checking that order and whether scope rank enters it, fetch\n  [settings: permission rules combine differently than you expected](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fsettings#permission-rules-combine-differently-than-you-expected)\n  live.\n- **The merge treats a bare tool name as reaching every call of that tool.** A whole-tool deny\n  makes every other rule naming that tool inert, other denies included, with the one exception\n  `reference\u002Fcriteria.md` names. A whole-tool ask leaves no scoped allow for that tool in effect.\n  Both print a `NOTE:` naming the tool.\n- **The merge keeps a `!` carve-out inside its own source.** A deny or ask `Read` or `Edit` rule\n  whose pattern starts with `!` is reported as a `carveout` record naming the one file it came\n  from, never merged across scopes, so never read it as reopening a path another file blocks. A\n  carve-out whose pattern is a bare `!` is tagged `bare`, and its effect is a known gap the merge\n  does not model.\n  - **Pointer**: when you need what a carve-out reaches, fetch\n    [permissions: Read and Edit](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fpermissions#read-and-edit) live.\n\n`reference\u002Fcriteria.md` maps every `precedence_basis` token to the docs section it follows from,\nand states the two standing bounds the run prints.\n\n## Phase 3: What entering auto mode drops\n\nThis stage predicts which of your broad allow rules auto mode sets aside on entry, with no notice,\nuntil the session leaves auto mode again, and which carry over.\n\n**It describes a transition most run shapes never make, so state the precondition when you report\nit.** The run prints, as a `DIFF-NOTE`, the run shapes we treat as starting in auto mode; carry it\nrather than presenting the diff as unconditional. `reference\u002Fcriteria.md` §\"The auto-mode entry\ndiff\" and §\"The precondition: which sessions enter auto mode at all\" hold the pointers.\n\nStage: `automode-entry-diff.sh`, fed the merge.\n\n```text\nDIFF-NOTE: \u003Ctext>                                     classifyAllShell state, bounds\nentry-diff dropped class=\u003Cclass> scopes=\u003Ca,b> \u003Crule>  dropped on entry\nentry-diff suspended reason=classifyAllShell ...      suspended while auto mode is active\nentry-diff kept scopes=\u003Ca,b> \u003Crule>                   carries over\nentry-diff summary allow_before=\u003Cn> dropped=\u003Cn> suspended=\u003Cn> kept=\u003Cn>\n```\n\n- **The diff covers allow rules only.** We treat deny and ask as evaluated before the classifier\n  in every mode, so they are not part of this diff. Do not report them as \"surviving\".\n- **Neither label is permanent.** `dropped` and `suspended` both describe what is in force while auto\n  mode is active; the rules are restored when the session leaves it, and nothing edits a settings\n  file. The two labels are kept apart because the remedies differ: a `dropped` rule is fixable by\n  narrowing that rule, while `suspended` is a global switch no rule edit reaches.\n- **`class` names the reason**: `blanket`, `interpreter-wildcard`, `package-manager-run`,\n  `agent`, or `monitor`. The three shell shapes come from `lib\u002Fpermission-patterns.sh`, the\n  vocabulary `audit-permission-grants` check P1 also scans with; `agent` and `monitor` are\n  whole-tool classes this script tests on the tool token, `monitor` with the version bound\n  `reference\u002Fcriteria.md` §\"The auto-mode entry diff\" records.\n- **`autoMode.classifyAllShell` inverts the answer wholesale.** The stage treats it, when true, as\n  suspending *every* Bash and PowerShell allow rule, so narrow rules do **not** carry over. It\n  resolves the key only from the scopes it treats the classifier as reading, so a project- or\n  local-scope copy is reported inert rather than obeyed. `reference\u002Fcriteria.md` holds the pointers.\n- **`--oracle` is opt-in and priced.** It spawns a real `claude -p` session to corroborate the\n  prediction. Measured cost: your settings files are untouched, but `~\u002F.claude.json` is rewritten and\n  project, session-env, security and subagent state appear under your config directory. A capture\n  that yields nothing is **unavailable**, never an empty drop set.\n\n## Phase 4: Configuration that is written but never read\n\nThe permission plane accepts things it silently ignores. This finds them across every scope at once,\nbefore a session starts:\n\nStage: `permission-plane-lint.sh`, fed the inventory.\n\n```text\nfinding \u003Cseverity> [\u003Ccheck>] \u003Cscope> \u003Cdetail>\nlint summary findings=\u003Cn> checks_run=\u003Cn> status=\u003Cread|incomplete>\n```\n\nEleven checks: three `C2-*` dead-config gates, `C5-disableType`, and seven `C6-*` rules-that-cannot-match, including a malformed Tool(content) rule and an uncompilable Read\u002FEdit path.\n`reference\u002Fcriteria.md` maps each to the docs section it follows from and lists the legitimate rule\nshapes the checks are written NOT to flag.\n\n- **`C5-disableType` is the one to read first.** It flags any value other than the string\n  `\"disable\"` as a false lockout: valid JSON the operator believes locks auto mode out. When deciding which value\n  locks it out, fetch\n  [settings reference: `disableAutoMode`](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fsettings-reference#disableautomode)\n  live (as of 2026-11-03; recheck when that section changes the value that disables auto mode).\n- **The three `C2` gates stay separate findings.** Different scope sets, different version histories:\n  an operator who fixed one and saw the count drop would reasonably believe they had fixed all three.\n- **`findings=0` is a clean bill only under `status=read`.** Under `status=incomplete` a scope could\n  not be opened and was never linted; the accompanying `LINT-NOTE` names which.\n- **Advisory: the lint always exits 0 when it ran.** Exit 2 means it could not run at all, never\n  \"nothing found\".\n\n## Phase 5: The `autoMode` classifier block\n\nA different surface from everything above: four natural-language sections an LLM classifier reads,\nnot permission rules the harness matches. Independent of the pipeline, it reads the CLI, not stdin:\n\n```shell\nbash \"${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Faudit-permission-state\u002Fscripts\u002Fautomode-block-lint.sh\" [--critique]\n```\n\n- **`C4-defaults`**: a customized section that omits `\"$defaults\"`. We treat such a section as\n  **replacing** the built-in list rather than adding to it, so the finding names how many built-in\n  entries are gone. `reference\u002Fcriteria.md` §\"The `autoMode` block lane\" holds the pointer.\n- **`C2b-contradiction`**: the same subject in `allow` and in a deny section.\n- **`C3-shadowed`**: an entry an earlier `hard_deny` already forecloses, so it can never fire.\n- **`C5-provenance`**: a date or issue reference in an entry you wrote.\n- **`--critique` surfaces `claude auto-mode critique`, wrapped and never replaced.** It owns the\n  semantic judgment. What this adds is honesty about it: measured across three consecutive runs on one\n  unchanged config, output was truncated mid-sentence twice and empty once, **exiting 0 every time**.\n  A mid-sentence cut is reported as truncated; an empty result says \"critique returned nothing; run it\n  yourself\" rather than implying your rules are clean.\n\n**This lane is optional.** It needs `python3` because\n`claude auto-mode config` emits raw control characters inside string values. `jq` rejects the output\noutright, and no line-oriented POSIX filter can repair it, since the offending byte is a raw line feed\ninside a string. Absent `python3` or `claude`, the lane prints a visible skip notice and exits 0; every\nother stage still runs.\n\n**Exit status is never trusted here.** A run that exits 0 having produced nothing is reported\n`status=unavailable` with an explicit \"this is NOT a clean bill\". The distinction between \"your block\nis clean\" and \"the block was never read\" is the whole point.\n\n## Phase 6: What managed policy actually enforces\n\nAn administrator deploys managed policy believing it is policy. Some of it is; some is not, and\nnothing surfaces which. Stage: `managed-conformance.sh`, fed the inventory.\n\n- **`managed enforced deny \u003Crule>`**: the strongest thing an administrator can write. We treat a\n  managed permission rule as outranked by no level, command line included, and a tool denied at\n  any level as allowed at none.\n- **`managed loosenable rule …`**: the interaction that surprises people, reported when a\n  lower-scope rule of an earlier-evaluated kind outranks a managed rule, because an administrator\n  reads the managed rule as policy. When deciding how managed rules rank and evaluate, fetch\n  [permissions: settings precedence](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fpermissions#settings-precedence)\n  live.\n- **`managed loosenable autoMode`**: we report a managed `autoMode` section as **additive, not a\n  policy boundary**, since a developer's own entries can loosen it.\n- **`managed loosenable lockout`**: `disableAutoMode` set to anything but the string `\"disable\"`.\n\n`reference\u002Fcriteria.md` §\"Managed policy, and what it does not buy\" holds the pointers for all\nfour.\n\n**This report never prescribes.** It says what the consumer's own policy does and does not achieve;\nevery rule string it prints came from a file it read. It ships no security floor of its own.\n\n**Completeness is bounded on every run.** \"Managed\" means the local admin surfaces only. We do not\nfold the server-managed cache into the effective set, and do not treat it as the live policy. When\ndeciding where the cache lives and how current it is, fetch\n[server-managed settings: fetch and caching behavior](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fserver-managed-settings#fetch-and-caching-behavior)\nlive. A surface that could not be read gets its own note saying so, because an administrator\nreading silence as \"no policy deployed\" is the failure this report exists to prevent. The note\nroutes that diagnosis to the Organization policy line in `\u002Fstatus` and `claude doctor`.\n\n- **Pointer**: for where a managed source and a policy that failed to load are shown, see\n  [Read the source in \u002Fstatus](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fmanaged-settings#read-the-source-in-\u002Fstatus)\n  and the `\u002Fstatus` row of [All commands](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fcommands#all-commands).\n- **As of**: 2026-09-28\n- **Recheck trigger**: those pages drop the Organization policy line or stop naming `\u002Fstatus` as the\n  place a managed source is shown.\n\n## Reading the output honestly\n\n\u003C!-- fresh-eyes-exempt: external-input -- the material judged here is the consumer's own configuration as read by a deterministic script; no step in this skill judges output this skill authored -->\n\nInterpret and report the records below; the judgment is over the consumer's configuration, never over\nanything this skill produced. The status vocabulary carries the whole point of the skill, so do not\ncollapse it in the report:\n\n- **`absent` means looked and found nothing.** **`skipped` means could not look.** Never present a\n  `skipped` surface as \"no policy\". Say the surface was not read and why. The script emits a `NOTE:`\n  naming the reason every time.\n- **Every scope and every managed surface emits a record on every OS**, including the ones that do\n  not apply here (`not-applicable`). A surface missing from the output is a defect in this reader,\n  not evidence about the machine.\n- **`managed` means the LOCAL managed surfaces.** The script does not fold the server-managed cache\n  at `~\u002F.claude\u002Fremote-settings.json` into the effective set, and treats the Organization policy\n  line in `\u002Fstatus` as the failure read. The script says so on every run; carry it into the report\n  rather than implying completeness.\n- **An `ask` finding names where the contract lives**: the auto mode config page, and the\n  upstream issue anthropics\u002Fclaude-code#83766 against it. Carry the caveat `reference\u002Fcriteria.md` §\"Ask rules under auto\n  mode\" words, with its pointer, when reporting an `ask` result, and point at\n  `permissions.deny` where the outcome must hold regardless.\n- **`invalid-json` is not `absent`.** A malformed settings file contributes no rules to the\n  inventory. Report the parse failure, not an empty scope, and do not describe a managed parse\n  failure as silent non-enforcement: we treat an unparsable managed source as stopping Claude Code\n  at startup, on the versions the pointer names, and an unparsable user, project, or local file as a\n  reported settings error.\n  - **Pointer**: for managed sources that fail to parse, fetch\n    [managed settings: find entries Claude Code dropped](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fmanaged-settings#find-entries-claude-code-dropped)\n    live; for other settings files, fetch\n    [settings: fix a broken settings file](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fsettings#fix-a-broken-settings-file)\n    live.\n\n## Scopes\n\nFive: `managed`, `user`, `project`, `local` and `startdir-local`. `local` and `startdir-local` are\nthe two easy to get wrong; when deciding where the local file is read from, fetch\n[settings: where Claude Code keeps the local file in a git repository](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fsettings#where-claude-code-keeps-the-local-file-in-a-git-repository)\nlive.\nThe reader takes its own working directory as the session's primary working directory, the one input\nfor `project` and `local`. Run it from the directory the session started in (or last moved to with\n`\u002Fcd`). Below the repository root it reads two shared files, `project settings` from its own\ndirectory and `project toplevel` from the root, and no other. So after an in-session Bash `cd`, the\nstart directory's file is not read unless it is the root's: a session started in `repo\u002Fa` that ran\n`cd b` gets `repo\u002Fa\u002Fb` and the root, never `repo\u002Fa`. Both files it reads feed the merge, and the set\ncan over-report the one not in force. Say which directory the session started in when that decides\nthe answer. When judging whether a `cd` still carries over, fetch\n[tools reference: what persists between commands](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Ftools-reference#what-persists-between-commands)\nlive.\n`managed`\nis four admin surfaces per OS, not one file, plus a `remote-cache` record for the server-managed\ncache that is not folded into the effective set. `reference\u002Fcriteria.md` §Scopes has the full table\nand the dated record.\n\n**The reader resolves every condition we treat as keeping the local file beside\n`.claude\u002Fsettings.json` instead**, and the basis line names which applied. One further case, the\nAgent SDK's `resolveSettings()` helper, is stated rather than detected, because it is a helper's\nbehavior and not a session property. `reference\u002Fcriteria.md` §\"The four start-directory\nconditions, and the one that is not detectable\" holds the list and its pointer.\n\n**A cloud session reads a different scope set, and the run says so.** We treat a user-scope record\nin a cloud session as describing the container, not the operator. The reader detects a cloud\nsession by `CLAUDE_CODE_REMOTE`, the only entrypoint variable it branches on.\n`reference\u002Fcriteria.md` §Scopes holds both records.\n\n## Prerequisites\n\n- **`jq`, required for correctness.** Absent, the script stops at the entry point with\n  `ERROR: jq required` and exit 2, followed by the install command for the platform when it finds\n  one. Report the environment gap and that install line; do not report a clean bill.\n- **`reg` (Windows) and `defaults` (macOS), required for an optional feature.** Absent, that one\n  managed surface is `skipped` with a visible notice and everything else still runs.\n\n## Gotchas\n\nFailure modes that produce a confidently wrong answer, and the honest limits of what has been\nverified on real hardware, are in [reference\u002Fgotchas.md](reference\u002Fgotchas.md). Read it when a result\nlooks wrong, when debugging a stage by hand, or before trusting a managed surface on macOS or Linux.\n",{"metadata":24,"description":7,"argument-hint":27,"user-invocable":28,"disable-model-invocation":20},{"summary":25,"workflow-stage":26},"Report the permission rules actually in effect and what auto mode drops","anytime","[--unattended] [--scopes] [--entry-diff] [--lint] [--managed] [--block] [--oracle] [--critique]",true,"main","5aff8ba54896bc54fd0eb46e4a954099449cf67d","plugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state",7,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins","https:\u002F\u002Fgithub.com\u002Fmelodic-software","https:\u002F\u002Fmelodicsoftware.com","Independent software studio building developer tools, automation, and application services, with roots in music.","2026-11-15 05:15:06",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":28},[40,43,46],{"tool":41,"command":42},"npx","npx skills add melodic-software\u002Fclaude-code-plugins --skill audit-permission-state",{"tool":44,"command":45},"bunx","bunx skills add melodic-software\u002Fclaude-code-plugins --skill audit-permission-state",{"tool":47,"command":48},"pnpm","pnpm dlx skills add melodic-software\u002Fclaude-code-plugins --skill audit-permission-state","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state\u002FSKILL.md",[51,57,61,65,69,73,77,83,87,91,95,99,103,107,111,115,119,123,127,131,135,139,143],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"evals\u002Fevals.json","REFERENCE","参考文档",2951,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state\u002Fevals\u002Fevals.json",{"path":58,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":59,"sourceHtmlUrl":60},"evals\u002Ffixtures\u002Fautomode-config-rawctl.json",454,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state\u002Fevals\u002Ffixtures\u002Fautomode-config-rawctl.json",{"path":62,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":63,"sourceHtmlUrl":64},"evals\u002Ffixtures\u002Fautomode-defaults.json",557,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state\u002Fevals\u002Ffixtures\u002Fautomode-defaults.json",{"path":66,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":67,"sourceHtmlUrl":68},"reference\u002Fcriteria.md",42361,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state\u002Freference\u002Fcriteria.md",{"path":70,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":71,"sourceHtmlUrl":72},"reference\u002Fgotchas.md",4128,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state\u002Freference\u002Fgotchas.md",{"path":74,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":75,"sourceHtmlUrl":76},"reference\u002Fnative-surfaces.md",3242,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state\u002Freference\u002Fnative-surfaces.md",{"path":78,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":81,"sourceHtmlUrl":82},"scripts\u002Faudit.sh","SCRIPT","脚本",6831,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state\u002Fscripts\u002Faudit.sh",{"path":84,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":85,"sourceHtmlUrl":86},"scripts\u002Faudit.test.sh",6492,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state\u002Fscripts\u002Faudit.test.sh",{"path":88,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":89,"sourceHtmlUrl":90},"scripts\u002Fautomode-block-lint.sh",18919,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state\u002Fscripts\u002Fautomode-block-lint.sh",{"path":92,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":93,"sourceHtmlUrl":94},"scripts\u002Fautomode-block-lint.test.sh",14851,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state\u002Fscripts\u002Fautomode-block-lint.test.sh",{"path":96,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":97,"sourceHtmlUrl":98},"scripts\u002Fautomode-entry-diff.sh",22414,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state\u002Fscripts\u002Fautomode-entry-diff.sh",{"path":100,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":101,"sourceHtmlUrl":102},"scripts\u002Fautomode-entry-diff.test.sh",23741,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state\u002Fscripts\u002Fautomode-entry-diff.test.sh",{"path":104,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":105,"sourceHtmlUrl":106},"scripts\u002Fmanaged-conformance.sh",11081,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state\u002Fscripts\u002Fmanaged-conformance.sh",{"path":108,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":109,"sourceHtmlUrl":110},"scripts\u002Fmanaged-conformance.test.sh",10648,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state\u002Fscripts\u002Fmanaged-conformance.test.sh",{"path":112,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":113,"sourceHtmlUrl":114},"scripts\u002Fno-writes.test.sh",8753,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state\u002Fscripts\u002Fno-writes.test.sh",{"path":116,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":117,"sourceHtmlUrl":118},"scripts\u002Fpermission-merge.sh",18928,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state\u002Fscripts\u002Fpermission-merge.sh",{"path":120,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":121,"sourceHtmlUrl":122},"scripts\u002Fpermission-merge.test.sh",25711,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state\u002Fscripts\u002Fpermission-merge.test.sh",{"path":124,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":125,"sourceHtmlUrl":126},"scripts\u002Fpermission-plane-lint.sh",22608,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state\u002Fscripts\u002Fpermission-plane-lint.sh",{"path":128,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":129,"sourceHtmlUrl":130},"scripts\u002Fpermission-plane-lint.test.sh",32626,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state\u002Fscripts\u002Fpermission-plane-lint.test.sh",{"path":132,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":133,"sourceHtmlUrl":134},"scripts\u002Fpermission-state-primary-dir.test.sh",8644,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state\u002Fscripts\u002Fpermission-state-primary-dir.test.sh",{"path":136,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":137,"sourceHtmlUrl":138},"scripts\u002Fpermission-state.sh",33202,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state\u002Fscripts\u002Fpermission-state.sh",{"path":140,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":141,"sourceHtmlUrl":142},"scripts\u002Fpermission-state.test.sh",25795,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state\u002Fscripts\u002Fpermission-state.test.sh",{"path":144,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":145,"sourceHtmlUrl":146},"scripts\u002Ftest-helpers.sh",2710,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-permission-state\u002Fscripts\u002Ftest-helpers.sh",[148,155,162,169,174,181],{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":19},"01M7DYYDG31B9YX7N9MB9QW2GW","track","Backlog reads through the bound tracker: search open and closed items, view one item with its comments and state history. Use when another skill searches or reads tracker items.","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fsession-flow\u002Fevals\u002Frecall-still-reports-reopened-bug\u002Fwork-items-stub\u002Fskills\u002Ftrack\u002FSKILL.md",[],[],{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":19},"01M7DYXVBAVG3NV30PA7GKW9Q6","reviewer-media","Reviewer media for one pull request: decides whether it needs a narrated walkthrough, builds the storyboard from \u002Freview:explain-change's digest, has \u002Fexplainer-video:produce render it and hands the manifest to \u002Fsource-control:pull-request media. Use when asked for 'reviewer media', 'a walkthrough video for this PR', 'a produced video of this change', or when pull-request ready or monitor hands a PR over.","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Freview\u002Fskills\u002Freviewer-media\u002FSKILL.md",[],[],{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":168,"publishedAt":19},"01M7DYRZ5YD44AMYH26YR25GZ8","route","Model and effort per agent role (orchestrator, worker, verifier, retrieval) for a multi-agent run, resolved through the bundled defaults and the user, team and personal override config layers into fenced JSON with single-agent and fan-out variants and the layer behind each value. Use when asked 'which model for the subagents', 'route the roles' or 'model routing', or before a skill passes a role's model on a spawn.","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fdiscovery\u002Fevals\u002Fex-model-pin-without-override\u002Fmulti-agent-stub\u002Fskills\u002Froute\u002FSKILL.md",[],[],{"skillNo":170,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":171,"categories":172,"keywords":173,"publishedAt":19},"01M7DYRTVT4FWTGDJY0HCCFJMZ","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fdiscovery\u002Fevals\u002Fex-model-override-from-route\u002Fmulti-agent-stub\u002Fskills\u002Froute\u002FSKILL.md",[],[],{"skillNo":175,"name":176,"nameZh":6,"description":177,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":178,"categories":179,"keywords":180,"publishedAt":19},"01M7DYNZC8PNW3T27V2ADKECKJ","principles","Module-design vocabulary for architecture findings, and the checks built on it. Use when: 'what is a deep module', 'what is a seam', 'deep vs shallow module', 'what is the deletion test', 'leverage and locality', 'module design vocabulary', 'which word do we use for X in architecture findings'. Scanning a codebase for friction is \u002Farchitecture:improve.","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Farchitecture\u002Fskills\u002Fprinciples\u002FSKILL.md",[],[],{"skillNo":182,"name":183,"nameZh":6,"description":184,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":185,"categories":186,"keywords":187,"publishedAt":19},"01M7DYNMCZNEWBFHV9KTSS6H60","write","Structured five-field bug report (title, steps to reproduce, expected vs actual, justified severity, suggested fix location) from an informal description, read-only. Use when the user names a defect they observed, or asks for one written up ('report a bug', 'file a bug', 'write this up as a bug').","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Farchitecture\u002Fevals\u002Fdeepening-defect-goes-to-bugs-write\u002Fbugs-stub\u002Fskills\u002Fwrite\u002FSKILL.md",[],[]]