[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BYQ8TZ2V4SY155TRG3DDPX":3,"skill-same:01M7BYQ8TZ2V4SY155TRG3DDPX":43},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M7BYQ8TZ2V4SY155TRG3DDPX","weekly-audit-patterns",null,"The non-obvious invariants of the proactive nightly Claude audit workflow (.github\u002Fworkflows\u002Fclaude-weekly-audit.yml): the day-of-week mode selector, the stable dedup-key scheme that keeps it from re-filing findings every run, the four audit dimensions (security has its own nightly workflow, claude-security-audit.yml) and which one owns the Fail-Loudly check, and the `bug`-label → auto-fix promotion path. Read before editing that workflow, changing its cadence, changing how findings are filed\u002Fdeduped, or adding an audit dimension.","secure-workflows\u002Fgaia","secure-workflows","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F311422533?v=4","01M7BYM925H8FAXM1DRD7F5DQD","01M7BYM92V01EZBAV87C93HNKX",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fweekly-audit-patterns\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: \"weekly-audit-patterns\"\ndescription: \"The non-obvious invariants of the proactive nightly Claude audit workflow (.github\u002Fworkflows\u002Fclaude-weekly-audit.yml): the day-of-week mode selector, the stable dedup-key scheme that keeps it from re-filing findings every run, the four audit dimensions (security has its own nightly workflow, claude-security-audit.yml) and which one owns the Fail-Loudly check, and the `bug`-label → auto-fix promotion path. Read before editing that workflow, changing its cadence, changing how findings are filed\u002Fdeduped, or adding an audit dimension.\"\n---\n\n# Nightly Audit Patterns\n\n`.github\u002Fworkflows\u002Fclaude-weekly-audit.yml` is the repo's one **proactive** Claude\nlens — a scheduled deep review (not triggered by a PR) that fans out one read-only\nClaude job per dimension and files a ranked triage issue. Everything else in\n`claude.yml` is reactive. These are the invariants a future editor will otherwise break.\n\n> **Naming:** this ran weekly until it moved to a nightly cron (10:37 UTC ≈ 3am Pacific,\n> deep on Sundays). Three identifiers deliberately kept the `weekly` name so the change\n> did not orphan existing state or break references: the **filename**, the\n> **`weekly-audit` issue label** (it is the dedup key — renaming it would re-file every\n> open finding), and this **skill's `name`** (referenced from `CLAUDE.md`). Issue titles\n> and the workflow display name did change, to `Nightly audit — …`.\n\n## The four dimensions are mutually exclusive\n\n`correctness`, `docs`, `tests`, `features` — a matrix of one Claude job each. **Security\nis NOT a dimension here** — it moved to its own workflow, `claude-security-audit.yml`\n(deterministic semgrep + a Claude taint\u002Fauthz\u002Fsuppression sweep, CVSS-scored, findings to\nthe private code-scanning tab). Don't re-add it here; that created two half-owners and the\nsingle general \"security lens\" is what missed the hub tar-slip.\nThe lenses **overlap unless the prompt keeps them disjoint**, and the first run proved it:\ncorrectness findings (a rollback that never rolls back, a poller returning null, a mode\nthat no-ops) leaked into `features`, and the priciest job's output vanished from the\ntriage issue. The decisive question for a broken thing: **is the code wired but\nmisbehaving (`correctness`), never written (`features`), or contradicted by its docs\n(`docs`)?**\n\n- **`correctness` owns wired-but-broken behavior AND the CLAUDE.md \"Fail Loudly\" check**\n  (`except Exception: pass`, try\u002Fexcept returning a placeholder, silent degradation).\n- **`features`** is only genuinely-missing\u002Fhalf-shipped capability — a TODO for code never\n  written. Wired-but-broken is correctness, not features.\n- **`docs`** owns doc-vs-code drift, including a feature *documented as working but stubbed*.\n- **`tests`** in deep mode rolls plain \"module X has no coverage\" into ONE aggregate finding\n  (`dedup_key: tests:aggregate:untested-modules`); separate findings only for risk-bearing\n  untested logic (auth\u002Fgate\u002Fprecedence\u002Ferror-mapping\u002F#1655).\n\nAdding a dimension means: add it to the matrix, describe its disjoint lens in the shared\nprompt, and the synthesis picks up its `findings-\u003Cdim>.json` automatically.\n\n## Published hub agents get the highest bar\n\nPublished agents are the shop window — the prompt makes every lens double-check them and\n**bump any gap up one severity** (never 🟡; a default-path break is 🔴). Detect them by a\n`release_agent_\u003Cid>.yml`, a shipped `SCORECARD.md`, or a released `version:` in\n`gaia-agent.yaml` — currently only the **email agent**. The bar: in-sync high-quality\nREADME\u002FSPEC.md\u002FSKILL.md\u002FCHANGELOG.md (+ any contract spec) with a **real** eval `SCORECARD.md`\n(gated by `gaia.eval.scorecard_gate`, never hand-authored) linked from the README; bulletproof\nruntime code (no stubs\u002Fsilent-fallbacks); solid #1655-grade tests. When a new agent publishes,\nthe detection generalizes to it automatically — no prompt edit needed.\n\n## Severity: 🔴 high · 🟠 medium · 🟡 low — no green\n\nGreen (🟢) reads as \"pass\u002Fgood,\" so it's banned. **Broken behavior always outranks a\nmissing test** — never rate \"module X has no tests\" above a feature that's actually\nbroken. High = security \u002F data loss \u002F default-path break; medium = broken user-facing\nbehavior, a false doc, or a missing test guarding auth\u002Fa gate\u002Fdestructive logic; low =\nmissing tests on non-risk logic, cosmetic gaps. The synthesis emits a section per\ndimension (fixed order: Correctness, Features, Docs, Tests), grouping each\nfinding under the dimension it **declares** — it never re-buckets.\n\n## Child issues are 🔴\u002F🟠 only, and tagged auto-fixable\n\nOnly high\u002Fmedium findings get a child issue (and thus one-click `bug`→auto-fix promotion).\n🟡 (low) findings are listed in the parent triage issue and nowhere else — this caps\ntracker churn (the first deep run filed 19 children, ~13 of them low-value coverage nits).\nEach finding carries an `auto_fixable` boolean; the child body says whether applying `bug`\nwill let auto-fix land it (locatable\u002Fsmall) or whether it needs a human (a test suite, a\nrefactor) — so maintainers don't promote something auto-fix can't handle.\n\n## Findings are filtered in SYNTHESIS, never in the lenses\n\n**The lenses report everything they can ground in something they read — including\nfindings they are unsure about. Synthesis is the only filter.** This split is deliberate\nand load-bearing on Claude Opus 5: a lens prompt that says \"be conservative\", \"precision\nbeats recall\", or \"skip anything you aren't confident is real\" gets followed *literally*\n— the model investigates just as hard and then silently reports less. Both this workflow\nand `claude-security-audit.yml` previously said exactly that. Do not put it back. (The\nsecurity audit's own origin story is a recall failure: its predecessor missed the hub\ntar-slip, CWE-22, by sampling and trusting a suppression comment.)\n\nWhat each side owns:\n- **Lens**: grounding only. Open the cited file, confirm the problem is present, confirm\n  it isn't already handled, and fill `evidence` with what you actually read. **No\n  evidence, no finding** — the one hard filter upstream. Express doubt through\n  `severity` (file it 🟡 and say so in `why`), never by dropping the item.\n- **Synthesis**: the real gate. Drops any finding at any severity whose evidence doesn't\n  substantiate its title, re-reads the cited `path`\u002F`symbol` for every 🔴\u002F🟠 before\n  filing, demotes over-stated findings rather than deleting them, collapses an\n  implausible flood on one area into a single finding, and does an **intra-run\n  cross-dimension dedup** (a stubbed command flagged by both `docs` and `correctness` is\n  ONE issue, not two — keep the most severe, note the other lens).\n\nIf the tracker gets noisy, tighten synthesis. Do not re-muzzle the lenses.\n\n## Findings are written for a human, not an auditor\n\nEvery filed issue follows [CLAUDE.md → How You\nCommunicate](..\u002F..\u002F..\u002FCLAUDE.md#how-you-communicate): the title and opening line say what\nbroke and who it hurts, in plain words; the `path:line` evidence goes underneath in a\nsub-bullet or a `\u003Cdetails>` block. A finding that opens with a symbol name is one a\ntriager skips.\n\n## Dedup + suppression — the single biggest usability risk\n\nEach finding carries `dedup_key = \u003Cdimension>:\u003Crepo-relative-path>:\u003Csymbol-or-section>`.\n**The symbol is a function\u002Fclass name or doc heading — NEVER a line number** (line numbers\nmove, so a line-based key re-files the same finding every run and the issue is unusable by\nweek 3). The key is embedded in each child body as `\u003C!-- audit-key: KEY -->`. Synthesis\nskips a finding whose key is in EITHER set:\n- **already-filed** — keys on any *open* `weekly-audit` issue (avoid duplicates).\n- **suppressed-forever** — keys on any `weekly-audit` issue also labeled **`audit-wontfix`**\n  (open or closed). This is how you permanently silence accepted debt: close a child with\n  `audit-wontfix` and it never comes back. Without this, wontfix findings resurface every\n  deep run forever.\n\n## Parent triage issues accumulate — the workflow NEVER closes one\n\nEach run files a NEW parent (`Nightly audit — \u003Cmode> — \u003Crun_id>`; synthesis also matches the legacy `Weekly audit — ` prefix so the chain survives the rename) and **cross-links the\nmost recently created open parent** with a comment (\"Follow-up audit run filed as #N —\nstays OPEN until its findings are addressed\") — it does **not** close it. An earlier\nversion auto-closed the previous parent as \"superseded,\" which silently hid an epic's\nstill-open child findings the moment the next run fired (#2010: 18 unaddressed children\nwent dark). Only a **human maintainer** may close a parent, and only after its findings\nare addressed. Child issues stay open regardless (they're the actionable units) — that\nwas already true and is unchanged.\n\nSince parents are never auto-closed, there can be several open `Nightly audit —` (and legacy `Weekly audit —`) issues at\nonce; synthesis always cross-links the highest-numbered (most recent) one, never assumes\nthere's \"at most one.\" The tradeoff is deliberate: parents pile up until a maintainer\ncloses them, trading tracker tidiness for guaranteeing unaddressed findings stay visible.\nThe parent opens with a one-line tally (new\u002Flow\u002Fsuppressed counts) for trend. On a\nzero-new-findings run, synthesis posts nothing and does not touch any prior parent.\n\n## Security is out of scope here — it has its own workflow\n\nSecurity moved to `.github\u002Fworkflows\u002Fclaude-security-audit.yml` (see its own patterns\nskill). This audit files to a **public** triage issue, which is the wrong channel for a\nvulnerability — so the prompt now tells every lens to hand off any security issue it\nnotices rather than file it, and the synthesis emits **no** security section. Do not\nre-add a security dimension here or route a security finding into the public issue.\n\n## Promotion: `bug` label → existing auto-fix job\n\nChild issues are opened **without** any auto-fix trigger label. A maintainer promotes\none to a PR by applying the **`bug`** label; the existing `auto-fix` job in\n`claude.yml` (gated on `label.name == 'bug'` **and** `contains(labels,'bug')`) then\ncreates the branch + PR. There is **no PR-creation code in this workflow** — humans\ngate every code change. A `documentation`\u002F`tests` label alone does NOT trigger auto-fix;\nroute promotions through `bug` unless you deliberately widen the auto-fix `if`.\n\n## Cost & safety invariants\n\n- **Model** is `AUDIT_MODEL` (top-level env, `claude-opus-5` — ~half the token burn of\n  Fable for comparable static-review quality, and the same $5\u002F$25 as the Opus 4.8 it\n  replaced). One place to change it; swap to `claude-fable-5` for maximum depth at ~2x\n  cost. A measured Fable deep run was ~$45 of API-equivalent subscription usage; Opus\n  roughly halves that.\n  ⚠️ **Model support is gated by the pinned `claude-code-action` version** — the action\n  bundles the CLI that resolves model names, so a model newer than the pin is\n  unresolvable and fails as a broken job rather than a clear error. Bump the SHA in the\n  same change and prove it first with\n  `gh workflow run claude-auth-canary.yml -f model=\u003Cnew-id>`.\n- **Serialized dimensions**: the matrix runs `max-parallel: 1` so the run is a steady\n  drip, not a 4-job burst — this keeps it under the Max subscription's rolling (5-hour)\n  rate limit. If you re-parallelize, expect a token spike that can trip that limit.\n- **Skip-if-empty**: normal mode exits in `preflight` before any Claude call on a night\n  with no commits. Deep mode never skips. This matters more now the cadence is nightly.\n- **Cadence**: **nightly** at 10:37 UTC (≈3am Pacific). The sibling\n  `claude-security-audit.yml` also runs nightly, deliberately ~1.4h earlier at 09:13 UTC\n  so the two proactive Claude runs never stack on the shared subscription pool.\n- **Modes**: `normal` = last N days' diff (`window_days`, default **1**); `deep` = whole\n  codebase, auto-selected on **Sundays**.\n  ⚠️ The selector keys off **ISO day-of-week** (`date -u +%u`, 7 = Sunday), NOT\n  day-of-month. It previously read `day-of-month ≤ 7` and was only correct because the\n  cron fired on Mondays alone. Under the nightly cron that test matches the 1st–7th of\n  every month — **seven consecutive whole-codebase deep sweeps** instead of one. Do not\n  \"simplify\" it back to a day-of-month check.\n- **Read-only**: dimension + synthesis jobs run `--allowedTools Read,Grep,Glob,Bash` —\n  no Edit\u002FWrite, never install or run repo code (same rule as `claude.yml` review jobs).\n- **Concurrency group** `claude-weekly-audit` (not cancel-in-progress) so two scheduled\n  runs never overlap and double-file.\n- Auth is the same OAuth-preferred \u002F API-key-fallback wiring as every `claude.yml` job,\n  covered by `claude-auth-canary.yml`.\n","# Nightly Audit Patterns\n\n`.github\u002Fworkflows\u002Fclaude-weekly-audit.yml` is the repo's one **proactive** Claude\nlens — a scheduled deep review (not triggered by a PR) that fans out one read-only\nClaude job per dimension and files a ranked triage issue. Everything else in\n`claude.yml` is reactive. These are the invariants a future editor will otherwise break.\n\n> **Naming:** this ran weekly until it moved to a nightly cron (10:37 UTC ≈ 3am Pacific,\n> deep on Sundays). Three identifiers deliberately kept the `weekly` name so the change\n> did not orphan existing state or break references: the **filename**, the\n> **`weekly-audit` issue label** (it is the dedup key — renaming it would re-file every\n> open finding), and this **skill's `name`** (referenced from `CLAUDE.md`). Issue titles\n> and the workflow display name did change, to `Nightly audit — …`.\n\n## The four dimensions are mutually exclusive\n\n`correctness`, `docs`, `tests`, `features` — a matrix of one Claude job each. **Security\nis NOT a dimension here** — it moved to its own workflow, `claude-security-audit.yml`\n(deterministic semgrep + a Claude taint\u002Fauthz\u002Fsuppression sweep, CVSS-scored, findings to\nthe private code-scanning tab). Don't re-add it here; that created two half-owners and the\nsingle general \"security lens\" is what missed the hub tar-slip.\nThe lenses **overlap unless the prompt keeps them disjoint**, and the first run proved it:\ncorrectness findings (a rollback that never rolls back, a poller returning null, a mode\nthat no-ops) leaked into `features`, and the priciest job's output vanished from the\ntriage issue. The decisive question for a broken thing: **is the code wired but\nmisbehaving (`correctness`), never written (`features`), or contradicted by its docs\n(`docs`)?**\n\n- **`correctness` owns wired-but-broken behavior AND the CLAUDE.md \"Fail Loudly\" check**\n  (`except Exception: pass`, try\u002Fexcept returning a placeholder, silent degradation).\n- **`features`** is only genuinely-missing\u002Fhalf-shipped capability — a TODO for code never\n  written. Wired-but-broken is correctness, not features.\n- **`docs`** owns doc-vs-code drift, including a feature *documented as working but stubbed*.\n- **`tests`** in deep mode rolls plain \"module X has no coverage\" into ONE aggregate finding\n  (`dedup_key: tests:aggregate:untested-modules`); separate findings only for risk-bearing\n  untested logic (auth\u002Fgate\u002Fprecedence\u002Ferror-mapping\u002F#1655).\n\nAdding a dimension means: add it to the matrix, describe its disjoint lens in the shared\nprompt, and the synthesis picks up its `findings-\u003Cdim>.json` automatically.\n\n## Published hub agents get the highest bar\n\nPublished agents are the shop window — the prompt makes every lens double-check them and\n**bump any gap up one severity** (never 🟡; a default-path break is 🔴). Detect them by a\n`release_agent_\u003Cid>.yml`, a shipped `SCORECARD.md`, or a released `version:` in\n`gaia-agent.yaml` — currently only the **email agent**. The bar: in-sync high-quality\nREADME\u002FSPEC.md\u002FSKILL.md\u002FCHANGELOG.md (+ any contract spec) with a **real** eval `SCORECARD.md`\n(gated by `gaia.eval.scorecard_gate`, never hand-authored) linked from the README; bulletproof\nruntime code (no stubs\u002Fsilent-fallbacks); solid #1655-grade tests. When a new agent publishes,\nthe detection generalizes to it automatically — no prompt edit needed.\n\n## Severity: 🔴 high · 🟠 medium · 🟡 low — no green\n\nGreen (🟢) reads as \"pass\u002Fgood,\" so it's banned. **Broken behavior always outranks a\nmissing test** — never rate \"module X has no tests\" above a feature that's actually\nbroken. High = security \u002F data loss \u002F default-path break; medium = broken user-facing\nbehavior, a false doc, or a missing test guarding auth\u002Fa gate\u002Fdestructive logic; low =\nmissing tests on non-risk logic, cosmetic gaps. The synthesis emits a section per\ndimension (fixed order: Correctness, Features, Docs, Tests), grouping each\nfinding under the dimension it **declares** — it never re-buckets.\n\n## Child issues are 🔴\u002F🟠 only, and tagged auto-fixable\n\nOnly high\u002Fmedium findings get a child issue (and thus one-click `bug`→auto-fix promotion).\n🟡 (low) findings are listed in the parent triage issue and nowhere else — this caps\ntracker churn (the first deep run filed 19 children, ~13 of them low-value coverage nits).\nEach finding carries an `auto_fixable` boolean; the child body says whether applying `bug`\nwill let auto-fix land it (locatable\u002Fsmall) or whether it needs a human (a test suite, a\nrefactor) — so maintainers don't promote something auto-fix can't handle.\n\n## Findings are filtered in SYNTHESIS, never in the lenses\n\n**The lenses report everything they can ground in something they read — including\nfindings they are unsure about. Synthesis is the only filter.** This split is deliberate\nand load-bearing on Claude Opus 5: a lens prompt that says \"be conservative\", \"precision\nbeats recall\", or \"skip anything you aren't confident is real\" gets followed *literally*\n— the model investigates just as hard and then silently reports less. Both this workflow\nand `claude-security-audit.yml` previously said exactly that. Do not put it back. (The\nsecurity audit's own origin story is a recall failure: its predecessor missed the hub\ntar-slip, CWE-22, by sampling and trusting a suppression comment.)\n\nWhat each side owns:\n- **Lens**: grounding only. Open the cited file, confirm the problem is present, confirm\n  it isn't already handled, and fill `evidence` with what you actually read. **No\n  evidence, no finding** — the one hard filter upstream. Express doubt through\n  `severity` (file it 🟡 and say so in `why`), never by dropping the item.\n- **Synthesis**: the real gate. Drops any finding at any severity whose evidence doesn't\n  substantiate its title, re-reads the cited `path`\u002F`symbol` for every 🔴\u002F🟠 before\n  filing, demotes over-stated findings rather than deleting them, collapses an\n  implausible flood on one area into a single finding, and does an **intra-run\n  cross-dimension dedup** (a stubbed command flagged by both `docs` and `correctness` is\n  ONE issue, not two — keep the most severe, note the other lens).\n\nIf the tracker gets noisy, tighten synthesis. Do not re-muzzle the lenses.\n\n## Findings are written for a human, not an auditor\n\nEvery filed issue follows [CLAUDE.md → How You\nCommunicate](..\u002F..\u002F..\u002FCLAUDE.md#how-you-communicate): the title and opening line say what\nbroke and who it hurts, in plain words; the `path:line` evidence goes underneath in a\nsub-bullet or a `\u003Cdetails>` block. A finding that opens with a symbol name is one a\ntriager skips.\n\n## Dedup + suppression — the single biggest usability risk\n\nEach finding carries `dedup_key = \u003Cdimension>:\u003Crepo-relative-path>:\u003Csymbol-or-section>`.\n**The symbol is a function\u002Fclass name or doc heading — NEVER a line number** (line numbers\nmove, so a line-based key re-files the same finding every run and the issue is unusable by\nweek 3). The key is embedded in each child body as `\u003C!-- audit-key: KEY -->`. Synthesis\nskips a finding whose key is in EITHER set:\n- **already-filed** — keys on any *open* `weekly-audit` issue (avoid duplicates).\n- **suppressed-forever** — keys on any `weekly-audit` issue also labeled **`audit-wontfix`**\n  (open or closed). This is how you permanently silence accepted debt: close a child with\n  `audit-wontfix` and it never comes back. Without this, wontfix findings resurface every\n  deep run forever.\n\n## Parent triage issues accumulate — the workflow NEVER closes one\n\nEach run files a NEW parent (`Nightly audit — \u003Cmode> — \u003Crun_id>`; synthesis also matches the legacy `Weekly audit — ` prefix so the chain survives the rename) and **cross-links the\nmost recently created open parent** with a comment (\"Follow-up audit run filed as #N —\nstays OPEN until its findings are addressed\") — it does **not** close it. An earlier\nversion auto-closed the previous parent as \"superseded,\" which silently hid an epic's\nstill-open child findings the moment the next run fired (#2010: 18 unaddressed children\nwent dark). Only a **human maintainer** may close a parent, and only after its findings\nare addressed. Child issues stay open regardless (they're the actionable units) — that\nwas already true and is unchanged.\n\nSince parents are never auto-closed, there can be several open `Nightly audit —` (and legacy `Weekly audit —`) issues at\nonce; synthesis always cross-links the highest-numbered (most recent) one, never assumes\nthere's \"at most one.\" The tradeoff is deliberate: parents pile up until a maintainer\ncloses them, trading tracker tidiness for guaranteeing unaddressed findings stay visible.\nThe parent opens with a one-line tally (new\u002Flow\u002Fsuppressed counts) for trend. On a\nzero-new-findings run, synthesis posts nothing and does not touch any prior parent.\n\n## Security is out of scope here — it has its own workflow\n\nSecurity moved to `.github\u002Fworkflows\u002Fclaude-security-audit.yml` (see its own patterns\nskill). This audit files to a **public** triage issue, which is the wrong channel for a\nvulnerability — so the prompt now tells every lens to hand off any security issue it\nnotices rather than file it, and the synthesis emits **no** security section. Do not\nre-add a security dimension here or route a security finding into the public issue.\n\n## Promotion: `bug` label → existing auto-fix job\n\nChild issues are opened **without** any auto-fix trigger label. A maintainer promotes\none to a PR by applying the **`bug`** label; the existing `auto-fix` job in\n`claude.yml` (gated on `label.name == 'bug'` **and** `contains(labels,'bug')`) then\ncreates the branch + PR. There is **no PR-creation code in this workflow** — humans\ngate every code change. A `documentation`\u002F`tests` label alone does NOT trigger auto-fix;\nroute promotions through `bug` unless you deliberately widen the auto-fix `if`.\n\n## Cost & safety invariants\n\n- **Model** is `AUDIT_MODEL` (top-level env, `claude-opus-5` — ~half the token burn of\n  Fable for comparable static-review quality, and the same $5\u002F$25 as the Opus 4.8 it\n  replaced). One place to change it; swap to `claude-fable-5` for maximum depth at ~2x\n  cost. A measured Fable deep run was ~$45 of API-equivalent subscription usage; Opus\n  roughly halves that.\n  ⚠️ **Model support is gated by the pinned `claude-code-action` version** — the action\n  bundles the CLI that resolves model names, so a model newer than the pin is\n  unresolvable and fails as a broken job rather than a clear error. Bump the SHA in the\n  same change and prove it first with\n  `gh workflow run claude-auth-canary.yml -f model=\u003Cnew-id>`.\n- **Serialized dimensions**: the matrix runs `max-parallel: 1` so the run is a steady\n  drip, not a 4-job burst — this keeps it under the Max subscription's rolling (5-hour)\n  rate limit. If you re-parallelize, expect a token spike that can trip that limit.\n- **Skip-if-empty**: normal mode exits in `preflight` before any Claude call on a night\n  with no commits. Deep mode never skips. This matters more now the cadence is nightly.\n- **Cadence**: **nightly** at 10:37 UTC (≈3am Pacific). The sibling\n  `claude-security-audit.yml` also runs nightly, deliberately ~1.4h earlier at 09:13 UTC\n  so the two proactive Claude runs never stack on the shared subscription pool.\n- **Modes**: `normal` = last N days' diff (`window_days`, default **1**); `deep` = whole\n  codebase, auto-selected on **Sundays**.\n  ⚠️ The selector keys off **ISO day-of-week** (`date -u +%u`, 7 = Sunday), NOT\n  day-of-month. It previously read `day-of-month ≤ 7` and was only correct because the\n  cron fired on Mondays alone. Under the nightly cron that test matches the 1st–7th of\n  every month — **seven consecutive whole-codebase deep sweeps** instead of one. Do not\n  \"simplify\" it back to a day-of-month check.\n- **Read-only**: dimension + synthesis jobs run `--allowedTools Read,Grep,Glob,Bash` —\n  no Edit\u002FWrite, never install or run repo code (same rule as `claude.yml` review jobs).\n- **Concurrency group** `claude-weekly-audit` (not cancel-in-progress) so two scheduled\n  runs never overlap and double-file.\n- Auth is the same OAuth-preferred \u002F API-key-fallback wiring as every `claude.yml` job,\n  covered by `claude-auth-canary.yml`.\n",{"name":5,"description":7},"main","11039b64e036dca33313350b4cd1d6c2a791eb15",".claude\u002Fskills\u002Fweekly-audit-patterns","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia","https:\u002F\u002Fgithub.com\u002Fsecure-workflows","2026-10-26 10:48:34",{"source":8,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add secure-workflows\u002Fgaia --skill weekly-audit-patterns",{"tool":35,"command":36},"bunx","bunx skills add secure-workflows\u002Fgaia --skill weekly-audit-patterns",{"tool":38,"command":39},"pnpm","pnpm dlx skills add secure-workflows\u002Fgaia --skill weekly-audit-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fweekly-audit-patterns\u002FSKILL.md",true,[],[44,51,58,65,72,79],{"skillNo":45,"name":46,"nameZh":6,"description":47,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":48,"categories":49,"keywords":50,"publishedAt":18},"01M7BYXGPPQJGVVD0DPS2WK3FS","web-search","Search the web via the Brave Search API. Use when the user asks about current events or external facts.","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fweb-search\u002FSKILL.md",[],[],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":18},"01M7BYXDF2TM5JPMEQKMMHW0VJ","triage-support-ticket","Triage an inbound support ticket end to end. Use when the user pastes a support ticket or asks to triage one.","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Ftriage-support-ticket\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":18},"01M7BYXAHWNBMJ8Y1Q51EZ53K7","tool-mismatch","Declares a tool its tools.py never registers. Used to prove validation fails loudly with no partial load.","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Ftool-mismatch\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":18},"01M7BYX6CZ63AM6HB90PPNXKF7","report-archive","Archive a generated report to the user's reports folder and register it with the team's report index. Use when the user asks to file, archive, or publish a finished report.","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Freport-archive\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":18},"01M7BYX4PM4HGNZ0QBZ54BTG1N","local-capability","Writes files on the local workspace. Used to prove Phase 1 refuses local-capability permissions.","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Flocal-capability\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":18},"01M7BYX1KVPKHHZ5Z3R3BB0QQA","incident-review","Run an incident postmortem. Stands in for a Claude Code skill library imported read-only from .claude\u002Fskills\u002F.","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fincident-review\u002FSKILL.md",[],[]]