| name | lean-ci-audit |
| description | Audit CI/CD pipelines for wasted compute — uncached builds, full test suites on every commit, redundant matrix jobs, artifacts and images kept forever, scheduled jobs running when nothing changed. Use this skill whenever the user shares CI configs (GitHub Actions, GitLab CI, Jenkins, CircleCI), complains about slow/expensive pipelines, or asks for a CI/CD efficiency or sustainability review. Part of Lean Agentic AI Skills; emits lean-findings.json. |
CI Green Audit
Producer skill. Input: pipeline config files, run-duration history if available. Output: lean-findings.json.
CI is compute that scales with team activity, not user value — every wasted pipeline minute is pure E with R=0. It is also the easiest place to win: config changes, no production risk.
Subject type: emit subject.type: "ci-pipeline" in findings.
Signatures
- No dependency caching — installs from scratch each run (missing actions/cache, cache: keys, Docker layer cache). High (every run). Evidence: the absent config.
- Test everything, always — full suite on every push including docs-only changes; no path filters, no test selection. High. Fix: path filters, affected-only test selection, split fast/slow suites (fast on PR, slow on merge).
- Redundant triggers — same workflow on push AND pull_request for same commits; no concurrency-cancel for superseded runs. Medium-high. Fix: concurrency groups with cancel-in-progress.
- Matrix sprawl — OS/version combinations no one supports. Medium; fix: prune to the support policy.
- Scheduled jobs unconditionally — nightly builds that run when nothing changed. Medium; fix: short-circuit on no-diff.
- Artifact/image hoarding — retention unset (default: long) for artifacts, caches, container tags. Medium, compounding storage.
- Fat runners for light jobs — large runners on lint jobs. Low-medium.
- No fail-fast — long jobs continuing after a determinative failure. Low.
Honesty rules
Test selection trades against missed-regression risk — recommend it with a safety net (full suite still runs on merge/nightly). Duration claims only from actual run history provided.
Cost signal (countable)
Cost driver: runner-minutes (or self-hosted node-hours). Where run-duration history is available, cost_signal.observed = current runner-minutes per week for the affected workflow; direction = qualitative. Frequency × duration is the real lever; both are countable from logs.
Not this skill's job
Code-level efficiency in the app itself (green-code-review), where runners are hosted (region-selector).