/kit:ci-driftfrom kit
Audits the entire CI estate: workflows, secrets, vars, runners, releases, and environment policies. Detects drift (disabled workflows, orphan secrets, stale runners) and ships fixes as a PR.
Ships in kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Enumerates every workflow + GitHub-side CI state (enabled/disabled, secrets, vars, runners, releases, environment policy), verdicts each against the live repo with evidence, fixes drift on a branch, gates through a PR. An audit-loop instance (docs/patterns/audit-loop.md).
Audit every workflow and its GitHub-side state against the live repo and ship the fixes as a
PR. This is the ci-drift instance of docs/patterns/audit-loop.md: enumerate, verdict with
evidence, apply on a branch, gate through a PR the operator approves. It catches what a single
failing run cannot: a workflow silently disabled for days, an orphan secret/var nobody removed,
a dispatch choice with no caller, a release check that trusts a sha alone.
| Slot | This instance |
|---|---|
| Item set | every .github/workflows/*.yml + GitHub-side state: gh api repos/<r>/actions/workflows (enabled state), gh run list -w <f> -L 1 (last run), gh secret list / gh variable list + per-environment secrets/vars via gh api repos/<r>/environments, gh api repos/<r>/actions/runners, gh release list, each environment's deployment_branch_policy, plus any cross-repo dispatcher the operator names |
| Contract | every workflow is enabled or deliberately retired; every secrets.X/vars.X reference resolves, and the inverse (no orphan secret/var); every runs-on label has an online runner and no runner is untargeted; every workflow_dispatch input has a caller or a documented reason; no paths: filter names a deleted dir; release minting is prefix-scoped per workflow and has a retention step; production environments gate on the default branch only |
| Evidence class | Tier 1: gh api + grep, mechanical. Tier 2: a read-only scanner reads a workflow's comments/steps against the scripts it calls |
| Apply mechanics | fixes on a branch + PR; GitHub-side toggles (enable a workflow, delete an orphan var) applied directly but listed in the PR body; deletions of releases/runners never auto-applied |
At the start of the pass (after any refusal guard below passes), run bin/audit start ci-drift, so a crashed or abandoned pass leaves a trace: bin/audit due shows it running or abandoned.
Branch first. All edits ride an isolated branch. Auditing on master is the failure this skill exists to prevent.
Enumerate. List every .github/workflows/*.yml plus the GitHub-side state calls above.
Write the list down before judging anything. The list is the queue; a resumed or scheduled
run picks up where the last one stopped.
Tier 1, mechanical pass, zero model cost, every workflow. For each workflow, check:
disabled_manually / disabled_inactivity is a finding, not silence),secrets.X / vars.X token resolves against gh secret list / gh variable list
(repo + per-environment), and the inverse: any listed secret/var with no referencing token,runs-on label has a matching online row in actions/runners,workflow_dispatch inputs: entry has a caller (grep other workflows/scripts) or a
comment naming why it exists un-called,paths: filter glob resolves to a live directory,deployment_branch_policy restricts to the default branch only.
A Tier 1 failure is a finding with evidence attached, severity FIX (or REMOVE when the whole
workflow's referent is gone).Tier 2, judgment pass, model-read, only where it earns its cost. Dispatch the shared
read-only scanner kit:audit-scanner (preferred: its tools roster physically cannot write,
so an unattended cadence run keeps the propose/apply split mechanical). Dispatch only for
workflows Tier 1 flagged, plus any cross-repo dispatcher the operator named: does the
workflow's comments/steps still match the scripts it calls? It quotes both sides for any
mismatch and returns findings; every fix is applied HERE, on the branch, never by the
scanner.
Verdict each item with the audit-loop grammar: OK / FIX / REMOVE / UNSURE / DANGER. A verdict with no checkable evidence downgrades to UNSURE. UNSURE items are never auto-fixed; list them in the PR body. DANGER (a workflow that would deploy or run against current policy in a way that actively breaks something) gets quoted, then fixed or disabled.
Apply. Fix workflow YAML in place on the branch. Apply GitHub-side toggles (re-enable a workflow, delete a confirmed-orphan secret/var) directly, but list every one in the PR body for the operator to see. Never auto-delete a release or a runner; those go in the PR body as proposed actions only.
Verify. Re-run the Tier 1 pass on every touched item: it must come back clean. Run
bash tests/test-meta.sh: green (pre-existing failures only), or the run is not done.
Ship. Commit, push, open a PR whose body lists every FIX/REMOVE/GitHub-side-toggle with its evidence and every UNSURE for the operator. If nothing needed changing, create no branch and report CLEAN with the enumeration list.
The 2026-08-20 foundation-workers/foundation-apps run found: a reminder workflow
disabled_manually for 9 days, an orphan environment variable, a dead workflow_dispatch
choice with no caller, a release check trusting a sha alone, and no retention step.
gh api evidence.This instance has a declared cadence in the ## Cadence table of docs/patterns/audit-loop.md.
Record a finished pass with bin/audit ran ci-drift "<one line>", including a CLEAN one, so
bin/audit due stops naming it. The kit ships no scheduler: due is what a human or a job reads.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub consolelabs/devkit --plugin kit14 skills in this plugin
/backlog-reconcileUse to audit a repo's `_meta/BACKLOG.md` Active queue against reality, "audit the backlog", "reconcile the board", "is the board still true", "dọn backlog", "rà soát backlog", or a scheduled backlog-reconcile run. NOT for filing new items onto the board, NOT for a single known-stale row (just fix it), NOT for the kit's own FEATURES/workflow-paths pair (topology-drift)./doc-driftUse for the whole-estate doc audit, "run the doc-drift loop", "audit the docs against the code", "are the docs still true", "doc drift sweep", "check every doc claim", or a scheduled doc-audit cadence run. NOT for diff-scoped doc sync inside a build cycle (/kit:docs), NOT for dated records like specs, research, retros, NOT for one known-wrong doc (just fix it)./gauntlet-proof-auditUse to audit the gauntlet records, "are the ROUNDS.md records honest", "verify the proof corpus", "check each run record against its evidence", "audit the gauntlet corpus", "is the gauntlet proof trustworthy", or a scheduled run. NOT for re-running probes or rounds (`/kit:gauntlet` itself), NOT for the corpus-level stats projection (`lib/gauntlet/stats.sh`), NOT for non-gauntlet records./get-api-docsFetch curated API documentation using Context Hub (chub) before coding against any external API. Use when the task involves calling a third-party API (Stripe, OpenAI, Airwallex, Notion, etc.) to prevent hallucinated parameters and deprecated endpoints./loop-engineeringUse to design or add a new bounded loop to the kit's SDLC orchestration ("design a new loop", "is this worth a loop"), or mentions the Karpathy loop / autoresearch / hill-climb / search-and-select prompt or parameter tuning. NOT for a one-off in-session Stop-hook goal (use goal-craft), NOT for the debug loop (already exists, use /kit:debug), NOT for building the loop's actual code./memory-tidyUse when auditing, consolidating, or cleaning a repo's .claude/memory store, "dọn memory", "memory tidy", the biweekly memory audit, duplicate or stale memory notes, MEMORY.md index drift, or a scheduled memory-tidy audit. NOT for the built-in machine-local auto-memory under ~/.claude/projects, NOT for editing a single note (just edit it).Other plugins' skills for the same job