No slash command · from code-foundations
Resource and verification rules for leading a long phased build run by many agent sessions on one shared machine. Covers phase gate scripts, disk hygiene, load caps, verifier assignment, fix-round limits, iOS Simulator vs real device, and speed review of an existing plan.
Ships in code-foundations. 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; scripts run unread.
A phased multi-agent build is bounded by the machine, not the models: disk, CPU load and repeated gate runs. These rules come from a seven-phase Rust build run by parallel Claude Code sessions on one 12-core Mac (cited as "the omni build"). Numbers marked "omni" are what that machine used; formulas marked "heuristic" are a starting point to measure against, not recorded derivations.
build already sequences that, and nothing competes
for the machine.plan. This skill reviews a plan for speed once it exists.Run the checklist in Read(${CLAUDE_SKILL_DIR}/references/plan-speed-review.md) on the plan, and write its table into the plan or next to it, before the first builder starts. It costs one reviewer session, and every finding it makes is multiplied by the number of gate runs and fix rounds that follow.
| Rule | Why |
|---|---|
Builders and verifiers run a job-scoped gate: this phase's steps only, incremental, last line PARTIAL. Only the lead's pre-commit run is full and may print PASS | omni: the nested lower-gate rerun was 87% of one phase-4 gate run and 58% of one phase-2 run (log timestamps) |
The full run is one flat gate (gates/all.sh): one target, one cargo test --workspace, then each phase's non-cargo steps. Never pN calling p(N-1) calling ... | Nesting builds one fresh target per level and runs the workspace tests at every level; it grows by one level per phase |
| A clean build runs once, in the lead's full run. Every other run is incremental | Clean building is about 1/15 of a nested run: it costs disk, not time. A stale incremental build is caught by the lead's clean run |
| Each gate refuses to start under a free-disk floor, takes a machine-wide lock, and deletes its per-run target when it passes. A failed run keeps its target for debugging and prints the path; the parent deletes it at job close | omni: 86 gate runs (targets up to ~7 GB each) were never deleted; build/tmp reached 308 GB, the disk filled, the agent tooling broke and two gates failed |
| Functional tests carry no timing thresholds. Timing lines are printed with the load; verdicts come only from a quiet run that refuses to start above a load limit and discards runs that end above it | At load 30-60, timing tests flaked, and builders lost rounds telling load from bugs. One "load" failure was a real deadlock; one was a cold compile cache past a 10 s test timeout |
Freeze files under check. Nobody edits a job's files while its verifier runs, and gates scope to the job's packages (-p) | One verifier's files were rewritten mid-check, voiding its verdict. Two more failed on another job's untracked test. That is 3 lost verifier runs in 10 jobs |
Read the gate's exit code and output, then commit in a separate command. Never gate && git commit, never gate | tee | A pipe reports the last command's exit code, so a failing gate looks like a pass |
Template: ${CLAUDE_SKILL_DIR}/scripts/gate-skeleton.sh. Copy the file (cp), then fill in its STEPS block. Don't
retype it: in testing, retyped gates dropped the lock and the cleanup, or swapped in flock, which stock macOS
lacks. Give each session its own GATE_JOB so job-scoped runs never share a target. It is
bash 3.2 safe and does the disk floor, stale-lock-aware mkdir lock, job-versus-full mode, PARTIAL, and trap
cleanup. STEPS holds functional checks only. A test with a latency or throughput threshold goes in the quiet
runner (gates/timing-pN.sh), even when the task lists it with the phase's other tests. Detail, the flat full
gate, the quiet runner, fuzzing and the shared test kit are in Read(${CLAUDE_SKILL_DIR}/references/gates.md).
build/target/<job>). Cargo locks a target, so
sessions never share one. A full gate's target is per run, deleted when the run passes, kept on failure until the job closes. Logs live apart from targets and
are kept.cargo clean --target-dir <dir>. Plain rm -rf is often refused by the permission check, and a
session blocked on that question stalls silently.du -sh after the first full run.df -h, du -sh build/*) and cleans before starting
more work whenever free space nears the floor.~/Library.CARGO_BUILD_JOBS=4 on 12 cores.| Job | Builder | First verifier |
|---|---|---|
| Untrusted input, sandboxing, auth, concurrency, timing | mid tier (Sonnet) | top tier (Opus), plus an automated security review of the builder's diff first |
| Ordinary code (UI, layout, tooling, rigs) | mid tier | mid tier |
| Wording, renames, fixtures, file moves, status checks | small tier (Haiku) | lead reads it |
| Plan and design reviews; the lead | top tier | — |
Use the Simulator or emulator for everything functional: builds, UI tests, flows, protocol attach. Use a real
device only for numbers the Simulator cannot give: frame rate and hitches, memory footprint, GPU traces, cold
launch, and real network legs. The Simulator runs on the host's GPU and memory, so its numbers say nothing
about the device. Whether a GPU render path works in the Simulator at all is not a given: confirm it with a
small smoke job early, before planning on it. Batch the
device work into one rehearsed script (gates/pN-device.sh), dry-run it on the Simulator first, and keep
the device session to plug in, one command, unplug. If the device is someone's personal phone, tell them before
each session.
df -h, uptime, roster. Clean, then start.PARTIAL never counts as PASS for a commit.What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (ryanthedev/code-foundations) — no native marketplace selected
npx claudepluginhub p/ryanthedev-code-foundations20 skills in this plugin
/aposd-designing-deep-modulesGuides module and API design using APOSD principles: generates multiple design alternatives, compares them on information hiding and interface depth, and produces a documented design decision. For creating new module/API design; not for assessing existing designs (use aposd-reviewing-module-design) or routine-level design (use cc-routine-and-class-design)./aposd-reviewing-module-designAssesses existing module and interface design for complexity symptoms: information leakage, shallow interfaces, pass-through layers, and unknown unknowns. Produces a structured assessment — not transformations (use aposd-simplifying-complexity to edit) and not new-design generation (use aposd-designing-deep-modules)./aposd-simplifying-complexityTransforms complex code by applying APOSD's pull-complexity-downward principle: resolves error hierarchies, collapses configuration, and moves caller-side logic into modules. Produces edited code; not for assessment-only review (use aposd-reviewing-module-design) or designing new modules from scratch (use aposd-designing-deep-modules)./aposd-verifying-correctnessVerifies implementation completeness across functional correctness, error handling, concurrency, and security dimensions using APOSD's post-implementation checklist. Run after a coding task is nominally complete, not during active bug investigation (use cc-debugging)./ca-architecture-boundariesApplies Clean Architecture's dependency-direction and SRP-by-actor rules to system-level boundary design: separates business logic from infrastructure, identifies actor-coupling risks, and enforces inward-pointing dependency arrows. For system scope (multiple components, layers, or services), not routine or module scope (use cc-routine-and-class-design)./cc-control-flow-qualityAudits and restructures control flow using Code Complete's nesting, cyclomatic complexity, loop design, guard-clause, and boolean simplification rules. Covers deep nesting, loop exit design, index naming, and callback chains. For statement-level flow inside a routine; not for routine/class structure (use cc-routine-and-class-design) or staging a broader refactor (use cc-refactoring-guidance).Other plugins' skills for the same job