[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77KS8AM6AEJE2ANKJKPSP5E":3,"skill-same:01M77KS8AM6AEJE2ANKJKPSP5E":96},{"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":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":36,"ownerDescription":37,"updatedAt":38,"install":39,"resources":51},"01M77KS8AM6AEJE2ANKJKPSP5E","audit-automation-gaps",null,"Audit a repo's Claude Code automation (hooks, MCP servers, skills, subagents, scheduled tasks) against the enforcement hierarchy, with evidence-backed PASS\u002FREJECT\u002FCONDITIONAL verdicts, REJECT by default. Use when: 'audit automations', 'what automations should we add', 'are we missing any hooks', 'hook gap analysis', 'should I add an MCP server for X'; pass --implement to apply approved items, or filter by category (hooks|mcp|skills|subagents|scheduled).","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-automation-gaps\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\ndescription: \"Audit a repo's Claude Code automation (hooks, MCP servers, skills, subagents, scheduled tasks) against the enforcement hierarchy, with evidence-backed PASS\u002FREJECT\u002FCONDITIONAL verdicts, REJECT by default. Use when: 'audit automations', 'what automations should we add', 'are we missing any hooks', 'hook gap analysis', 'should I add an MCP server for X'; pass --implement to apply approved items, or filter by category (hooks|mcp|skills|subagents|scheduled).\"\nargument-hint: \"[--recommend-only] [--implement] [hooks|mcp|skills|subagents|scheduled|all]\"\nuser-invocable: true\ndisable-model-invocation: false\nshell: bash\nmetadata:\n  workflow-stage: anytime\n  summary: Audit the repo's automation landscape for hook, MCP, skill, and subagent gaps worth adding\n---\n\n**Arguments.** `[--recommend-only] [--implement] [hooks|mcp|skills|subagents|scheduled|all]`. default: all\n\n## Pre-computed context\n\nAutomation inventory: !`bash \"${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Faudit-automation-gaps\u002Fscripts\u002Finventory.sh\" 2>\u002Fdev\u002Fnull || echo \"inventory unavailable\"`\n\nThat block counts files present separately from handlers registered, and marks a scope it could\nnot read as `unreadable`, not zero. Treat it as a starting point, never a finding. Re-derive any\ncount a verdict leans on; where your count disagrees with the block, report both and say which the\nverdict used. A partial inventory that reads as complete is this skill's recorded failure: see\n[context\u002Fgotchas.md](context\u002Fgotchas.md).\n\n## Purpose\n\nFind evidence-backed automation gaps, where no mechanism in the enforcement hierarchy covers the\nconcern, not surface-level \"you don't have X\" observations.\n\n**Design principle**: most \"missing automation\" gaps are already covered by higher enforcement levels\n(compiler, analyzers, build-time checks, architecture tests, behavioral rules). Prove a gap exists\nbefore recommending a solution. The default verdict is REJECT, not PASS.\n\n**The enforcement hierarchy** is the rung list in\n[context\u002Fenforcement-ladder.md](context\u002Fenforcement-ladder.md); this skill's selection rule there\nis the strongest rung that covers the concern. A consuming repo's own hierarchy, documented in\n`CLAUDE.md`, in an `AGENTS.md` the session reads natively (in place of or beside a `CLAUDE.md`), or\nin rules files, overrides this default ordering: read and use theirs.\n\nA proposed deterministic check meets the \"Guardrail criterion\" section of that same file before it\nearns a PASS verdict.\n\n## Boundary: no machine-readable hook enumerator\n\nThis skill ships no hook-enumeration mode, by decision. The native `\u002Fhooks` menu already reports the\nharness's resolved set, with each hook's source; a script here would restate that set from the\nsettings files instead of the harness's own resolution, the weaker source. Revisiting the decision\nfirst requires recording a native-surface verdict for `\u002Fhooks` in whatever registry the repository\nkeeps for native-overlap decisions, because whether such a reference should exist is a human's\ncall. This paragraph is a boundary, not a routing verdict.\n\n- **Pointer**: when you need what `\u002Fhooks` lists, or what it shows for a selected hook, fetch\n  [the \u002Fhooks menu](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fhooks#the-\u002Fhooks-menu) live.\n\n## Adapting to your environment (graceful degrade)\n\nWhere a phase names an adjacent capability (a research skill, an implementation-planning skill, a\nwork-item tracker, an outcome verifier), it is optional: use your setup's equivalent if it has one,\nelse follow the inline guidance, which stands on its own. Neighboring questions belong to the\nsibling `audit` skill (are the config FILES correct?) and the `audit` skill in the `harness-memory`\nplugin (is the instruction layer healthy?).\n\nThis skill proposes NEW automation. Whether automation already in place still earns its carry cost\nis owned by `\u002Foverengineering:audit`, whose evidence-earned-keep walk treats every incumbent as a\nretirement candidate until evidence keeps it. Send a retirement question there when the\n`overengineering` plugin is installed; when it is not, the **Already enforced** gate still names the\nmechanism covering a concern, and any retirement observation is recorded in the verdict for the\nhuman, not acted on here.\n\n## Arguments\n\nParse `$ARGUMENTS` for:\n\n- **`--recommend-only`**: Run evaluation phases only, skipping implementation. Default behavior\n- **`--implement`**: After presenting validated recommendations, implement user-chosen items sequentially\n- **Category filter** (`hooks`, `mcp`, `skills`, `subagents`, `scheduled`): Limit to a specific automation type. Default: `all`\n\nThere is deliberately no `ci` category. Two skills own that ground: the `ci-lanes` layer of\n`\u002Foverengineering:audit` judges whether each lane already running still earns its carry cost, and\n`\u002Fcorrections:codify` maps one recurring mistake or review finding to the strongest enforcement rung\nthat can catch it, including a check that runs in CI. Route a CI concern to whichever fits when the\n`overengineering` or `corrections` plugin is installed; when neither is, record the concern in the\nverdict as out of scope and name its owner, rather than widening this audit's categories.\n\n## Track progress\n\nFor any deep-dive run (Phases 1-4), keep a phase checklist and tick each phase and every anti-noise\ndoctrine check as it completes, in-response or in a copy of\n`${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Faudit-automation-gaps\u002Ftemplates\u002Fchecklist.md` wherever the consuming\nrepo keeps working task notes. Phase 4 is SKIPPED in default `--recommend-only` mode.\n\n## Phase 1: Discover Candidates (Self-Generated)\n\nAnalyze the automation landscape directly, with no external recommender dependency.\n\n### 1.1 Inventory Current State\n\nThe pre-computed block already ran\n`bash \"${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Faudit-automation-gaps\u002Fscripts\u002Finventory.sh\"`; re-run it directly\nif that block is missing. It settles the per-scope hook-location counts, the component counts, and\nthe enablement inputs. It leaves three things to you: effective plugin enablement,\nbecause `enabledPlugins` follows precedence rather than the merge that hook entries follow; the\ncontents of any frontmatter `hooks:` block, which it counts but does not parse; and plugins\ninstalled on the machine from outside this repository. Then read:\n\n| What | Source |\n|------|--------|\n| Hooks | Every hook location: user + project + local `settings.json` → `hooks`, managed policy settings when readable, each enabled plugin's `hooks\u002Fhooks.json`, and skill or agent frontmatter `hooks:`. Also record which hook EVENTS you considered: the documented set is far wider than `PreToolUse` and `PostToolUse`, and an event nobody looked at cannot surface a candidate, so a no-gaps hooks verdict names the events it examined |\n| MCP servers | `.mcp.json` + `settings.json` → `disabledMcpjsonServers` |\n| Permissions | `settings.json` → `permissions` (deny\u002Fask\u002Fallow) |\n| Enforcement | Ecosystem-specific build config (`\u003Croot-build-config>`, e.g. `Directory.Build.props` for .NET, `pyproject.toml` for Python, `package.json` for TS\u002FJS), `.editorconfig` (top 20 lines), any enforcement-hierarchy section in the repo's own instruction files |\n| Codebase shape | File counts per language: `find . -name \"*.cs\" \\| wc -l`, same for `.py`, `.ts`, `.sh`, `.ps1` |\n| Incident history | `git log --oneline \\| wc -l` for the denominator, then a `--grep` count for the concern. That count is a CEILING, never a frequency: read a sample before citing one, and carry the match count, the denominator, the sample size and what the sampled commits actually were into the verdict |\n\n### 1.2 Gap Analysis\n\nFor each automation category, check for gaps with the checklists in\n[context\u002Fgap-analysis.md](context\u002Fgap-analysis.md): Hooks (formatter exists? fast enough? higher\nenforcement already covers?), MCP Servers (configured? CLI equivalent? service in use yet?), Skills\n(skill exists? frequency? simpler mechanism?), Subagents (value over hook\u002Fskill? isolation help?\nplugin exists?), Scheduled (tracked in the repo's work-item tracker? Dependabot\u002FCI covers? right\ndurability model?).\n\n### 1.3 Generate Candidate List\n\nProduce a numbered list of candidates, each with category and one-line rationale. Target\n**5-10 candidates**. Cast a wide net and include borderline items: the quality gates filter, and\nrejecting with evidence beats silently excluding.\n\n## Phase 2: Deep-Dive Each Candidate\n\n**Batch the Explore phase** (read all configs once), then evaluate candidates sequentially.\n\n### 2.1 Explore (Local Codebase)\n\nFor each candidate:\n\n- **Read the relevant config\u002Fcode**: the specific files that would be affected\n- **Check the enforcement hierarchy**: walk the ladder's rungs up from the weakest (`automated-review`) to the strongest (`make-impossible`). Stop when you find coverage. Document which level covers it\n- **Check incident history**: `git log --grep` for related problems, then read a sample of the hits.\n  The count is a **ceiling**, not a count of incidents or a frequency. Report the match count, the\n  total commit count, the sample size read, and what the sampled commits actually were\n- **Measure performance**: if the candidate involves a CLI tool as a hook, time it:\n\n```bash\ntime \u003Ctool-command> 2>&1 | tail -5\n```\n\nJudge that measurement against the **consuming repository's own documented hook budget** where one\nexists, and say which source the threshold came from. No upstream latency budget exists, so any\nfixed number this skill supplies is a house rule, labeled as one in the verdict. We judge a\n`PostToolUse` hook's cost as turn latency, never as a blocked call; the record that points at the\nlive per-event blocking table is in hook-timing.md. For the budget-resolution ladder, per-event\ncosts, the documented levers, and the dated upstream-fact records, read\n[context\u002Fhook-timing.md](context\u002Fhook-timing.md).\n\n### 2.2 Research (One Mandatory Batch, Then Conditional)\n\nResearch splits by who owns the fact.\n\n**Mandatory: one batched docs fetch for harness mechanisms.** Any candidate whose mechanism is a\nClaude Code surface gets its harness facts fetched before its verdict, however settled the local\nevidence looks. That covers hook event semantics and what each event can and cannot block,\n`async` and `timeout` behavior, MCP server scope and configuration, and skill, agent or plugin\nfrontmatter fields. Collect every such question across every surviving candidate into ONE fetch\npass. The batch is mandatory because a docs pass routinely reshapes a candidate that local evidence\nhad settled: a per-event exit-code gate can look settled locally while the event's decision\ncontrol upstream says it never fires, which no local reading surfaces.\n\n- **Pointer**: when a candidate gates on a hook event's exit code, fetch that event's decision\n  control live, for example\n  [hooks: PermissionRequest decision control](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fhooks#permissionrequest-decision-control).\n\n**Conditional: facts the harness does not own.** Third-party tool performance, an ecosystem's\nstandard formatter, server stability and auth, known issues in a tool the candidate would run. Fetch\nthese only where the verdict turns on them.\n\n**When a conditional fetch is skipped, record how the fact was settled** in that candidate's\nverdict: the measurement taken, the file read, or the existing dated record relied on. \"Not needed\"\nand \"not done\" must stay distinguishable in the artifact.\n\nGroup related queries to minimize agent count, and run the mandatory batch as one dispatch for all\ncandidates.\n\n**Per-candidate research questions by type:**\n\n| Type | Research Questions |\n|------|-------------------|\n| **Hook** | Tool per-file performance? Ecosystem standard formatter? Known hook compatibility issues? |\n| **MCP Server** | Server stability? Auth requirements? CLI equivalent comparison? Known issues? |\n| **Skill** | Existing solutions? Frequency justification? Similar skills in marketplaces? |\n| **Subagent** | Can a hook\u002Fskill do this more deterministically? Is context isolation needed? |\n| **Scheduled** | Platform requirements (CLI vs Desktop vs cloud)? Durability model? Existing coverage via Dependabot\u002FCI\u002Fwork items? |\n\nVerify Claude Code mechanisms against official docs\n([code.claude.com\u002Fdocs\u002Fen\u002Fhooks](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fhooks),\n[code.claude.com\u002Fdocs\u002Fen\u002Fmcp](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fmcp)); use web search for tool\nperformance and community practices. Research agents gather evidence and state no verdict; the\ngates in 2.3 read that evidence and decide.\n\n### 2.3 Vet \u002F Validate (Quality Gates)\n\nA candidate **fails** if ANY gate triggers.\n\n**Run this gate in a fresh context.** Phase 1 generated these candidates in the context now asked\nto refuse them, and a context that produced work is a biased judge of it. Dispatch a fresh-context\nsubagent with the candidate list, the Phase 2.1 and 2.2 evidence, and this table, and keep the gate\nresults it returns. Where the environment exposes no subagent surface, run the gates inline and say\nin the report that the refusal gate ran in the context that generated the candidates, so the bias\nis visible.\n\n**Verification level.** Before this gate, run `bash \"${CLAUDE_PLUGIN_ROOT}\u002Flib\u002Fread-verification.sh\" --plugin harness-config --skill audit-automation-gaps`\nand copy its line into the report ([levels](https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fdocs\u002Fcontracts\u002Fverification-level\u002FREADME.md)).\n`standard` and `strict` are the paragraph above. Under `light`, and `off`, which acts as `light`\nhere, dispatch neither this gate nor the Phase 4 step 6 reviewer, and never run either inline in\nits place: write `verification: skipped (\u003Clevel>)` where the gate results or the review would go.\nThe gate's verdict is this audit's product, so each candidate is listed as `unverified`, never\n`PASS`, `CONDITIONAL` or `REJECT`, and none is persisted for `--implement`.\n\n| Gate | Condition | Evidence Required |\n|------|-----------|-------------------|\n| **Already enforced** | A higher enforcement hierarchy level covers it, and the shift-left carve-out below does not apply | Name the level and mechanism; where the candidate claims the carve-out, the result of each of its three conjuncts |\n| **Too slow** | Measured cost exceeds the resolved budget ([context\u002Fhook-timing.md](context\u002Fhook-timing.md)) for the event's actual cost: a blocked call on a blocking event, turn latency on `PostToolUse` | Timing measurement + the budget it was judged against and that budget's source |\n| **Not scriptable** | The mechanism can't be automated with available tools | Specific limitation cited |\n| **Zero incidents** | A read sample of the matching commits shows the problem has never occurred. A `--grep` count alone never triggers this gate, in either direction | Keyword match count, total commit count, the sample size read, and what the sampled commits turned out to be |\n| **Already exists** | A skill, behavioral rule, or convention already handles it | File path and line |\n| **YAGNI** | Low frequency (\u003C5% of commits) AND low severity, where the frequency is sampled rather than counted | The match count over total commits as the ceiling; plus a sampled frequency whenever that ceiling is 5% or higher, and none when it is already below |\n| **Platform mismatch** | Requires infrastructure the user doesn't have | Platform requirement cited |\n| **Premature** | Depends on unfinished work (planned database, future CI) | What's missing cited |\n\n#### Incident counts are ceilings\n\n**Zero incidents** and **YAGNI** both read a `git log --grep` count, and that count is an upper\nbound on the concern, not a measure of it: it counts commits whose message mentions a word. On this\nmarketplace at merged main `49912c63`, `secret|gitleaks` matched 209 of 2202 commits while the first\n15 read were dependency bumps, component syncs and CI pins, with no leaked secret among them, and\n`markdownlint|lint` matched 1128, about 51%. Cite a frequency only after reading a sample and saying\nwhat the sampled commits were.\n\nThe discipline is asymmetric, which keeps it cheap. A ceiling already below the 5% **YAGNI**\nthreshold settles that gate on its own, because the true frequency cannot exceed the ceiling. Only\na PASS, or an affirmative claim that the concern is frequent, has to pay for a sample.\n\n#### Shift-left carve-out to Already enforced\n\nA candidate that deliberately duplicates a check a higher rung already runs, at edit time, is not\nrejected by **Already enforced** alone. Duplication earns a hearing only when all three conjuncts\nbelow hold, each stated with its evidence. Any conjunct that cannot produce its evidence fails, and\nthe candidate returns to REJECT. The carve-out changes which gate decides, never the REJECT-by-\ndefault posture: a candidate that clears all three is handed to **Too slow** and the remaining\ngates, not passed.\n\n1. **Sampled frequency, never incident history.** The concern clears **Zero incidents** and\n   **YAGNI** on a count sampled from the current tree, not from `git log`. A check the higher rung\n   already runs suppresses its own incidents, so zero incidents in history is evidence about the\n   incumbent check, not about the concern. Sample instead: run the check over a stated N of files\n   or of recent edits and report hits over that N. Falsified when the sampled hit rate is under\n   5 percent, which is the **YAGNI** threshold read against the sampled denominator. State N and\n   the hit count, so the arithmetic is checkable rather than asserted.\n2. **Placed where the check-placement rubric puts it.** A report-only duplicate (one that only\n   prints findings) goes in a git `pre-commit` hook that blocks the commit on findings in changed\n   lines, or `pre-push` when its measured run is over the commit budget but within 60 s, never in\n   a per-edit `PostToolUse` hook; a formatter duplicate may also rewrite once per batch from\n   `PostToolBatch`, sending the model nothing. CI keeps re-running the check on the change.\n   Falsified by a per-edit hook that sends findings to the model, a Claude Code hook that blocks a\n   tool call to enforce a report-only check, or documentation presenting the local hook as a\n   replacement for the CI check. The rubric is this marketplace's house rule, not upstream\n   guidance: [check-placement](https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fdocs\u002Fcontracts\u002Fcheck-placement\u002FREADME.md#the-rubric).\n3. **Fits the remaining budget, as a hard gate.** Resolve the budget through the two-rung ladder in\n   [context\u002Fhook-timing.md](context\u002Fhook-timing.md), then report four things: the measurement, the\n   budget row judged against, which rung supplied it, and the headroom arithmetic. Falsified when\n   the measured cost exceeds the stated headroom. Where the consuming repository documents a budget\n   and its own accounting records no headroom on that row, the verdict is REJECT at **Too slow**\n   whatever conjuncts 1 and 2 returned; the carve-out does not reopen a budget the consumer says is\n   already overspent.\n\nWhy the carve-out is scoped this narrowly: the hooks documentation states that hooks give\n\"deterministic control: certain actions always happen rather than relying on the LLM to choose to\nrun them\", which supports duplicating a check so it runs deterministically for every author. It\nsays nothing about whether a check belongs in CI or in a hook, so no latency or placement argument\nmay be offered as an upstream one. The record for both facts:\n\n| Claim | Basis | As of | Recheck trigger |\n|---|---|---|---|\n| Hooks exist to give deterministic control, so certain actions always happen rather than relying on the LLM to choose to run them | [Automate actions with hooks](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fhooks-guide), opening paragraph | 2026-09-13 | A re-fetch finds the opening statement of purpose no longer matching this row |\n| No official page addresses whether a check belongs in CI or in a hook | Absence record in [context\u002Fhook-timing.md](context\u002Fhook-timing.md), upstream-fact records | 2026-09-12 | That record's own trigger fires |\n\nThese gates answer *should* we mechanize. Whether a candidate *can* be, and how far up the hierarchy\nit climbs, is a separate enforceability question: the **Not scriptable** gate maps to concerns no\nhook type reaches, **Already enforced** to a deterministic finding already escalated. `prompt` and\n`agent` hooks do evaluate reasoning-only concerns.\n\n- **Pointer**: before proposing a `prompt` or `agent` hook, fetch its status and fields live at\n  [hooks: prompt and agent hook fields](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fhooks#prompt-and-agent-hook-fields).\n\nProduce a verdict per candidate:\n\n- **PASS**: clears all gates, provides genuine value\n- **CONDITIONAL**: value exists but only under specific conditions (document the condition)\n- **REJECT**: fails one or more gates (cite which gates and evidence)\n\n## Phase 3: Present Results\n\n### Summary Table\n\n```markdown\n| # | ID | Candidate | Category | Verdict | Key Evidence |\n|---|----|-----------|----------|---------|--------------|\n| 1 | h1 | ... | hooks | REJECT | [gate]: [evidence] |\n| 2 | s1 | ... | skills | PASS | No existing coverage, [n] of [total] commits, [k] sampled |\n```\n\n`ID` is a short stable token for the candidate, and `Category` is one of `hooks`, `mcp`, `skills`,\n`subagents`, `scheduled`. Both are what the persisted artifact is keyed and filtered by, so a row\nwithout them cannot be written back or read by `--implement`.\n\n### Detailed Verdicts\n\nFor each candidate, provide:\n\n- **Verdict** with gate results\n- **Evidence** (timing data, git history counts, enforcement mechanisms found)\n- **For PASS\u002FCONDITIONAL**: implementation plan (files to change, size, test strategy).\n  A `PASS` or `CONDITIONAL` without a plan cannot be persisted, because the plan is precisely what\n  `--implement` reads back in a later session\n\n**Size.** Resolve `time_units` once, lowest layer first: the default `false`; the user's option,\n`${user_config.time_units}` (empty or a literal, unexpanded placeholder means unset); and the\n`time_units` key of `\u003Chome>\u002Fharness-config.yaml`, which wins when set. `\u003Chome>` is what\n`bash \"${CLAUDE_PLUGIN_ROOT}\u002Flib\u002Fresolve-convention-home.sh\"` prints, else `docs\u002Fconventions`; its\nexit 5 (the root is `$HOME`, an ancestor of it, or not a git working tree) skips that layer, and a\nmissing file or key leaves it unset. A value other than a bare `true` or `false` is named with its\nfile or option, the key and the value, and that layer is dropped: a valid repository value still\nwins over an invalid user value, and an invalid repository value resolves `false`, never the\nuser's value.\n\nOnly a resolved `true` turns it on. State the resolved value, `on` or `off`, and the layer that\nsupplied it at the top of the report.\n\n- **Off:** Small, Medium or Large, with what makes it that size (files, moving parts, unknowns).\n- **On:** an estimate in minutes, hours, days, weeks or a named span such as an afternoon, with\n  what makes it that size.\n\nEither way, a time budget the user states is quoted in the user's words.\n\n**Order by value\u002Fimpact**, highest value first. Value = frequency × severity × ease of implementation.\n\n### Maturity Assessment\n\nEnd with a one-paragraph assessment of the repo's automation maturity: what's well-covered, the\ngenuine gaps (if any), and whether the automation investment fits the project stage.\n\nIf items pass: \"Which items would you like to implement? I'll work through them sequentially.\"\n\nIf no items pass: State that clearly. A clean bill of health is a valid outcome.\n\n### Persist the findings\n\nWrite twice, because the selection does not exist yet when the verdicts do.\n\nWrite once as soon as the verdicts are presented, so an audit is never lost to a session that ends\nat the question above. Every candidate carries `approved: false` at this point, which is true: the\nhuman has not chosen yet.\n\nWrite again once the human answers, with `approved: true` on the candidates they picked. Run ids\nare suffixed rather than overwritten and `read` serves the newest run, so the second write is what\na later `--implement` sees, and the first survives as the record of what the audit actually found.\nSkip the second write only when nothing passed, since there is then nothing to select.\n\n```bash\nbash \"${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Faudit-automation-gaps\u002Fscripts\u002Ffindings-state.sh\" write \\\n  --plugin-data \"${CLAUDE_PLUGIN_DATA}\" --findings \u003Cfile-or-->\n```\n\nWe pass `${CLAUDE_PLUGIN_DATA}` as that argument rather than relying on the shell to have it; the\nscript exits 2 rather than guessing when it is missing.\n\n- **Pointer**: when deciding how a script receives a plugin path variable, fetch\n  [plugins manifest reference: where each variable resolves](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fplugins\u002Fmanifest-reference#where-each-variable-resolves)\n  live.\n- **Recheck trigger**: that section starts exporting the variable to commands run through the Bash\n  tool.\n\nThe payload is exactly one JSON object with a `candidates` array, each entry carrying\n`id`, `candidate`, `category`, `verdict`, an `evidence` array, and a `plan` object on any `PASS` or\n`CONDITIONAL`. Each entry also carries `approved`, the boolean that records the human's selection.\nA malformed payload, or a stream carrying more than one document, exits 3 and writes nothing,\nlisting every problem at once.\n\nWrites are all or nothing. A run id already taken is reserved under the next free suffix rather than\noverwritten, so two runs racing for one id both survive and each is told the id it actually got.\n\nFindings are keyed per project, so one checkout never reads another's verdicts. This tree is the\nonly durable copy, and an uninstall can delete it.\n\n- **Pointer**: when deciding whether the findings survive an uninstall, fetch\n  [plugins CLI reference: what an uninstall deletes and keeps](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fplugins\u002Fcli-reference#what-an-uninstall-deletes-and-keeps)\n  live.\n\n## Phase 4: Implement (if `--implement` or user requests)\n\nRecover the prior run's verdicts first, rather than re-deriving them:\n\n```bash\nbash \"${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Faudit-automation-gaps\u002Fscripts\u002Ffindings-state.sh\" read \\\n  --plugin-data \"${CLAUDE_PLUGIN_DATA}\"\n```\n\nThat serves this project's newest run. Implement the candidates whose `approved` is `true`. Where\nno candidate carries `approved: true`, the stored run predates the human's selection, so ask which\nitems to implement rather than treating every passing candidate as chosen: a `PASS` verdict is this\nskill's judgment, not the operator's consent.\n\nExit 4 means this project has no stored run, which is the cue to audit first rather than to\nimplement from memory; the script never falls back to another project's artifact. Exit 5 is the different answer: stored state exists but cannot be trusted,\nbecause a file is unreadable or a previous write half landed. Treat 5 as a state to repair or\nre-audit, never as an absence, and say which of the two you got. `list` shows the earlier runs when\na specific one is wanted.\n\nFor each user-selected item:\n\n1. **Explore**: re-read current state (may have changed since evaluation)\n2. **Research + Validate**: verify the implementation approach against current docs. The audit\n   already ran one batched fetch for Claude Code surfaces in Phase 2.2, so re-fetch only what the\n   stored evidence does not already settle, or what has plausibly moved since the run was written.\n   For a mod, load the built-in `plugin-authoring` skill before planning: its type declarations\n   are the authority for the running build, and they win where a docs page disagrees\n3. **Plan**: detailed implementation steps\n4. **Implement**: execute with incremental validation and commit checkpoints\n5. **Test**: verify the automation works (run hooks, test skills, etc.)\n6. **Review**: dispatch a fresh-context reviewer to check the change against existing patterns,\n   since the context that wrote it is a biased judge of it. It lists only problems that should\n   block the change, each with file and line, why it is wrong, and how to show it fails. Where no subagent surface exists,\n   review inline and record that the review was same-context. Under a `light` or `off`\n   verification level (2.3), dispatch no reviewer and review nothing inline: write\n   `verification: skipped (\u003Clevel>)` in the review's place\n7. **Verify**: build\u002Ftest the repo if code changed, confirm no regressions\n\nRoute steps 2-7 through the consuming environment's own workflow skills when it has them; the inline\nsteps stand on their own otherwise.\n\n## Quality Principles\n\nPrinciples that govern every verdict:\n\n1. **The enforcement hierarchy is your first check.** Most \"gaps\" are covered by the compiler-through-git-hooks levels\n2. **Measure, don't assume.** Time every tool before recommending it as a hook. A formatter looks perfect until you measure 15+ seconds per file\n3. **Check incident history, then read it.** Zero incidents across 100+ commits is strong evidence the problem doesn't exist in practice, but a `git log --grep` count is a ceiling, and a check a higher rung already runs suppresses its own incidents\n4. **Behavioral rules are valid enforcement.** A rule in CLAUDE.md, or in a natively read AGENTS.md, is legitimate coverage; not everything needs a hook or script\n5. **YAGNI is a quality gate, not laziness.** Automation for a task at 4% frequency is premature\n6. **Premature is worse than missing.** Adding a database MCP before a database exists, or scheduling before CI exists, creates maintenance burden for zero value\n7. **A clean bill of health is a valid outcome.** Not finding gaps means the automation is mature; don't manufacture recommendations to justify the audit\n\n## Next\n\n- Candidates passed and are ready to build: `\u002Fplanning:plan`.\n- Candidates passed and need slicing into grabbable tickets first: `\u002Fwork-items:decompose`.\n- The run raised a question about automation already in place: `\u002Foverengineering:audit`.\n- A verdict is worth revisiting later rather than acting on now: `\u002Fwork-items:track add`.\n\n## Gotchas\n\nFive failure modes this skill has produced, each with its evidence and dated upstream records: a partial inventory anchoring every later verdict, keyword counts read as\nfrequencies, `PostToolUse` candidates phrased as gates, an `exit 2` gate on `PermissionRequest` that\nis silently inert, and a candidate generator that reaches four of the\n[documented hook events](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fhooks#hook-events).\nRead [context\u002Fgotchas.md](context\u002Fgotchas.md) before any run whose verdicts a human will act on.\n","**Arguments.** `[--recommend-only] [--implement] [hooks|mcp|skills|subagents|scheduled|all]`. default: all\n\n## Pre-computed context\n\nAutomation inventory: !`bash \"${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Faudit-automation-gaps\u002Fscripts\u002Finventory.sh\" 2>\u002Fdev\u002Fnull || echo \"inventory unavailable\"`\n\nThat block counts files present separately from handlers registered, and marks a scope it could\nnot read as `unreadable`, not zero. Treat it as a starting point, never a finding. Re-derive any\ncount a verdict leans on; where your count disagrees with the block, report both and say which the\nverdict used. A partial inventory that reads as complete is this skill's recorded failure: see\n[context\u002Fgotchas.md](context\u002Fgotchas.md).\n\n## Purpose\n\nFind evidence-backed automation gaps, where no mechanism in the enforcement hierarchy covers the\nconcern, not surface-level \"you don't have X\" observations.\n\n**Design principle**: most \"missing automation\" gaps are already covered by higher enforcement levels\n(compiler, analyzers, build-time checks, architecture tests, behavioral rules). Prove a gap exists\nbefore recommending a solution. The default verdict is REJECT, not PASS.\n\n**The enforcement hierarchy** is the rung list in\n[context\u002Fenforcement-ladder.md](context\u002Fenforcement-ladder.md); this skill's selection rule there\nis the strongest rung that covers the concern. A consuming repo's own hierarchy, documented in\n`CLAUDE.md`, in an `AGENTS.md` the session reads natively (in place of or beside a `CLAUDE.md`), or\nin rules files, overrides this default ordering: read and use theirs.\n\nA proposed deterministic check meets the \"Guardrail criterion\" section of that same file before it\nearns a PASS verdict.\n\n## Boundary: no machine-readable hook enumerator\n\nThis skill ships no hook-enumeration mode, by decision. The native `\u002Fhooks` menu already reports the\nharness's resolved set, with each hook's source; a script here would restate that set from the\nsettings files instead of the harness's own resolution, the weaker source. Revisiting the decision\nfirst requires recording a native-surface verdict for `\u002Fhooks` in whatever registry the repository\nkeeps for native-overlap decisions, because whether such a reference should exist is a human's\ncall. This paragraph is a boundary, not a routing verdict.\n\n- **Pointer**: when you need what `\u002Fhooks` lists, or what it shows for a selected hook, fetch\n  [the \u002Fhooks menu](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fhooks#the-\u002Fhooks-menu) live.\n\n## Adapting to your environment (graceful degrade)\n\nWhere a phase names an adjacent capability (a research skill, an implementation-planning skill, a\nwork-item tracker, an outcome verifier), it is optional: use your setup's equivalent if it has one,\nelse follow the inline guidance, which stands on its own. Neighboring questions belong to the\nsibling `audit` skill (are the config FILES correct?) and the `audit` skill in the `harness-memory`\nplugin (is the instruction layer healthy?).\n\nThis skill proposes NEW automation. Whether automation already in place still earns its carry cost\nis owned by `\u002Foverengineering:audit`, whose evidence-earned-keep walk treats every incumbent as a\nretirement candidate until evidence keeps it. Send a retirement question there when the\n`overengineering` plugin is installed; when it is not, the **Already enforced** gate still names the\nmechanism covering a concern, and any retirement observation is recorded in the verdict for the\nhuman, not acted on here.\n\n## Arguments\n\nParse `$ARGUMENTS` for:\n\n- **`--recommend-only`**: Run evaluation phases only, skipping implementation. Default behavior\n- **`--implement`**: After presenting validated recommendations, implement user-chosen items sequentially\n- **Category filter** (`hooks`, `mcp`, `skills`, `subagents`, `scheduled`): Limit to a specific automation type. Default: `all`\n\nThere is deliberately no `ci` category. Two skills own that ground: the `ci-lanes` layer of\n`\u002Foverengineering:audit` judges whether each lane already running still earns its carry cost, and\n`\u002Fcorrections:codify` maps one recurring mistake or review finding to the strongest enforcement rung\nthat can catch it, including a check that runs in CI. Route a CI concern to whichever fits when the\n`overengineering` or `corrections` plugin is installed; when neither is, record the concern in the\nverdict as out of scope and name its owner, rather than widening this audit's categories.\n\n## Track progress\n\nFor any deep-dive run (Phases 1-4), keep a phase checklist and tick each phase and every anti-noise\ndoctrine check as it completes, in-response or in a copy of\n`${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Faudit-automation-gaps\u002Ftemplates\u002Fchecklist.md` wherever the consuming\nrepo keeps working task notes. Phase 4 is SKIPPED in default `--recommend-only` mode.\n\n## Phase 1: Discover Candidates (Self-Generated)\n\nAnalyze the automation landscape directly, with no external recommender dependency.\n\n### 1.1 Inventory Current State\n\nThe pre-computed block already ran\n`bash \"${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Faudit-automation-gaps\u002Fscripts\u002Finventory.sh\"`; re-run it directly\nif that block is missing. It settles the per-scope hook-location counts, the component counts, and\nthe enablement inputs. It leaves three things to you: effective plugin enablement,\nbecause `enabledPlugins` follows precedence rather than the merge that hook entries follow; the\ncontents of any frontmatter `hooks:` block, which it counts but does not parse; and plugins\ninstalled on the machine from outside this repository. Then read:\n\n| What | Source |\n|------|--------|\n| Hooks | Every hook location: user + project + local `settings.json` → `hooks`, managed policy settings when readable, each enabled plugin's `hooks\u002Fhooks.json`, and skill or agent frontmatter `hooks:`. Also record which hook EVENTS you considered: the documented set is far wider than `PreToolUse` and `PostToolUse`, and an event nobody looked at cannot surface a candidate, so a no-gaps hooks verdict names the events it examined |\n| MCP servers | `.mcp.json` + `settings.json` → `disabledMcpjsonServers` |\n| Permissions | `settings.json` → `permissions` (deny\u002Fask\u002Fallow) |\n| Enforcement | Ecosystem-specific build config (`\u003Croot-build-config>`, e.g. `Directory.Build.props` for .NET, `pyproject.toml` for Python, `package.json` for TS\u002FJS), `.editorconfig` (top 20 lines), any enforcement-hierarchy section in the repo's own instruction files |\n| Codebase shape | File counts per language: `find . -name \"*.cs\" \\| wc -l`, same for `.py`, `.ts`, `.sh`, `.ps1` |\n| Incident history | `git log --oneline \\| wc -l` for the denominator, then a `--grep` count for the concern. That count is a CEILING, never a frequency: read a sample before citing one, and carry the match count, the denominator, the sample size and what the sampled commits actually were into the verdict |\n\n### 1.2 Gap Analysis\n\nFor each automation category, check for gaps with the checklists in\n[context\u002Fgap-analysis.md](context\u002Fgap-analysis.md): Hooks (formatter exists? fast enough? higher\nenforcement already covers?), MCP Servers (configured? CLI equivalent? service in use yet?), Skills\n(skill exists? frequency? simpler mechanism?), Subagents (value over hook\u002Fskill? isolation help?\nplugin exists?), Scheduled (tracked in the repo's work-item tracker? Dependabot\u002FCI covers? right\ndurability model?).\n\n### 1.3 Generate Candidate List\n\nProduce a numbered list of candidates, each with category and one-line rationale. Target\n**5-10 candidates**. Cast a wide net and include borderline items: the quality gates filter, and\nrejecting with evidence beats silently excluding.\n\n## Phase 2: Deep-Dive Each Candidate\n\n**Batch the Explore phase** (read all configs once), then evaluate candidates sequentially.\n\n### 2.1 Explore (Local Codebase)\n\nFor each candidate:\n\n- **Read the relevant config\u002Fcode**: the specific files that would be affected\n- **Check the enforcement hierarchy**: walk the ladder's rungs up from the weakest (`automated-review`) to the strongest (`make-impossible`). Stop when you find coverage. Document which level covers it\n- **Check incident history**: `git log --grep` for related problems, then read a sample of the hits.\n  The count is a **ceiling**, not a count of incidents or a frequency. Report the match count, the\n  total commit count, the sample size read, and what the sampled commits actually were\n- **Measure performance**: if the candidate involves a CLI tool as a hook, time it:\n\n```bash\ntime \u003Ctool-command> 2>&1 | tail -5\n```\n\nJudge that measurement against the **consuming repository's own documented hook budget** where one\nexists, and say which source the threshold came from. No upstream latency budget exists, so any\nfixed number this skill supplies is a house rule, labeled as one in the verdict. We judge a\n`PostToolUse` hook's cost as turn latency, never as a blocked call; the record that points at the\nlive per-event blocking table is in hook-timing.md. For the budget-resolution ladder, per-event\ncosts, the documented levers, and the dated upstream-fact records, read\n[context\u002Fhook-timing.md](context\u002Fhook-timing.md).\n\n### 2.2 Research (One Mandatory Batch, Then Conditional)\n\nResearch splits by who owns the fact.\n\n**Mandatory: one batched docs fetch for harness mechanisms.** Any candidate whose mechanism is a\nClaude Code surface gets its harness facts fetched before its verdict, however settled the local\nevidence looks. That covers hook event semantics and what each event can and cannot block,\n`async` and `timeout` behavior, MCP server scope and configuration, and skill, agent or plugin\nfrontmatter fields. Collect every such question across every surviving candidate into ONE fetch\npass. The batch is mandatory because a docs pass routinely reshapes a candidate that local evidence\nhad settled: a per-event exit-code gate can look settled locally while the event's decision\ncontrol upstream says it never fires, which no local reading surfaces.\n\n- **Pointer**: when a candidate gates on a hook event's exit code, fetch that event's decision\n  control live, for example\n  [hooks: PermissionRequest decision control](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fhooks#permissionrequest-decision-control).\n\n**Conditional: facts the harness does not own.** Third-party tool performance, an ecosystem's\nstandard formatter, server stability and auth, known issues in a tool the candidate would run. Fetch\nthese only where the verdict turns on them.\n\n**When a conditional fetch is skipped, record how the fact was settled** in that candidate's\nverdict: the measurement taken, the file read, or the existing dated record relied on. \"Not needed\"\nand \"not done\" must stay distinguishable in the artifact.\n\nGroup related queries to minimize agent count, and run the mandatory batch as one dispatch for all\ncandidates.\n\n**Per-candidate research questions by type:**\n\n| Type | Research Questions |\n|------|-------------------|\n| **Hook** | Tool per-file performance? Ecosystem standard formatter? Known hook compatibility issues? |\n| **MCP Server** | Server stability? Auth requirements? CLI equivalent comparison? Known issues? |\n| **Skill** | Existing solutions? Frequency justification? Similar skills in marketplaces? |\n| **Subagent** | Can a hook\u002Fskill do this more deterministically? Is context isolation needed? |\n| **Scheduled** | Platform requirements (CLI vs Desktop vs cloud)? Durability model? Existing coverage via Dependabot\u002FCI\u002Fwork items? |\n\nVerify Claude Code mechanisms against official docs\n([code.claude.com\u002Fdocs\u002Fen\u002Fhooks](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fhooks),\n[code.claude.com\u002Fdocs\u002Fen\u002Fmcp](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fmcp)); use web search for tool\nperformance and community practices. Research agents gather evidence and state no verdict; the\ngates in 2.3 read that evidence and decide.\n\n### 2.3 Vet \u002F Validate (Quality Gates)\n\nA candidate **fails** if ANY gate triggers.\n\n**Run this gate in a fresh context.** Phase 1 generated these candidates in the context now asked\nto refuse them, and a context that produced work is a biased judge of it. Dispatch a fresh-context\nsubagent with the candidate list, the Phase 2.1 and 2.2 evidence, and this table, and keep the gate\nresults it returns. Where the environment exposes no subagent surface, run the gates inline and say\nin the report that the refusal gate ran in the context that generated the candidates, so the bias\nis visible.\n\n**Verification level.** Before this gate, run `bash \"${CLAUDE_PLUGIN_ROOT}\u002Flib\u002Fread-verification.sh\" --plugin harness-config --skill audit-automation-gaps`\nand copy its line into the report ([levels](https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fdocs\u002Fcontracts\u002Fverification-level\u002FREADME.md)).\n`standard` and `strict` are the paragraph above. Under `light`, and `off`, which acts as `light`\nhere, dispatch neither this gate nor the Phase 4 step 6 reviewer, and never run either inline in\nits place: write `verification: skipped (\u003Clevel>)` where the gate results or the review would go.\nThe gate's verdict is this audit's product, so each candidate is listed as `unverified`, never\n`PASS`, `CONDITIONAL` or `REJECT`, and none is persisted for `--implement`.\n\n| Gate | Condition | Evidence Required |\n|------|-----------|-------------------|\n| **Already enforced** | A higher enforcement hierarchy level covers it, and the shift-left carve-out below does not apply | Name the level and mechanism; where the candidate claims the carve-out, the result of each of its three conjuncts |\n| **Too slow** | Measured cost exceeds the resolved budget ([context\u002Fhook-timing.md](context\u002Fhook-timing.md)) for the event's actual cost: a blocked call on a blocking event, turn latency on `PostToolUse` | Timing measurement + the budget it was judged against and that budget's source |\n| **Not scriptable** | The mechanism can't be automated with available tools | Specific limitation cited |\n| **Zero incidents** | A read sample of the matching commits shows the problem has never occurred. A `--grep` count alone never triggers this gate, in either direction | Keyword match count, total commit count, the sample size read, and what the sampled commits turned out to be |\n| **Already exists** | A skill, behavioral rule, or convention already handles it | File path and line |\n| **YAGNI** | Low frequency (\u003C5% of commits) AND low severity, where the frequency is sampled rather than counted | The match count over total commits as the ceiling; plus a sampled frequency whenever that ceiling is 5% or higher, and none when it is already below |\n| **Platform mismatch** | Requires infrastructure the user doesn't have | Platform requirement cited |\n| **Premature** | Depends on unfinished work (planned database, future CI) | What's missing cited |\n\n#### Incident counts are ceilings\n\n**Zero incidents** and **YAGNI** both read a `git log --grep` count, and that count is an upper\nbound on the concern, not a measure of it: it counts commits whose message mentions a word. On this\nmarketplace at merged main `49912c63`, `secret|gitleaks` matched 209 of 2202 commits while the first\n15 read were dependency bumps, component syncs and CI pins, with no leaked secret among them, and\n`markdownlint|lint` matched 1128, about 51%. Cite a frequency only after reading a sample and saying\nwhat the sampled commits were.\n\nThe discipline is asymmetric, which keeps it cheap. A ceiling already below the 5% **YAGNI**\nthreshold settles that gate on its own, because the true frequency cannot exceed the ceiling. Only\na PASS, or an affirmative claim that the concern is frequent, has to pay for a sample.\n\n#### Shift-left carve-out to Already enforced\n\nA candidate that deliberately duplicates a check a higher rung already runs, at edit time, is not\nrejected by **Already enforced** alone. Duplication earns a hearing only when all three conjuncts\nbelow hold, each stated with its evidence. Any conjunct that cannot produce its evidence fails, and\nthe candidate returns to REJECT. The carve-out changes which gate decides, never the REJECT-by-\ndefault posture: a candidate that clears all three is handed to **Too slow** and the remaining\ngates, not passed.\n\n1. **Sampled frequency, never incident history.** The concern clears **Zero incidents** and\n   **YAGNI** on a count sampled from the current tree, not from `git log`. A check the higher rung\n   already runs suppresses its own incidents, so zero incidents in history is evidence about the\n   incumbent check, not about the concern. Sample instead: run the check over a stated N of files\n   or of recent edits and report hits over that N. Falsified when the sampled hit rate is under\n   5 percent, which is the **YAGNI** threshold read against the sampled denominator. State N and\n   the hit count, so the arithmetic is checkable rather than asserted.\n2. **Placed where the check-placement rubric puts it.** A report-only duplicate (one that only\n   prints findings) goes in a git `pre-commit` hook that blocks the commit on findings in changed\n   lines, or `pre-push` when its measured run is over the commit budget but within 60 s, never in\n   a per-edit `PostToolUse` hook; a formatter duplicate may also rewrite once per batch from\n   `PostToolBatch`, sending the model nothing. CI keeps re-running the check on the change.\n   Falsified by a per-edit hook that sends findings to the model, a Claude Code hook that blocks a\n   tool call to enforce a report-only check, or documentation presenting the local hook as a\n   replacement for the CI check. The rubric is this marketplace's house rule, not upstream\n   guidance: [check-placement](https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fdocs\u002Fcontracts\u002Fcheck-placement\u002FREADME.md#the-rubric).\n3. **Fits the remaining budget, as a hard gate.** Resolve the budget through the two-rung ladder in\n   [context\u002Fhook-timing.md](context\u002Fhook-timing.md), then report four things: the measurement, the\n   budget row judged against, which rung supplied it, and the headroom arithmetic. Falsified when\n   the measured cost exceeds the stated headroom. Where the consuming repository documents a budget\n   and its own accounting records no headroom on that row, the verdict is REJECT at **Too slow**\n   whatever conjuncts 1 and 2 returned; the carve-out does not reopen a budget the consumer says is\n   already overspent.\n\nWhy the carve-out is scoped this narrowly: the hooks documentation states that hooks give\n\"deterministic control: certain actions always happen rather than relying on the LLM to choose to\nrun them\", which supports duplicating a check so it runs deterministically for every author. It\nsays nothing about whether a check belongs in CI or in a hook, so no latency or placement argument\nmay be offered as an upstream one. The record for both facts:\n\n| Claim | Basis | As of | Recheck trigger |\n|---|---|---|---|\n| Hooks exist to give deterministic control, so certain actions always happen rather than relying on the LLM to choose to run them | [Automate actions with hooks](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fhooks-guide), opening paragraph | 2026-09-13 | A re-fetch finds the opening statement of purpose no longer matching this row |\n| No official page addresses whether a check belongs in CI or in a hook | Absence record in [context\u002Fhook-timing.md](context\u002Fhook-timing.md), upstream-fact records | 2026-09-12 | That record's own trigger fires |\n\nThese gates answer *should* we mechanize. Whether a candidate *can* be, and how far up the hierarchy\nit climbs, is a separate enforceability question: the **Not scriptable** gate maps to concerns no\nhook type reaches, **Already enforced** to a deterministic finding already escalated. `prompt` and\n`agent` hooks do evaluate reasoning-only concerns.\n\n- **Pointer**: before proposing a `prompt` or `agent` hook, fetch its status and fields live at\n  [hooks: prompt and agent hook fields](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fhooks#prompt-and-agent-hook-fields).\n\nProduce a verdict per candidate:\n\n- **PASS**: clears all gates, provides genuine value\n- **CONDITIONAL**: value exists but only under specific conditions (document the condition)\n- **REJECT**: fails one or more gates (cite which gates and evidence)\n\n## Phase 3: Present Results\n\n### Summary Table\n\n```markdown\n| # | ID | Candidate | Category | Verdict | Key Evidence |\n|---|----|-----------|----------|---------|--------------|\n| 1 | h1 | ... | hooks | REJECT | [gate]: [evidence] |\n| 2 | s1 | ... | skills | PASS | No existing coverage, [n] of [total] commits, [k] sampled |\n```\n\n`ID` is a short stable token for the candidate, and `Category` is one of `hooks`, `mcp`, `skills`,\n`subagents`, `scheduled`. Both are what the persisted artifact is keyed and filtered by, so a row\nwithout them cannot be written back or read by `--implement`.\n\n### Detailed Verdicts\n\nFor each candidate, provide:\n\n- **Verdict** with gate results\n- **Evidence** (timing data, git history counts, enforcement mechanisms found)\n- **For PASS\u002FCONDITIONAL**: implementation plan (files to change, size, test strategy).\n  A `PASS` or `CONDITIONAL` without a plan cannot be persisted, because the plan is precisely what\n  `--implement` reads back in a later session\n\n**Size.** Resolve `time_units` once, lowest layer first: the default `false`; the user's option,\n`${user_config.time_units}` (empty or a literal, unexpanded placeholder means unset); and the\n`time_units` key of `\u003Chome>\u002Fharness-config.yaml`, which wins when set. `\u003Chome>` is what\n`bash \"${CLAUDE_PLUGIN_ROOT}\u002Flib\u002Fresolve-convention-home.sh\"` prints, else `docs\u002Fconventions`; its\nexit 5 (the root is `$HOME`, an ancestor of it, or not a git working tree) skips that layer, and a\nmissing file or key leaves it unset. A value other than a bare `true` or `false` is named with its\nfile or option, the key and the value, and that layer is dropped: a valid repository value still\nwins over an invalid user value, and an invalid repository value resolves `false`, never the\nuser's value.\n\nOnly a resolved `true` turns it on. State the resolved value, `on` or `off`, and the layer that\nsupplied it at the top of the report.\n\n- **Off:** Small, Medium or Large, with what makes it that size (files, moving parts, unknowns).\n- **On:** an estimate in minutes, hours, days, weeks or a named span such as an afternoon, with\n  what makes it that size.\n\nEither way, a time budget the user states is quoted in the user's words.\n\n**Order by value\u002Fimpact**, highest value first. Value = frequency × severity × ease of implementation.\n\n### Maturity Assessment\n\nEnd with a one-paragraph assessment of the repo's automation maturity: what's well-covered, the\ngenuine gaps (if any), and whether the automation investment fits the project stage.\n\nIf items pass: \"Which items would you like to implement? I'll work through them sequentially.\"\n\nIf no items pass: State that clearly. A clean bill of health is a valid outcome.\n\n### Persist the findings\n\nWrite twice, because the selection does not exist yet when the verdicts do.\n\nWrite once as soon as the verdicts are presented, so an audit is never lost to a session that ends\nat the question above. Every candidate carries `approved: false` at this point, which is true: the\nhuman has not chosen yet.\n\nWrite again once the human answers, with `approved: true` on the candidates they picked. Run ids\nare suffixed rather than overwritten and `read` serves the newest run, so the second write is what\na later `--implement` sees, and the first survives as the record of what the audit actually found.\nSkip the second write only when nothing passed, since there is then nothing to select.\n\n```bash\nbash \"${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Faudit-automation-gaps\u002Fscripts\u002Ffindings-state.sh\" write \\\n  --plugin-data \"${CLAUDE_PLUGIN_DATA}\" --findings \u003Cfile-or-->\n```\n\nWe pass `${CLAUDE_PLUGIN_DATA}` as that argument rather than relying on the shell to have it; the\nscript exits 2 rather than guessing when it is missing.\n\n- **Pointer**: when deciding how a script receives a plugin path variable, fetch\n  [plugins manifest reference: where each variable resolves](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fplugins\u002Fmanifest-reference#where-each-variable-resolves)\n  live.\n- **Recheck trigger**: that section starts exporting the variable to commands run through the Bash\n  tool.\n\nThe payload is exactly one JSON object with a `candidates` array, each entry carrying\n`id`, `candidate`, `category`, `verdict`, an `evidence` array, and a `plan` object on any `PASS` or\n`CONDITIONAL`. Each entry also carries `approved`, the boolean that records the human's selection.\nA malformed payload, or a stream carrying more than one document, exits 3 and writes nothing,\nlisting every problem at once.\n\nWrites are all or nothing. A run id already taken is reserved under the next free suffix rather than\noverwritten, so two runs racing for one id both survive and each is told the id it actually got.\n\nFindings are keyed per project, so one checkout never reads another's verdicts. This tree is the\nonly durable copy, and an uninstall can delete it.\n\n- **Pointer**: when deciding whether the findings survive an uninstall, fetch\n  [plugins CLI reference: what an uninstall deletes and keeps](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fplugins\u002Fcli-reference#what-an-uninstall-deletes-and-keeps)\n  live.\n\n## Phase 4: Implement (if `--implement` or user requests)\n\nRecover the prior run's verdicts first, rather than re-deriving them:\n\n```bash\nbash \"${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Faudit-automation-gaps\u002Fscripts\u002Ffindings-state.sh\" read \\\n  --plugin-data \"${CLAUDE_PLUGIN_DATA}\"\n```\n\nThat serves this project's newest run. Implement the candidates whose `approved` is `true`. Where\nno candidate carries `approved: true`, the stored run predates the human's selection, so ask which\nitems to implement rather than treating every passing candidate as chosen: a `PASS` verdict is this\nskill's judgment, not the operator's consent.\n\nExit 4 means this project has no stored run, which is the cue to audit first rather than to\nimplement from memory; the script never falls back to another project's artifact. Exit 5 is the different answer: stored state exists but cannot be trusted,\nbecause a file is unreadable or a previous write half landed. Treat 5 as a state to repair or\nre-audit, never as an absence, and say which of the two you got. `list` shows the earlier runs when\na specific one is wanted.\n\nFor each user-selected item:\n\n1. **Explore**: re-read current state (may have changed since evaluation)\n2. **Research + Validate**: verify the implementation approach against current docs. The audit\n   already ran one batched fetch for Claude Code surfaces in Phase 2.2, so re-fetch only what the\n   stored evidence does not already settle, or what has plausibly moved since the run was written.\n   For a mod, load the built-in `plugin-authoring` skill before planning: its type declarations\n   are the authority for the running build, and they win where a docs page disagrees\n3. **Plan**: detailed implementation steps\n4. **Implement**: execute with incremental validation and commit checkpoints\n5. **Test**: verify the automation works (run hooks, test skills, etc.)\n6. **Review**: dispatch a fresh-context reviewer to check the change against existing patterns,\n   since the context that wrote it is a biased judge of it. It lists only problems that should\n   block the change, each with file and line, why it is wrong, and how to show it fails. Where no subagent surface exists,\n   review inline and record that the review was same-context. Under a `light` or `off`\n   verification level (2.3), dispatch no reviewer and review nothing inline: write\n   `verification: skipped (\u003Clevel>)` in the review's place\n7. **Verify**: build\u002Ftest the repo if code changed, confirm no regressions\n\nRoute steps 2-7 through the consuming environment's own workflow skills when it has them; the inline\nsteps stand on their own otherwise.\n\n## Quality Principles\n\nPrinciples that govern every verdict:\n\n1. **The enforcement hierarchy is your first check.** Most \"gaps\" are covered by the compiler-through-git-hooks levels\n2. **Measure, don't assume.** Time every tool before recommending it as a hook. A formatter looks perfect until you measure 15+ seconds per file\n3. **Check incident history, then read it.** Zero incidents across 100+ commits is strong evidence the problem doesn't exist in practice, but a `git log --grep` count is a ceiling, and a check a higher rung already runs suppresses its own incidents\n4. **Behavioral rules are valid enforcement.** A rule in CLAUDE.md, or in a natively read AGENTS.md, is legitimate coverage; not everything needs a hook or script\n5. **YAGNI is a quality gate, not laziness.** Automation for a task at 4% frequency is premature\n6. **Premature is worse than missing.** Adding a database MCP before a database exists, or scheduling before CI exists, creates maintenance burden for zero value\n7. **A clean bill of health is a valid outcome.** Not finding gaps means the automation is mature; don't manufacture recommendations to justify the audit\n\n## Next\n\n- Candidates passed and are ready to build: `\u002Fplanning:plan`.\n- Candidates passed and need slicing into grabbable tickets first: `\u002Fwork-items:decompose`.\n- The run raised a question about automation already in place: `\u002Foverengineering:audit`.\n- A verdict is worth revisiting later rather than acting on now: `\u002Fwork-items:track add`.\n\n## Gotchas\n\nFive failure modes this skill has produced, each with its evidence and dated upstream records: a partial inventory anchoring every later verdict, keyword counts read as\nfrequencies, `PostToolUse` candidates phrased as gates, an `exit 2` gate on `PermissionRequest` that\nis silently inert, and a candidate generator that reaches four of the\n[documented hook events](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fhooks#hook-events).\nRead [context\u002Fgotchas.md](context\u002Fgotchas.md) before any run whose verdicts a human will act on.\n",{"shell":24,"metadata":25,"description":7,"argument-hint":28,"user-invocable":29,"disable-model-invocation":20},"bash",{"summary":26,"workflow-stage":27},"Audit the repo's automation landscape for hook, MCP, skill, and subagent gaps worth adding","anytime","[--recommend-only] [--implement] [hooks|mcp|skills|subagents|scheduled|all]",true,"main","d0e68c3f36b92a1d6381f0ba0060d7a0b8b886c5","plugins\u002Fharness-config\u002Fskills\u002Faudit-automation-gaps",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":40,"prompt":50,"zipAvailable":29},[41,44,47],{"tool":42,"command":43},"npx","npx skills add melodic-software\u002Fclaude-code-plugins --skill audit-automation-gaps",{"tool":45,"command":46},"bunx","bunx skills add melodic-software\u002Fclaude-code-plugins --skill audit-automation-gaps",{"tool":48,"command":49},"pnpm","pnpm dlx skills add melodic-software\u002Fclaude-code-plugins --skill audit-automation-gaps","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-automation-gaps\u002FSKILL.md",[52,58,62,66,70,74,80,84,88,92],{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"context\u002Fenforcement-ladder.md","REFERENCE","参考文档",10830,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-automation-gaps\u002Fcontext\u002Fenforcement-ladder.md",{"path":59,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":60,"sourceHtmlUrl":61},"context\u002Fgap-analysis.md",3608,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-automation-gaps\u002Fcontext\u002Fgap-analysis.md",{"path":63,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":64,"sourceHtmlUrl":65},"context\u002Fgotchas.md",6946,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-automation-gaps\u002Fcontext\u002Fgotchas.md",{"path":67,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":68,"sourceHtmlUrl":69},"context\u002Fhook-timing.md",6758,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-automation-gaps\u002Fcontext\u002Fhook-timing.md",{"path":71,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":72,"sourceHtmlUrl":73},"evals\u002Fevals.json",4782,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-automation-gaps\u002Fevals\u002Fevals.json",{"path":75,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":79},"scripts\u002Ffindings-state.sh","SCRIPT","脚本",28234,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-automation-gaps\u002Fscripts\u002Ffindings-state.sh",{"path":81,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":82,"sourceHtmlUrl":83},"scripts\u002Ffindings-state.test.sh",40342,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-automation-gaps\u002Fscripts\u002Ffindings-state.test.sh",{"path":85,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":86,"sourceHtmlUrl":87},"scripts\u002Finventory.sh",34304,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-automation-gaps\u002Fscripts\u002Finventory.sh",{"path":89,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":90,"sourceHtmlUrl":91},"scripts\u002Finventory.test.sh",39048,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-automation-gaps\u002Fscripts\u002Finventory.test.sh",{"path":93,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":94,"sourceHtmlUrl":95},"templates\u002Fchecklist.md",888,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fharness-config\u002Fskills\u002Faudit-automation-gaps\u002Ftemplates\u002Fchecklist.md",[97,104,111,118,123,130],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"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":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"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":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"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":119,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"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":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":129,"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":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"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",[],[]]