kensaurus/cursor-kenji/audit-cicd
Claude Code and agent skill by kensaurus/cursor-kenji
- community
Checking that the SKILL.md file is still in the repository.
Audit GitHub Actions CI/CD for cost, speed, and safety. Use when the Actions bill or minutes are high, runners cost too much, CI is slow, cache storage grows, or "CI/CD / workflow audit". Bypass or ratchet gaming → audit-gate-logic.
Install
npx vskill@latest install kensaurus/cursor-kenji/audit-cicdSKILL.md
CI/CD Audit Skill
Degree of freedom: MIXED — Steps 1–3 judgment [HIGH freedom]; Step 0 gh inventory and Step 4 deletes [LOW freedom — run exactly].
Systematic audit of GitHub Actions workflows to cut the Actions bill (minutes + storage) and speed up CI without losing test coverage or deploy safety. Uses the gh CLI for live billing, run history, and storage data.
This skill vs neighbors
| Skill | Owns | |
|---|---|---|
| audit-cicd (this) | GitHub Actions CI/CD audit for cost, speed, and safety | |
audit-gate-logic | Read-only CI gate logic: silent bypass, ratchet gaming, duplicate gates | |
housekeep-gates | Consolidate accreted CI gates, ratchets, hooks into one aggregator check | |
audit-infra-cost | Read-only hosting, database, storage, egress, and serverless spend audit |
How to reason
- Observe — quote the trigger,
runs-on,concurrency, orghminute/storage number - Interpret — billed twice, doomed minutes, or a 10× runner on every push?
- Classify — double-bill / no-concurrency / expensive-runner / doomed-job / storage / correct
- Severity — by
$× safety; never score a cut that drops coverage
Worked example
Observe:build-mobile.ymlruns-on: macos-15onpush:to everybranch; noif:gate; private repo.Interpret: every push bills ~10× Ubuntu for an iOS job nobody requested.Classify: expensive-runner on ordinary push.Severity: Very high (~10×).Finding:build-mobile.yml| macos on push | dispatch/tag-only | ~10×
Step 0: Inventory the account and pipelines [LOW freedom — run exactly]
Measure before optimizing. Only private repos consume the paid minute allowance; public repos get free minutes — don't spend effort there.
Rank repos by runs × runner-multiplier. A macos-* job counts ~10x a ubuntu job; *-large/bigger runners cost more than standard.
Step 1: Anti-pattern scan (per workflow) [HIGH freedom]
For each .github/workflows/*.yml, check for the recurring cost drivers:
- [ ] Double-billing triggers — the same jobs run on both
push: [main]
and pull_request for main (every merge bills twice). PR gates verification; a separate deploy.yml handles main. If both are needed, guard per-job with if: github.event_name == '...'.
- [ ] Missing `concurrency` — no
cancel-in-progress, so rapid pushes/PR
syncs stack full runs instead of superseding.
- [ ] Expensive runners on ordinary pushes —
macos-*/*-largefiring
on every push instead of workflow_dispatch or version tags only.
- [ ] No path filters — docs/config-only changes run the full heavy suite
(add paths: / paths-ignore:).
- [ ] Doomed jobs — a costly job (visual/e2e/Lighthouse) runs in parallel
with a cheap gate and keeps burning minutes after the gate fails (gate it with needs: [...]).
- [ ] Long/default artifact retention —
upload-artifactwithout
retention-days keeps outputs 90 days; heavy reports uploaded on success (if: always()) instead of if: failure().
- [ ] Self-uploading SARIF pile-ups — e.g. gitleaks-action uploads a tiny
SARIF artifact every run for 90 days.
- [ ] Over-frequent crons — daily
schedule:where weekly suffices. - [ ] Redundant rebuilds — two jobs each run the same build instead of
building once and sharing via artifact (only when their build env is identical — see Safety).
Step 2: Cost levers (highest impact first) [HIGH freedom]
| Lever | Fix | Impact | |
|---|---|---|---|
| macOS/large on push | Gate to workflow_dispatch / tags | Very high (~10x) | |
| Doomed heavy jobs | needs: [cheap-gate] so they skip on failure | High | |
| Double-billing triggers | Drop the redundant trigger (keep the gate) | High | |
| No concurrency | Add cancel-in-progress | Medium | |
| No path filters | paths: / paths-ignore: | Medium | |
| Daily crons | Move to weekly | Medium | |
| Artifact retention | retention-days: 1–7 + if: failure() | Storage | |
| Repeated installs | Cache deps / Playwright browsers / build cache | Medium |
Step 3: Fix patterns [HIGH freedom]
Step 4: Storage cleanup (destructive — confirm first) [LOW freedom — confirm first]
Artifacts and caches are ephemeral CI outputs; deleting them is safe but irreversible. Confirm with the user, then:
Safety rules (do NOT trade coverage or deploys for cost)
- Never delete, skip, or weaken a test to save minutes. Make advisory
scans (npm audit, CVE scans) continue-on-error or move them to a schedule — keep the check.
- Keep the deploy gate. If
deploy.ymltriggers on the CIworkflow_run
for push, do not remove the push trigger from CI.
- Only share a build across jobs when their build env is identical. Reusing
an artifact built with different secrets/flags (prod env, QA build stamps) ships or tests the wrong bundle.
- Update branch protection when renaming/merging jobs. If a required status
check's job name changes, PATCH required_status_checks.contexts in the same change or merges hang. Verify: gh api repos/<owner>/<repo>/branches/<main>/protection/required_status_checks --jq '.contexts'
- Verify with live runs. After pushing, confirm no
startup_failure
(YAML parses) and that intended jobs skip/run: gh run view <id> --json jobs --jq '.jobs[]|"\(.conclusion // .status) \(.name)"'
Account backstops (one-time, GitHub UI)
UI-only at the time of writing — check whether the settings API now covers them before telling the user it is manual.
- Default artifact/log retention → Settings → Actions → General → drop from
90 days to ~14 (applies to all repos, including future ones).
- Spending budget → Settings → Billing → Budgets → set an Actions budget
with 75/90/100% alerts; keep "Stop usage" off so production deploys never hard-break.
- Rotate any secret leaked in a workflow/remote (the user must revoke;
you can only strip it from configs).
Self-critique before reporting [LOW freedom — do not skip]
- Evidenced — workflow YAML or
ghcount, not "CI feels expensive" - Reproducible — same trigger/
runs-onstill present - Severity justified — ranked by
$× runner multiplier - Right owner — silent bypass / ratchet →
audit-gate-logic; hosting bill →audit-infra-cost - No-false-safety — no test deleted or skipped to save minutes; storage delete confirmed
Output: CI/CD Cost Audit Report
Related
audit-gate-logic— does the gate actually stop what it claims (bypass / ratchet)audit-infra-cost— hosting / DB / egress (not Actions minutes)test-visual-regression— screenshot CI artifact retentionaudit-security/deploy-verify/workflow-pr/create-hook
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/audit-cicd/SKILL.md
Popularity
- Repository stars
- 9
- 7-day trend score
- 12
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kensaurus/cursor-kenji/audit-cicd)