/luismc-delivery:delivery-ci-setupfrom luismc-delivery
Guided CI setup for Options 1 to 4. Asks every question (no defaults), writes .delivery/config.json, installs the CI files, runs the doctor and prints the by-hand list.
Ships in luismc-delivery. 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.
Set up where CI runs, one OS at a time. You are the guide; the engine is ${CLAUDE_PLUGIN_ROOT}/scripts/delivery_ci_setup.py. Rules for you:
Run python3 ${CLAUDE_PLUGIN_ROOT}/scripts/delivery_ci_setup.py facts. It lists the track, whether a shard table and an installer workflow exist, which OS the shards use, and the options already chosen. Say what you found in two lines. Ask for the track if it is null. It is a multi-select: one or more of ts, go, rust, dotnet. A project with a Rust workspace and a pnpm workspace picks rust and ts. With several tracks the installer takes them comma-separated (--track rust,ts) and writes one ci.yml, one gate.json and one ci-scope.json that cover all of them. facts lists every track it finds in tracks. Put the answer in the answers file as "track": ["rust", "ts"] (a plain string still works for one track). delivery_ci_setup.py apply passes every track to the installer and prints them, so there is no need to run the installer yourself.
Ask once: "When CI is green for a pull request, who merges it? auto: merge on green (the watcher merges it, and nothing else does) or manual: user merges (the watcher never merges, and the hooks refuse an agent's gh pr merge)?" Put the answer in the answers file as "merge_mode": "auto" or "manual". The engine refuses without it and writes watcher.merge_mode. The delivery plugin's own default, when nothing is set, is auto.
Show this table once:
| Option | Where CI runs | Cost | Needs by hand |
|---|---|---|---|
| 1 | Your own runners, on any machines you have | No per-minute bill; your machines and power | Install a runner on each machine |
| 2 | GitHub-hosted runners | Per minute; the GitHub spending limit is the hard stop | A spending limit, larger runners if used |
| 3 | Claude cloud sessions, Linux only, no Actions, no webhooks | Counts against the Claude plan | A statuses-only token and the ruleset change |
Option 4 is Option 1 plus a fallback after a wait (section 3, "Option 4"). It is not a fourth answer: the OS is answered Option 1, and the fallback questions follow.
For each OS the product tests on (linux, windows, macos), ask: "Which option for : 1, 2 or 3?" Option 3 is for Linux only.
Option 1. For each machine that will run a runner: its name and OS. The runner labels. Does a ready PR run queue one at a time (serial)? The memory ceiling and the CPU ceiling of each machine, in percent. wait_min: how many minutes a job may wait before the owner adds a runner on another machine (10 is only an example). Tell the owner that one runner of a label is the first bottleneck, so a second machine is the first fix.
Option 2. The runner label or size per OS (a 2-core hosted runner is too small for a large suite). Whether larger runners are used (they need a paid plan). A monthly minutes cap: offer it, say that without it only GitHub's spending limit stops the bill, and accept "none" as an answer (store null). If Windows is hosted: does it run only the small Windows set?
Option 3. The repository (OWNER/NAME). The branches to watch. The shard timeout in minutes. The NAME of the environment variable that holds the statuses-only token (never ask for the token). A cap on sessions per day: offer it, accept "none" (store null).
Option 4 (only for an OS answered Option 1; ask whether the owner wants it). Per such OS, which fallback: cloud (Linux only) or github-hosted. X: after how many minutes of waiting for a runner the fallback may start (10 is only an example; only runner waits count). Optional caps, each answered by a number or "none" (null): max_shards_per_day and max_minutes_per_month (hosted minutes). Say plainly: without caps nothing but GitHub's spending limit stops the cost, and that limit is a by-hand step. Say that unattended, a fallback may start up to an hour late (the hourly routine is the only watcher when no session is open). For cloud: the URL of the routine's API trigger and the NAME of the variable that holds its token. The answers go in the fallback section; the engine writes ci.fallback. Optional limits (browser_workers, integration_workers, memory_gib per option) go to ci.limits.
Write the answers as JSON in the shape documented in the engine's header, to a scratch file, then run:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/delivery_ci_setup.py apply --answers <file> --root <project>
Add --set-variables only if the owner says yes to running gh variable set for them. If the engine refuses, it lists the missing answers: ask them, do not fill them in. The engine writes .delivery/config.json, runs delivery_ci_install.py install, runs the doctor and prints the numbered by-hand list.
Run the installer (install and update) on the owner's PC, from the installed plugin, not inside a cloud agent: a cloud sandbox refuses to run it from a cloned checkout. A cloud agent can then merge any .new files and commit.
Show the numbered by-hand list as printed. Say that some doctor lines fail until the list is done, and that delivery_doctor.py re-checks every item. For an item the doctor cannot read (billing, a remote machine, the cloud environment), tell the owner to run delivery_ci_setup.py confirm <item> after doing it. Say how to change the choice later: run /delivery-ci-setup again; it asks everything again and prints what the new choice still needs. Nothing is removed from machines or GitHub.
The workflows read the per-job CRSP_<JOB> first (job key uppercased, non-alphanumerics as _, e.g. CRSP_LINUX_SUITES; one per job, sized labels), then CRSP_RUNS_ON_LINUX / CRSP_RUNS_ON_WINDOWS / CRSP_RUNS_ON_MACOS first (JSON label arrays written by the runner service, e.g. ["self-hosted","linux","x64","example-label"]), then the old CI_RUNS_ON / CI_RUNS_ON_WINDOWS, then the GitHub-hosted default. A new setup writes CRSP_RUNS_ON_LINUX. When both the new and the old variable are set, the new one wins. The way back is to delete CRSP_<JOB> and CRSP_RUNS_ON_* (or set it to the old labels). The doctor says which variable each OS resolves to and warns when the two differ.
If the project uses a test, build or package tool outside playwright, vitest, jest, pytest, go, cargo, dotnet and pnpm (for example Cypress, Selenium, Gradle, Maven or yarn), ask the owner to declare it under stack in .delivery/config.json: e2e, unit, build (tool names), package_manager, e2e_spec_globs, test_globs. delivery_doctor.py check stack.tools fails for an undeclared tool it cannot check, whatever the enforcement mode says. A declared tool is run, not judged.
What SKILL.md sets; muted values are Claude Code's defaults
sonnetmedium2 skills in this plugin
Other plugins' skills for the same job
npx claudepluginhub luis-mc/dev-standards --plugin luismc-delivery