No slash command · from cc10x
Guides test-first development with RED-GREEN-REFACTOR discipline, vertical slicing, false-RED detection, and test process automation.
Ships in cc10x. 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.
Iron Law: NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST.
Read only what's needed:
references/testing-patterns.md — test structure, isolation, naming; load when writing the first test of a cycle or a test feels awkward to structurereferences/test-data-and-mocks.md — mock discipline, test data factories; load when a test needs fixtures/factories or you are about to mock anythingreferences/integration-and-live-proof.md — integration test guidance, live verification; load when the slice crosses a service/DB/API boundary or the plan names live proofCI=true npm test, npx vitest run (NOT npx vitest), CI=true npx jest — watch mode never exits, so the agent hangs waiting for a prompt that never returnstimeout 60s npx vitest run if uncertain about CI=truepgrep -f "vitest|jest" || echo "Clean". Kill if found — orphaned watchers hold ports and re-run stale code, producing false greens in later cycles.Write one failing test for the current slice. Run it. RED = a behavioral failure ("X is not a function", "expected 3, received undefined") — never a bare exit code.
False-RED guard (CRITICAL): Exit 1 from an import/syntax/collection ERROR is a broken harness, not a RED — fix the harness and re-run. Record the observed failure reason verbatim.
Write the minimum code to pass the test. No extra features, no abstractions for hypothetical futures. No unrelated test breakage. If existing tests break, fix the code not the tests.
Improve code quality while keeping tests green. If tests fail during refactor, revert — a red test proves it wasn't a refactor, and debugging forward mixes two changes. Re-run after every refactor step.
Safety-Check Guard (MANDATORY): Never simplify away a safety check during refactoring. Safety checks include:
If a safety check seems unnecessary, verify with a test that proves it's dead code before removing. "Looks redundant" is not sufficient evidence.
Build in thin vertical slices that cross all layers: UI → API → logic → data → test. A horizontal slice (all UI, then all API, then all logic — or all tests first, then all implementation) defers integration risk to the end and produces untestable layers. Each slice should be independently verifiable and shippable.
One seam, one test, one minimal implementation per cycle. Each test is a tracer bullet that responds to what the last cycle taught you — work one vertical slice at a time.
Test only at pre-agreed seams. A seam is the place where a module's interface lives: where you can observe or alter behavior without editing in that place, which is how a test observes behavior without reaching inside (cc10x:codebase-design defines the term). Before writing any test, know which seam you're testing at. Prefer existing seams to new ones; use the highest seam possible; the fewer seams across the codebase, the better (ideal is one). If the plan provides a ### Test Seams subsection or an Interfaces block, draw your seams from there.
Implementation-coupled anti-pattern. A test is implementation-coupled if it mocks internal collaborators, tests private methods, or verifies through a side channel (querying the database instead of using the interface). The tell: the test breaks when you refactor but behavior hasn't changed. Test through the public interface, not internals.
Record your seams (enforced contract fields). Your Router Contract carries two seam fields:
TEST_SEAMS: [seam names you actually tested at]SEAM_GATE_STATUS: "confirmed" | "proposed" | "disagreed" | "not_applicable"Set SEAM_GATE_STATUS as follows:
confirmed — the plan provided test_seams and you used them (TEST_SEAMS non-empty, matching the plan).proposed — no plan (direct/no-plan path) OR a legacy plan whose phase omits test_seams; you proposed seams at BUILD_PREFLIGHT (TEST_SEAMS non-empty).disagreed — the plan's proposed seam cannot exercise the phase's real risk. Record the disagreement in DECISIONS and either propose a better seam (TEST_SEAMS non-empty with the better seam) or block on genuine ambiguity (STATUS: FAIL, REMEDIATION_REASON: "Ambiguous test surface — no seam exercises the real risk").not_applicable — build_scope=trivial; no seam expectation.The router validates these per build_scope (see the contract-override table). This is the enforced gate — not advisory.
Before writing code: read 2-3 existing similar components in the repo. Match naming, file structure, export style, test patterns. Follow the project's conventions — don't introduce a new pattern when an existing one works.
LSP before writing: Use LSP to find definitions, references, and type information before writing code that interfaces with existing modules.
If the build scope grows beyond the approved phase — new files not in the plan, new dependencies, API contract changes — emit SCOPE_INCREASES: ["new scope item"] in the contract. The router decides whether to escalate to a full BUILD (with planner + reviewer) or approve the expansion.
Decision Checkpoints (return FAIL when triggered):
| Trigger | Action |
|---|---|
| Changing >3 files not in plan | FAIL with extra files named |
| Choosing between 2+ valid patterns | FAIL with competing options |
| Breaking existing API contract | FAIL with impacted callers |
| Adding dependency not in plan | FAIL with dependency name |
| Touching a later planned phase early | FAIL with skipped phase |
Write minimal diffs. A bug fix doesn't need surrounding cleanup. A one-shot operation doesn't need a helper. Don't add error handling, fallbacks, or validation for scenarios that cannot happen. Trust internal code and framework guarantees in production code — no runtime re-validation for scenarios the types or the framework already exclude; only validate at system boundaries. When your feature depends on a framework behavior, pin it with a test instead: guarantees have edge cases, and the test costs less than the defensive code.
| Excuse | Reality |
|---|---|
| "Too simple to test" | Simple code breaks. Test takes 30 seconds. |
| "I'll write tests after" | "After" never comes. Write the test first — it IS the spec. |
| "It's just a refactor" | Refactors break things. Run the tests before AND after. |
| "The existing tests cover this" | Then your new test will pass immediately — that's a false RED. |
| "I manually tested it" | Manual testing doesn't survive the next refactor or CI run. |
| "Adding tests would slow down delivery" | Debugging untested code takes longer than writing the test. |
| "The framework handles this" | Pin the depended-on behavior with a test — don't re-validate at runtime. |
A tautological test recomputes the expected value the same way the code does — it passes by construction and can never disagree.
// BAD — tautological: recomputes expected value using same logic
const expected = items.reduce((sum, x) => sum + x.value, 0);
expect(calculateTotal(items)).toBe(expected);
// GOOD — expected value comes from an independent source of truth
expect(calculateTotal([{value: 10}, {value: 20}, {value: 30}])).toBe(60);
Rule: Expected values must come from a known-good literal, a worked example, or the spec — never from re-running the same algorithm the code uses.
If coverage-thresholds.json exists, run coverage and compare. Below thresholds → FAIL. If no thresholds file, skip coverage check.
Ranked by bugs caught per token — behavioral tests catch the most; performance tests without a stated requirement are speculative work.
If tests are hard to write, the code is hard to test — fix the code, not the test. Pure functions are easy to test. Side effects are hard. Isolate side effects at boundaries; keep core logic pure.
No test runner: a scripted check with real exit codes is TDD evidence; manual browser verification is not. Never fabricate TDD_RED_EXIT or TDD_GREEN_EXIT: leave both null. For a Pure HTML/CSS/JS project with no runner and no scripted check, the rule is: require a runner or block (component-builder and bug-investigator define the exact return).
What SKILL.md sets; muted values are Claude Code's defaults
22 skills in this plugin
/agent-commonUse when a cc10x agent starts a task: the shared preamble for the memory protocol, the contract format, and the output rules./architectureGreenfield architecture design: map functionality flows, draw components, design APIs,
classify dependencies, plan observability. For multi-component, API, schema, auth, or
integration-heavy work. For retrofitting existing code, use codebase-hygiene instead.
/cc10x-guideAnswers questions about cc10x itself — what it is, how to install and configure it,
how the router, workflows, memory, and hooks operate, and how to troubleshoot.
Use this skill when: the user asks ABOUT cc10x — "what is cc10x", "how do I
configure cc10x", "why isn't cc10x activating", "how do cc10x workflows work",
"how does cc10x memory work", "cc10x troubleshooting".
NOT for performing work: "set up cc10x for me", build, debug, review, or plan
requests route to cc10x-router. "Update cc10x" / "upgrade cc10x" route to the
update skill. This skill answers questions; it never edits project code, never
writes files, never runs workflows.
Triggers: what is cc10x, cc10x help, cc10x guide, how to use cc10x, configure cc10x,
cc10x setup, cc10x faq, cc10x troubleshooting, cc10x not working, cc10x not activating.
/cc10x-routerRoutes build, debug, review, plan, QA, and triage requests through the cc10x workflows (task graphs, workflow artifacts, gates); it is the single entry point for cc10x code work.
Activates when the user asks to implement, fix, review, plan, test, refactor, or continue code work.
Trigger keywords: build, implement, create, write, add, review, audit, debug, fix, error, bug, broken, plan, design, architect, spec, brainstorm, test, refactor, optimize, update, change, research, cc10x, c10x.
Hand-off: questions about cc10x itself belong to `cc10x-guide`, and "update cc10x" belongs to the `update` skill.
/codebase-designCanonical deep-module vocabulary (module, interface, depth, seam, adapter,
leverage, locality) for designing a module's shape — a lot of behaviour
behind a small interface at a clean seam, testable through that interface.
The single source of truth for these terms; other skills (architecture,
codebase-hygiene) point here instead of restating them.
Use when designing or improving a module's interface, finding deepening
opportunities, deciding where a seam goes, or making code more testable.
/codebase-hygieneTwo-mode skill: (1) find semantic duplicates — functions doing the same thing
under different names, invisible to copy-paste detectors; (2) deepen shallow
modules — thin wrappers and pass-through layers that spread complexity.
Advisory and read-only; changes route through BUILD with full gates.
npx claudepluginhub romiluz13/cc10x --plugin cc10xOther plugins' skills for the same job