/dstack-core:reduce-compile-timefrom DStack Core
Diagnoses and reduces slow local or CI builds by analyzing dependency graphs, build units, profiles, linkers, caches, and debug info from toolchain timing reports.
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 build costs too much on the clean run or on the edit-compile-test loop. This skill derives what the build owes its consumers, measures where the time goes, and rebuilds the structure that costs it or corrects the setting that costs it. No move changes observable behavior: the same artifacts come out, faster. The proof is the toolchain's own timing report taken the same way before and after, plus the artifact checks that show the contract still holds.
State what the build owes and to whom, from consumer evidence rather than from the build files as they grew. The contract names the artifacts each consumer uses (binaries, libraries, test executables, published packages), the guarantees behind each one (reproducibility, supported targets and toolchain versions, the debug information crash triage needs, the optimization level of what ships), and the loop a developer must get (how fast an edit compiles, links, and runs its tests). Sources are who downloads or links each artifact, which checks protect which guarantee, and how developers actually run the loop. Build files record how the graph grew, not what it owes. A guarantee no consumer uses is residue waiting for a classification; a consumer need the graph ignores is a gap to report.
Run the toolchain's own timing report first and keep it as the baseline; wall-clock guesses cannot rank work. The build finishes when its longest dependent chain finishes, not when the total work sums, so find the critical path and name the units on it. Each toolchain note below names its timing command and its graph command.
The report decides between two cases, and the case decides the method:
For a rebuild case, name the structure: one unit everything waits on, a header or module that fans out, generic or macro expansion repeated per unit, a code generator in the hot path, link time dominated by one oversized unit, or a dependency pulled in for one function.
Walk the dependency graph and the build configuration. Classify each unit, dependency, feature, and setting with a one-line reason:
Nothing is kept or cut without a classification.
Boundary surfaces each need their own explicit yes before they change:
Present each surface with its class. A no keeps it for good; silence is not a yes; what static inspection cannot resolve counts as boundary. Interior surfaces need no ask: how code splits into units inside those surfaces, internal dependencies, dev and test profiles, and the cache and linker choice for local builds.
Take the measured dominant cost first. Apply one move, rerun the same report, keep the before and after; revert a move whose number did not drop. No move removes a check the contract needs; a check that looks removable is a report to the repository owner, not a change. Finish the target with its proof green and commit it, or revert to the last green state; never leave a half-rebuilt graph.
Reach here only when the measurement clears the structure. A cache or a faster linker laid over a rebuild-case structure hides the cost instead of removing it.
The graph's shape is the cost. Rebuild the structure instead of patching around it: split the blocking unit from its callers' usage, delete the dependency or the fan-out rather than caching over it, and leave no shim unit that re-exports the old shape.
Each note names the timing command for the measure step, the graph command for the classify walk, and the flags the moves use.
Rust: cargo build --timings writes an HTML report under target/cargo-timings/; cargo tree prints the dependency graph and cargo tree -d lists dependencies compiled in more than one version. Set debug = "line-tables-only" in the profile, point rustflags at mold or lld with -C link-arg=-fuse-ld=..., and run cargo under RUSTC_WRAPPER=sccache for a shared compile cache.
C and C++: Ninja records each command's start and end in .ninja_log; ninjatracing <build-dir>/.ninja_log > trace.json turns that log into a trace for chrome tracing or speedscope. Use ccache through CMake's CMAKE_C_COMPILER_LAUNCHER and CMAKE_CXX_COMPILER_LAUNCHER, compile with -g1 or split debug info with -gsplit-dwarf, and size ninja -j N to memory.
Go: time a cold build and a warm one separately (go clean -cache, then time go build), because the build cache under GOCACHE makes the warm number the honest local figure. go build -debug-actiongraph=<file> writes the action graph whose dependency chains name the critical path, and -p n caps parallel build commands. go mod graph and go mod why -m <module> expose unneeded modules and go mod tidy removes them. Set CGO_ENABLED=0 when no cgo is required, since the C toolchain then never runs.
TypeScript: tsc --extendedDiagnostics prints where the compiler spends its time, and tsc --generateTrace <dir> writes a trace that @typescript/analyze-trace reads. Turn on incremental for .tsbuildinfo reuse, split the program with project references, and let the bundler transpile while tsc --noEmit checks types.
JVM: gradle --profile writes a per-task report under build/reports/profile/ and gradle --scan opens the full timeline; set org.gradle.parallel=true, org.gradle.caching=true, and --max-workers to memory. Maven prints a per-module reactor summary at the end of every build; mvn -T 1C builds modules in parallel.
The stated contract, the classification ledger with its one-line reasons, the boundary list with each answer, the diff per target, and the timing reports before and after on a clean build and on the common incremental edit. The artifact checks that show the contract holds go with them: the test suite, and binary size or symbol checks where consumers depend on them. One measured baseline per toolchain, and no move kept on faith.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub gosuda/dstack-skills --plugin dstack-core89 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.Other plugins' skills for the same job