agent-common
Use when a cc10x agent starts a task: the shared preamble for the memory protocol, the contract format, and the output rules.
Use when diagnosing a defect or regression: feedback loop FIRST, root cause before fix, blast radius after fix. Covers the 10-rung construction ladder, LSP-powered tracing, hypothesis quality criteria, and four-phase investigation.
Claude Code
$ npx -y skills add romiluz13/cc10x --skill debugging --agent claude-code
Codex
$ npx skills add romiluz13/cc10x --skill debugging -a codex -y
Cursor
$ npx skills add romiluz13/cc10x --skill debugging -a cursor -y
Gemini CLI
$ npx skills add romiluz13/cc10x --skill debugging -a gemini-cli -y
GitHub Copilot
$ npx skills add romiluz13/cc10x --skill debugging -a github-copilot -y
OpenCode
$ npx skills add romiluz13/cc10x --skill debugging -a opencode -y
Windsurf
$ npx skills add romiluz13/cc10x --skill debugging -a windsurf -y
name: debugging description: | Use when diagnosing a defect or regression: feedback loop FIRST, root cause before fix, blast radius after fix. Covers the 10-rung construction ladder, LSP-powered tracing, hypothesis quality criteria, and four-phase investigation. allowed-tools: Read Edit Bash Grep Glob LSP user-invocable: false
**Feedback Loop FIRST:** No hypothesis without a repro loop. No fix without root cause. No fix without blast radius scan.
A hypothesis without a repro loop is a guess. Before H1, build a fast, deterministic, agent-runnable signal that turns red on the bug.
1. Failing automated test (unit/integration) — best: lives at a seam, reusable as RED 2. `curl`/HTTP request with asserted response 3. CLI snapshot diff (run command, diff stdout/stderr/exit) 4. Headless browser script (real DOM/runtime crash) 5. Trace replay (recorded request/log/event re-run) 6. Throwaway harness (tiny script calling the suspect function) 7. Property/fuzz check (when failing input is unknown) 8. `git bisect run` (regression with existing test) 9. Differential old-vs-new (last-good vs HEAD behavior diff) 10. Human-in-the-loop (LAST resort: scripted manual steps)
**Tighten the loop** — treat it as a product. Once you have a loop, keep tightening:
A 30-second flaky loop is barely better than none; a 2-second deterministic one is a debugging superpower.
**Red-capable completion criteria** — the loop is done when you can name **one command** (a script path, a test invocation, a curl) that you have **already run at least once** (paste the invocation and its output), and it is:
No red-capable command, no hypothesis phase. If you catch yourself reading code to build a theory before this command exists, STOP.
**Flaky bugs:** run in a tight loop (`for i in $(seq 1 N); do ...; done`), record hit rate (e.g. `3/50`), treat raising that rate as loop iteration.
STOP. Do NOT advance to hypothesis. Return BLOCKED with:
Use LSP to trace root causes through the codebase:
Don't guess where a value comes from — trace it with LSP. Don't grep for a function name — use Find References to get every caller with type info.
1. **Understand** — expected vs actual, when did it start? 2. **Git History** — `git log --oneline -20 -- <files>`, `git blame`, `git diff BASE..HEAD` 3. **Compounded knowledge** — if `docs/solutions/debugging/` exists, check for a prior write-up matching this symptom before starting fresh investigation 4. **LOG FIRST** — collect error logs, stack traces, run failing commands. The error text is the highest-density evidence you will ever get; acting first destroys or masks it. 5. **Before-capture** — persist step 4's capture while the bug is reproducing: save the red output (log excerpt, command output, screenshot) to a durable artifact BEFORE writing the fix. It is the "before" half of the evidence pair; the fixed state alone proves less, and the failing state is cheapest to capture while it is red. 6. **Feedback Loop** — build repro signal (construction ladder above). No loop → fail closed. 7. **Variant Scan** — identify which variant dimensions must keep working (locale, config, env, platform, data shape, concurrency). A fix verified on one variant routinely breaks a sibling variant.
**Repro Minimisation:** After reproducing the bug, shrink to the smallest scenario that still goes red before forming hypotheses. Cut inputs, callers, config, and environment one at a time. Re-run after each cut. Every remaining element is load-bearing — removing it should make the bug disappear.
**Why:** A minimal repro shrinks the hypothesis space. The fewer moving parts, the fewer places the bug could hide.
1. **Read the code around the failure** — not just the failing line, the surrounding logic 2. **Check for recent changes** — `git diff` the files involved 3. **Look for similar patterns** — grep for the same anti-pattern elsewhere 4. **Identify the mechanism** — not "what's wrong" but "how does the wrong thing happen"
Generate 3-5 ranked hypotheses (H1, H2, ...) with 0-100 confidence BEFORE testing any of them — fewer than 3 means you anchored. Rank by explanatory power — which hypothesis explains the most symptoms with the fewest assumptions. Testi
The Loop Engine for Claude Code — engineer the loop, not the prompt. 1 router · 14 agents · 21 skills · 8 workflows. Fail-closed gates, test honesty, anti-anchored review.
Use when a cc10x agent starts a task: the shared preamble for the memory protocol, the contract format, and the output rules.
Greenfield architecture design: map functionality flows, draw components, design APIs, classify dependencies, plan observability.…
Use when writing production code test-first: the RED-GREEN-REFACTOR cycle, false-RED detection, vertical slicing, scope…
Answers questions about cc10x itself — what it is, how to install and configure it, how the router, workflows, memory, and hooks…
Routes build, debug, review, plan, QA, and triage requests through the cc10x workflows (task graphs, workflow artifacts, gates);…
Two-mode skill: (1) adversarial review — spec compliance + code quality + security, confidence-scored findings with file:line…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.