/dstack-core:reduce-ci-timefrom DStack Core
Shortens CI pipelines by measuring wall time, queue wait, and build minutes against merge-protection and release-gate contracts. Walks workflow files, job graphs, and step durations to find the critical path and tune or rebuild the job structure.
Ships in DStack Core. 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.
A pipeline costs more wall time than the work behind it, or its build minutes grow every month. This skill shortens one pipeline against the verdicts merge protection, release gates, and readers of a red run need. It derives the change from evidence, tunes a sound structure in place, and rebuilds the job graph when the structure is the cost. A required gate changes only on its own explicit yes. Edits stay in workflow files and build scripts, and version control rolls everything back.
Write what the pipeline owes before reading its shape. Read the provider's required-check or branch-protection settings, the release and publish gates, and the failures that actually blocked a merge or release. The workflow files are evidence for the walk below, not the source of the contract.
For each contract item, record what it proves, who needs the verdict, which change or release it must block, and whether it is required, optional, or observational. Also record how soon a contributor must get the first useful signal from an explicit team or repository rule; when no rule names one, put the cheapest independent proof first and measure that signal directly. A check that looks unused, duplicated, or too slow is still contract until its own answer says otherwise.
Read per-job and per-step durations from the provider's own data, never from a stopwatch. On GitHub Actions, gh run view <run-id> --json jobs returns every job with startedAt and completedAt, and the jobs API record adds the same timestamps for every step inside the job (docs.github.com/en/rest/actions/workflow-jobs). On GitLab, the jobs API carries duration and queued duration per job (docs.gitlab.com/api/jobs).
Record four numbers before touching anything: total run time split into queue wait and execution, the per-job table, the per-step breakdown of the heaviest jobs, and the time to the first job whose result a contributor can use. Compare like with like: same provider capacity, comparable change, and the most recent accepted run as the rolling baseline. The original run reports the total improvement; a later slowdown cannot pass by still beating that old run.
Find the critical path: the chain of jobs whose durations and queue waits add up to the finish time. The slowest job is not always on it; a quick job that every later job waits behind often is. Name the structure that costs the measured time: a serial chain, a duplicated build, a matrix nobody reads, a cache that never hits, or a job that proves what another job already proves.
Walk the whole pipeline once and classify every workflow, job, matrix cell, and step with a one-line reason:
Nothing is kept or cut without its classification. Several essential items may share one build or shard when equivalence is proved from inputs and outputs. A residue candidate that is required, named outside the repository, or cannot be resolved by static inspection is not cut; it joins the boundary list.
Interior covers job layout, ordering, caching, sharding, path filters, and fan-out inside the same set of proven properties. Interior changes need no ask, but a path filter is interior only while every contract item still runs for every change it protects.
Each boundary surface needs the user in this conversation to give its own explicit yes or no for that named surface, after it is presented with its class and cost:
A no keeps that surface for good. Silence is never a yes. A broad instruction to do all of it is no answer for a boundary surface.
Tune in place when the graph proves the contract with a sound shape and the measurements point at one slow step or one bounded mechanism: one cache that can be keyed correctly, one serial test suite that can shard, one duplicated download, or one setup step that can use a pinned binary.
Rebuild the job graph when the shape is the cost: serial stages hide independent proofs, several jobs rebuild the same inputs, matrix cells spend time proving properties nobody consumes, queue wait grows because the graph asks for more runner slots than it needs, or residue dominates the run. Then derive the replacement from the contract: build each distinct configuration once, fan out the independent proofs it feeds, run the cheapest useful proof first, and keep only one artifact for each distinct build output. Add no adapter that preserves the old graph inside the new one, and keep no second pipeline for comfort. The only allowed overlap is one comparison run or reviewable report that proves parity before the old definition is removed.
Evidence that the structure already meets the contract ends the pass with the measurements. Do not manufacture a rebuild to spend a speed request.
For a tuning case, apply one qualifying move at a time, rerun the pipeline, and record the numbers. For a rebuild, apply the derived graph as one atomic target. In either case, judge the move by the wall time of the whole run, plus queue wait when it adds jobs, and by minutes consumed when that is the cost under repair. Reject a move that speeds one step and slows the run.
Each move names its precondition, its check, and its risk. Skip a move whose precondition is false and check the next one. A cache loses when restore and save cost more than the work it saves; fan-out loses when the new jobs wait for runners.
actions/cache with hashFiles('**/package-lock.json'); GitLab cache:key: files), with a fallback key so close matches restore partially. Check: install step minutes, before and after. Risk: a cache that outlives its lockfile restores stale dependencies; the lockfile hash in the key bounds that, and a scheduled key reset clears drift.if, so required jobs still report on every change. Use a workflow-level filter only on a separate workflow whose every job can safely be skipped: paths or paths-ignore on one event, never both on the same event (GitHub), or rules:changes (GitLab), and include the workflow file itself plus generated and fixture directories the job reads. Check: number of jobs for a docs-only and a code-only change, plus the required check results on both. Risk: a filter too narrow skips a needed gate; every filtered-out job must still run for the paths that feed it, and a skipped workflow leaves its required checks unreported. Any change to a required trigger is boundary.concurrency with group: ${{ github.workflow }}-${{ github.ref }} and cancel-in-progress on GitHub; auto-cancel redundant pipelines with interruptible: true on GitLab), since a branch-only group collides across workflows and one workflow's run cancels the other's. Separate event types whose runs are not substitutes for each other into different groups. Check: aggregate run minutes across a day of pushes. Risk: a needed long run gets canceled, so deployments and release runs stay outside the cancelable group.Prove every contract item still has a verdict path. For each essential gate, plant one failure that passes that gate's prerequisites and that the gate exists to catch. The provider record must show that the intended check ran, that its named step failed with the planted reason, and that the named gate itself produced the blocking verdict on the tested revision. A protected operation that stays blocked for another reason, such as a pending review, does not prove the gate. If the provider cannot attribute the block to the named gate, run a clean control with the same prerequisites satisfied and require the planted run to stay blocked while the control does not. A skipped check, a failure in another job or step, or a red run without that evidence is unproven; repair the plant and run it again. Where no safe planted-failure path exists, parity is unproven: restore the last green pipeline and report the missing proof rather than substituting a weaker check.
Measure the changed pipeline the same way as the old one on comparable runs: wall time, queue wait, build minutes, first useful signal, and the per-job and per-step tables. Finish the target or revert it to the last green state; a half-old, half-new graph is not a result. Never erase a required validation to make the proof pass, and take no remote, credential, paid, or published change unless the user explicitly asked for that separate act.
The stated contract, the measured baseline and critical path, the classification table, each boundary surface with its yes or no, and the tuning or rebuild verdict with its reason. Hand back the edited workflow files, the before and after numbers for every applied move from the provider's own report, the parity evidence for every essential gate, and the accepted risks with their bounds. A move whose numbers did not improve is reverted, not explained.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
89 skills in this plugin
/abstract-wellUse when the user wants to classify abstractions as useful, bad, or busy and keep one shallow level. Not for tasks requiring source or remote-system changes./architectUse when non-trivial code needs a design, codebase architecture needs improving through survey and deepening, or one module needs targeted interface narrowing, seams, or testability. Not for rendered visual artifacts, deploy, or irreversible changes./architecture-simplificationUse when the user explicitly asks to simplify an architecture, collapse modules or crates, or cut a dependency graph within approved boundaries. Executes an approved layout direction slice by slice. Not for single-module cleanup: use code-simplification. Not for layout planning from nothing: use architect. Not for blind re-derivation: use breaking-driven./askmeUse when eliciting intent/scope/referents or gating long/bundled/high-stakes/hard-to-undo work: exhaustive/collaborative/adversarial/grill/gate/batch/interview/proposal/pairing. Grill me and grill batches select evidence-backed, chat-only grill mode. Not for scanning a stated request: use clarify. Not for one fork by default: use decide./audit-projectUse when the user says "audit my code", "find all the bugs", "review until clean", or "grill my changes". Not for remote, credential, or irreversible changes./autolearnUse when a verified fix yields a generalized well-abstracted invariant with enforcement or proof, or existing solution docs need bounded refresh. Not for unverified fixes, minor learnings, narrative/activity/weak-test stories, retrospective analysis, or remote migration.npx claudepluginhub gosuda/dstack-skills --plugin dstack-coreOther plugins' skills for the same job