원클릭으로
debug
Fix bugs, crashes, errors, or failing tests. Use when "it's broken", "getting an error", "test is failing", or the cause isn't obvious.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Fix bugs, crashes, errors, or failing tests. Use when "it's broken", "getting an error", "test is failing", or the cause isn't obvious.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Fully autonomous bug hunting pipeline — discover bugs in a scoped area using parallel subagents, independently triage each finding, fix confirmed issues with subagents, then audit all fixes against repo constraints and target platforms. Runs end-to-end without user interaction.
Answer questions about how 'mi' works, write new tools, or modify the harness. Use for "how do you work", "write a tool", "add a tool", "create a tool", "extend yourself", "edit yourself", "what tools do you have", or any introspection/modification of the running agent.
Scan the codebase and classify every fact by lifecycle stage — tag @draft, @spec, or @implemented based on what the code actually shows. Add missing facts, fix inaccurate ones, remove obsolete ones. Use when asked to discover facts, bootstrap or update a fact sheet, scan the codebase for truths, sync facts to match the code, or audit the fact sheet for accuracy.
Operate on @spec facts — implement them in code, then tag @implemented. Use when asked to implement facts, implement the spec, build from the fact sheet, make facts true, or work through unimplemented requirements.
Operate on @draft facts — collaboratively refine them into precise, actionable @spec facts. Resolve ambiguities, fill gaps, eliminate contradictions, and sharpen labels until every fact is ready to implement. Use when asked to refine facts, clarify the spec, review facts for quality, or "work on facts" with the user.
Manage .facts files — atomic, validatable truth statements about a project. Install, check, list, add, edit, remove, and lint facts via the CLI. ALWAYS read this skill when the user mentions facts in any capacity.
| name | debug |
| description | Fix bugs, crashes, errors, or failing tests. Use when "it's broken", "getting an error", "test is failing", or the cause isn't obvious. |
Do not propose a fix before step 1 completes. A bug you cannot reproduce is a bug you cannot fix.
Reproduce. Write a minimal repro before touching the suspected code. Either:
/tmp/mi-repro-<slug>.sh (or .py, etc.) that exits non-zero on the bug, orObserve. Capture actual vs expected side-by-side. Collect stack traces, logs, and intermediate state (print/console.log, set -x, a debugger, or structured logging). Write observations to /tmp/mi-debug-notes.md if the trail is long. Use this format:
repro: python cli.py export --col foo
expected: CSV with column "foo" written to stdout
actual: ValueError: 'foo' not in index (traceback line 42 cli.py)
Do not theorize yet. Record only what you observe.
Hypothesize. State one explanation explicitly: "I believe X because Y." One at a time. If you have several, pick the cheapest to test first. Write it down before you test it.
Test the hypothesis. Change exactly one variable, re-run the repro, record the result. If the hypothesis is wrong, revert the change before trying the next one — do not stack speculative edits.
If the fix requires new code rather than a surgical change, call skill("tdd") and follow its red/green/refactor loop before proceeding to verification. Do not proceed without loading it.
Verify the fix. The repro now passes AND nothing else broke. Before declaring done, call skill("verify") and follow its body for the broader check (lint, typecheck, full test suite). Do not proceed without loading it. Keep the repro script or test committed where useful — it's a regression guard.
Add tests if requested. If the original prompt included "add tests" or "write tests", the fix is confirmed — now call skill("tdd") and follow its body to structure the test-writing phase. Do not write tests inline without loading it.
Writing or rewriting multi-line files. Do not use echo "...\n..." (no real newlines without -e) and do not use sed to insert multi-line blocks (sed runs idempotency is hard to control and duplicates lines on retry). Use one of these instead:
cat > file.py <<'EOF'\n...\nEOFpython3 -c "open('file.py','w').write('''...\n...\n''')"If the file already exists and you are patching one line, sed -i 's/old/new/' is fine. For anything involving indented blocks, write the whole file fresh.
Red flags — stop and ask the user:
If you cannot reproduce after a reasonable effort, stop and say so. Request more information (exact command, environment, inputs, version). Do not guess-patch an unreproduced bug.