/vstack:lean-cifrom vstack
Make a repo's GitHub Actions CI fast and cheap without weakening what it proves: measure first, run each check at the right stage, test only what the diff reaches, reuse caches, cap artifact storage, and prove the after time. Use for /lean-ci, 'CI is slow', 'CI costs too much', 'speed up the PR gate', re-enabling CI after it was turned off, or setting up CI on a new repo.
Ships in vstack. 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.
Read when SKILL.md points to them.
Make CI fast and cheap while every required check still means what it meant. A faster gate that proves less is not lean, it's broken.
Five moves, in this order: delete waste, run each check at the right stage, test what changed, reuse setup and caches, balance the jobs so the slowest one sets the time. The usual target is a pull request gate under about 5 minutes (under 3 for small repos) with the heavy builds after merge.
These hold even when the user says "just make it fast":
main), force-push, or change the default branch. CI changes land as a normal PR into the integration branch.You can't claim faster without a before number.
gh api "repos/OWNER/REPO/actions/runs?per_page=100&created=>=YYYY-MM-DD" \
--jq '.workflow_runs[] | select(.conclusion=="success" or .conclusion=="failure")
| [.name, .event, (((.updated_at|fromdate)-(.run_started_at|fromdate))/60)] | @tsv'
Group by workflow and event and record median and p90 wall time. Then pull job times for a few typical runs (gh api repos/OWNER/REPO/actions/runs/RUN_ID/jobs --jq '.jobs[]|[.name,.started_at,.completed_at]|@tsv') and find the long pole: the one job that sets the wall time. Also list:
gh api repos/OWNER/REPO/actions/workflows).gh api repos/OWNER/REPO/actions/cache/usage and .../actions/caches). GitHub evicts caches past 10 GB per repo, so a full cache means cold builds.retention-days.Write the table down. It goes in the PR body.
retention-days: 1 instead.Deleting a workflow or job is a change the user should see named in the PR. Deleting a test is never on this list.
Split checks into three stages:
| Stage | Runs | Purpose |
|---|---|---|
| PR gate | every PR into the integration branch | fast, catches most breakage: format, lint, unit tests for what the diff reaches, guards, secret and PII scans |
| Post-merge push | push to the integration branch | the heavy legs: other OSes, mobile and desktop builds, end-to-end and screenshot runs, packaging |
| Release gate and nightly | PRs into main, merge queue, push to main, schedule, manual | everything, with no path filter, plus the slow OSes |
Windows and macOS runners are the usual long pole. Move them off integration-branch PRs to the post-merge push, and keep them on PRs into main. Say so in the workflow header comment.
A job skipped by its own job-level if: reports "skipped", and GitHub counts a skipped required check as passing. So gate jobs with a job-level if: on outputs from a small changes job, never with a workflow-level on.*.paths filter on a workflow that holds a required check. A workflow-level filter means the check never reports and the PR hangs forever on "Expected".
jobs:
changes:
runs-on: ubuntu-latest
outputs:
rust: ${{ steps.filter.outputs.rust }}
windows: ${{ github.event_name != 'pull_request' || github.base_ref == 'main' }}
steps:
- uses: actions/checkout@v4
- id: filter
uses: dorny/paths-filter@v3
with:
filters: |
rust:
- '**/*.rs'
- '**/Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/ci.yml'
windows:
needs: changes
if: ${{ !cancelled() && (needs.changes.result != 'success' || needs.changes.outputs.windows == 'true') }}
runs-on: windows-latest
steps:
- if: needs.changes.result != 'success'
run: exit 1
# ... real steps
The needs.changes.result != 'success' branch makes the job run and fail when changes itself broke, so a broken filter can never turn into a green skip. Always include the workflow file itself in every filter so a CI edit tests itself.
When you split one required job into several (for example lint and test out of linux), keep the required name as a thin aggregator so the ruleset doesn't change:
linux:
needs: [changes, linux-lint, linux-tests]
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
steps:
- if: needs.changes.result != 'success'
run: exit 1
- run: |
for r in "${{ needs.linux-lint.result }}" "${{ needs.linux-tests.result }}"; do
case "$r" in success|skipped) ;; *) echo "dependency result: $r"; exit 1;; esac
done
On PRs, run tests only for the packages the diff reaches, including everything that depends on them. On push, nightly and release runs, run the full suite.
fetch-depth: 2, git diff --name-only HEAD^1 HEAD is exactly the PR's change.cargo metadata, npm query/workspaces, go list -deps, pnpm --filter ...[origin/beta], Nx/Turbo affected). Add the transitive reverse dependencies.See references/affected-packages.md for a worked Cargo example.
Swatinem/rust-cache shared-key, actions/setup-node cache: npm, setup-python cache: pip). Don't let every job write its own giant cache.save-if: ${{ github.event_name == 'push' }}) so PR caches don't evict the good ones.taiki-e/install-action for cargo-nextest, actionlint, and similar) instead of compiling tools in CI.concurrency:
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
PRs cancel their own older run. Pushes to protected branches don't cancel, so every merged commit gets a full result.
Runner gotchas:
runs-on is fixed when a run queues. The stuck run must be cancelled (with the user's yes) before anything moves.runs-on (${{ vars.RUNNER || 'ubuntu-latest' }}) so it's one switch, then delete the old self-hosted branch of the expression once hosted is proven. Hosted minutes on a private repo count against the account's included minutes; tell the user before switching and never change a spending limit yourself.package.json, a system package). Install them in the job.if: failure()) are fine anywhere.retention-days: 1 for hand-offs between jobs in the same run and for debug-only artifacts. Keep longer retention only where a documented release step downloads the artifact later, and say which step in a comment.workflow_dispatch and on run cancel. Don't route around it with another credential. Push a commit or ask the user to dispatch.Before calling it done:
actionlint) and run any repo CI guard scripts and their tests.Report what you didn't verify (for example, "nightly not yet observed").
if: on a changes job; no workflow-level path filter on a required-check workflow.changes job fails loud, never a green skip.main, merge queue, push and nightly.retention-days: 1 unless a release step needs longer.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub blackviperxiii-ui/vstack --plugin vstack74 skills in this plugin
/architectSketch types, signatures, and module structure before code, then stay in the loop while implementation fills in. Use for /architect, 'architect this', 'design this', or non-trivial work where jumping to code would lock in the wrong shape./arenaSpawn N parallel candidates at the same task, pick a base, graft the strongest parts of the losers into it. Use for /arena, 'arena this', 'throw it in the arena', or when one attempt at a large or contested design or other non-trivial artifact would lock in the wrong shape./automate-meUse for 'automate me', 'create/update/refresh my -mode skill', 'turn/capture my preferences or working style into a skill', or wanting agents to follow how the user works. Drafts or revises a personal -mode skill via create-skill + unslop, optionally pulling fresh evidence from recent transcripts. /automate-me