/dag-workflow:debuggingfrom dag-workflow
Diagnoses and fixes bugs, failing tests, and performance regressions within DAG nodes. Provides a structured 6-phase workflow with feedback loops, reproduction commands, and redaction guidance.
Ships in dag-workflow. 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.
None: SKILL.md is the whole skill.
Use this skill for difficult bugs inside a DAG node.
A node worker cannot ask anyone questions or wait for answers.
Put content that would require consultation in ## Output.
If only a person can supply missing information, stop with DAG_NODE_STATUS: failed: clarification: <question> as the final report line.
Two node roles use this skill:
| Role | Work |
|---|---|
| Diagnosis node | Run phases 1 to 4. Follow the Output template below. |
| Fix node | Run phases 5 and 6 with the reproduction command from the prompt. |
Diagnosis may edit tracked source only for temporary instrumentation tagged as in Phase 4, within its declared write scope.
The fix node runs the reproduction command first:
DAG_NODE_STATUS: failed: missing-input: reproduction no longer fails.DAG_NODE_STATUS: failed: missing-input: reproduction fails differently: <symptom>.Skip a phase only when your prompt says so or you can justify it in ## Output.
Redact secrets before reporting commands, outputs or captured artifacts. Replace each secret with <REDACTED>.
Use environment variables in loops so credentials stay out of written content.
Captured artifacts carry auth headers. Quote only the lines needed for diagnosis.
If the redacted output is not enough to diagnose the bug, end with DAG_NODE_STATUS: failed: clarification: <what redacted artifact or access is needed>.
The main task is a precise pass/fail signal for this bug. Bisection, hypothesis tests and instrumentation depend on that signal; the remaining work is mechanical. Reading code cannot replace the signal. Give this step extra effort. Try different approaches before giving up.
git bisect run to drive it. Bisect only in a separate checkout outside the project. Use git worktree add with a temporary directory, then remove it afterwards. Never bisect in the shared working tree: it moves HEAD while other nodes write there.Once you have a loop, make it better:
A 30-second flaky loop gives little benefit. A 2-second deterministic loop is much more effective.
The goal is a higher reproduction rate, not a clean repro. Loop the trigger 100 times, run it in parallel, add stress, narrow timing windows, inject sleeps. A bug that fails 50% of the time is debuggable; one that fails 1% is not until you raise the rate.
Do not guess. List what you tried, then end with DAG_NODE_STATUS: failed: clarification: <what environment access, redacted artifact or permission is needed>. Examples of what to ask for: access to the environment that reproduces it, a redacted captured artifact (HAR file, log dump, core dump), or permission to add temporary instrumentation to a deployed system. Form no hypothesis without a loop.
Phase 1 is done when you can name ONE command (a script path, a test invocation, a curl) that you have already run at least once, with its invocation and redacted output recorded, and that is:
If you catch yourself reading code to build a theory before this command exists, stop. Jumping to a hypothesis is the exact failure this skill prevents. No red-capable command, no Phase 2.
Run the loop and watch it go red. Confirm:
Reduce the repro to the smallest scenario that still fails. Remove inputs, callers, configuration, data and steps one at a time. Rerun after each removal. Keep only elements needed for the failure. Stop when removing any remaining element makes the loop pass. This reduces possible causes and supplies the Phase 5 regression test. Keep temporary harnesses and fixtures untracked, in the scratchpad or within the declared write scope.
Write 3 to 5 ranked hypotheses before testing any. One hypothesis can bias you toward the first plausible idea. Each must be falsifiable and predict a result:
If X is the cause, changing Y will make the bug disappear or worse.
If a hypothesis has no prediction, refine or discard it.
Put the ranked list in ## Output.
Do not show it to anyone first or wait for feedback. Proceed with your ranking.
Each probe must map to a specific prediction from Phase 3. Change one variable at a time.
Tool preference:
Tag every debug log with a unique prefix such as [DEBUG-a4f2].
A tag lets one search find logs for cleanup; untagged logs can remain unnoticed.
Before diagnosis ends, remove its instrumentation and search for the tag to confirm removal.
Record findings in ## Output, not in the code.
For performance regressions, logs are usually unsuitable.
First measure a baseline with a timing harness, performance.now(), profiler or query plan.
Then bisect. Measure before fixing.
Decide whether the regression test has a suitable test boundary (seam). It must exercise the real bug pattern at its call site. A shallow test can give false confidence: one caller cannot reproduce a multi-caller bug. Likewise, a unit test may miss the chain that triggered the bug.
If no correct seam exists, record that as a finding in ## Output: the architecture is preventing the bug from being locked down. Do not fake a test.
If one exists:
diff against a pristine copy to prove the mutation landed.A fix can turn a check green by making the program trivially satisfy it, so state what the fix changes.
Name the set of inputs whose observable result the fix changes, as narrowly as possible.
Name the regression test or verify check that pins the boundary of that set: one case just inside, one just outside where feasible.
A fix whose changed set is wider than the bug's trigger is a red flag. Report it in ## Output, do not hide it.
Required before you report done:
## Output records the absence of a seam.[DEBUG- instrumentation remains.verify needs. This includes indirectly loaded fixtures and helpers. They must run after your report and during final audit. Untracked files can still be required.## Output states the Behavior change.## Output so future debuggers can use the finding.A diagnosis node ends its report with an ## Output containing these fields:
Reproduction command: <the exact argv line, runnable from the project root>
Observed failure: <exit code and the symptom line, redacted>
Hypotheses:
1. If <X> is the cause, changing <Y> will make the bug disappear or worse. (ranked, falsifiable; 3 to 5 in total)
Root cause: <file and line, or "not yet determined">
A fix node adds this field next to the diagnosis fields:
Behavior change: <inputs whose result changed, as narrow as possible> - pinned by <test name or verify check>
A node that ends failed, diagnosis or fix, finishes its ## Output with these two fields, in this order and last.
The plugin hands everything from Next: on to the next attempt, which sees nothing else of your work:
Next: <the hypothesis ranked next, and the files or lines to read first>
Tried and failed: <hypothesis or change - how it failed - why>, newest first
When this attempt is the third and each fix failed in a different place, say so in Next:.
Three fixes that fail in different places point at the design, not at one line.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
dag-node, bug-diagnosis, reproduction, bisection, instrumentation
npx claudepluginhub hyunjunjeon/claude-workflow-mods --plugin dag-workflow8 skills in this plugin
/anti-slopDiscipline that keeps meaningless code out of a change in any language - dead weight whose removal changes no behavior, types and casts that throw away what the code knows, module-patching tests, and Clean Code readability calls - loaded through load_skills by nodes that write code and by review-standards, with a scan after every Edit and Write for the shapes a pattern can find. A DAG node writes or changes code and lists this skill in load_skills, a review-standards node checks a change against it, or an anti-slop scan note appears after an Edit or Write./interviewUser-invoked only; aligns on a vague request through rounds of numbered questions with recommended answers before a DAG is planned, and ends with a confirmed goal and acceptance criteria./planningMandatory planning doctrine for dag-workflow. Load it BEFORE the first mcp__dag-workflow__dag start or amend in a session - the plugin refuses that start until this skill is loaded. Covers turning a task into a dependency-ordered DAG of subagent nodes, how results flow along dependsOn, the node prompt contract, the verification wave, and recovering runs. Any task in a session where dag-workflow enforces DAG orchestration - planning a DAG, writing node prompts, reading a run-settled summary, retrying or amending a run, chaining a follow-up run./pmUser-invoked only; interviews the user as product owner, sorts every question into product decision, technical decision or unknown, and has a one-node DAG write the PRD./review-standardsStandards-axis review discipline for DAG review nodes, loaded through load_skills - pin the diff, find the documented coding standards, apply a Fowler smell baseline as labelled judgment calls, and report a PASS or FAIL standards verdict. A DAG node, typically named review-standards, whose prompt asks whether a change follows the repository coding standards and loads this skill through load_skills./secure-codingSecurity-axis discipline for DAG nodes, loaded through load_skills - lens nodes find candidate breaches of the chosen guides (KISA, OWASP with CWE Top 25, or agent trust boundaries), one verifier node per candidate tries to refute it, and review-security compiles the PASS or FAIL verdict. A DAG node generated by definition.review.security (security-<lens>, security-verify-<lens>-<n> or review-security), or an implementation node whose prompt names secure-coding guides and loads this skill through load_skills.Other plugins' skills for the same job