with one click
debug
Debug a bug — reproduce, isolate root cause, fix.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Debug a bug — reproduce, isolate root cause, fix.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Query/store cross-project knowledge in Shared Brain.
Save session snapshot — handoff + CLAUDE.md update.
Create a standardized git commit.
End session — handoff + decisions + CLAUDE.md.
Time-boxed SENAR investigation before a task.
Socratic Q&A — ≤3 questions before a complex task.
| name | debug |
| description | Debug a bug — reproduce, isolate root cause, fix. |
| context | fork |
| effort | medium |
Systematically reproduce, isolate, and fix bugs.
Check active task (if any):
.tausik/tausik task list --status active
If active → .tausik/tausik task show {slug} → extract role, stack.
Load stack guide: Read harness/stacks/{stack}.md — use stack-specific pitfalls and conventions.
Search for known gotchas:
.tausik/tausik memory search "gotcha"
.tausik/tausik memory search "{error keyword}"
$ARGUMENTS = error message → start from that error$ARGUMENTS = file → investigate that file$ARGUMENTS = description → parse the symptomBefore fixing anything, confirm the bug exists:
pytest {test_file} -v --tb=long 2>/dev/null
npx jest {test_file} --verbose 2>/dev/null
Work backwards from the symptom:
git log --oneline -10 -- {file}mcp__codebase-rag__search_code for the function/variable name; Grep only as fallback when RAG is empty or staleIf your fix triggers a tausik verify failure (filesize / ruff / mypy / pytest), invoke the tausik-gate-fixer sub-agent instead of decoding stderr by hand:
Agent(
subagent_type="tausik-gate-fixer",
prompt="gate_name=<name>; stderr=<copied verify output>; relevant_files=<list>; task_slug=<slug>; goal=<task goal>",
model="sonnet",
)
Subagent model (phase=code-review): gate-fix diagnosis is a Sonnet-tier job (
model="sonnet"). Omittingmodel=is fine (inherits the session model) — a hint, not a requirement. Mapping:docs/ru/research/model-routing-matrix.md.
It returns a JSON {gate, family, plan: [{step, action, target, change, why}], meta} with a 1-3 step fix plan. Apply the plan, re-run tausik verify. The sub-agent is read-only — never applies edits itself. Fall back to the standard manual flow if .claude/agents/tausik-gate-fixer.md is missing on legacy installs.
## Debug: {issue summary}
### Root Cause
{1-2 sentences explaining what went wrong and why}
### Fix
File: `{file}:{line}`
Before: {buggy code}
After: {fixed code}
### Verification
{test results or manual verification steps}
### Prevention
{how to prevent this class of bug in the future}
Suggest next: "Run /ship to review, test, and commit the fix."
.tausik/tausik memory add gotcha "{title}" "{description}" for non-obvious bugs.tausik/tausik task log {slug} "Debug: root cause — {description}, fix applied"When tracking the bug across files, prefer the cheapest tool that fits:
mcp__codebase-rag__search_code — first choice for symbols, error messages, patterns, "where is X used". Returns ranked chunks, not full files. Cheapest token-wise.Grep — only when you already know which file(s) to search in, or when RAG is empty/stale.Read — only when you have an exact path. Don't Read unfamiliar code — use search_code first to locate the relevant chunks.\ vs /), encoding (cp1252 vs utf-8), and subprocess (shell=True behaves differently).