React Router Bug Fix Workflow
remix-run/react-router
Fixes a React Router bug reported in a GitHub issue end to end: fetching the issue, validating the reproduction, writing a failing test and implementing the fix on a new branch.
Hypothesis-driven debugging methodology for hard bugs. An agent skill from QwenLM/qwen-code.
$ npx skills add QwenLM/qwen-code --skill structured-debugging -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install QwenLM/qwen-code structured-debugging --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/QwenLM/qwen-code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.qwen/skills/structured-debugging .claude/skills/structured-debugging && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "structured-debugging" agent skill from https://github.com/QwenLM/qwen-code/tree/main/.qwen/skills/structured-debugging into .claude/skills/structured-debugging/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "structured-debugging", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/QwenLM/qwen-code/tree/main/.qwen/skills/structured-debuggingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add QwenLM/qwen-code --skill structured-debugging -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install QwenLM/qwen-code structured-debugging --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/QwenLM/qwen-code.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.qwen/skills/structured-debugging .agents/skills/structured-debugging && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "structured-debugging" agent skill from https://github.com/QwenLM/qwen-code/tree/main/.qwen/skills/structured-debugging into .agents/skills/structured-debugging/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "structured-debugging", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add QwenLM/qwen-code --skill structured-debugging -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install QwenLM/qwen-code structured-debugging --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/QwenLM/qwen-code.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.qwen/skills/structured-debugging .cursor/skills/structured-debugging && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "structured-debugging" agent skill from https://github.com/QwenLM/qwen-code/tree/main/.qwen/skills/structured-debugging into .cursor/skills/structured-debugging/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "structured-debugging", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/QwenLM/qwen-code.git --path .qwen/skills/structured-debugging--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add QwenLM/qwen-code --skill structured-debugging -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install QwenLM/qwen-code structured-debugging --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/QwenLM/qwen-code.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.qwen/skills/structured-debugging .gemini/skills/structured-debugging && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "structured-debugging" agent skill from https://github.com/QwenLM/qwen-code/tree/main/.qwen/skills/structured-debugging into .gemini/skills/structured-debugging/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "structured-debugging", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install QwenLM/qwen-code structured-debuggingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add QwenLM/qwen-code --skill structured-debugging -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/QwenLM/qwen-code.git skills-src && mkdir -p .github/skills && cp -r skills-src/.qwen/skills/structured-debugging .github/skills/structured-debugging && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "structured-debugging" agent skill from https://github.com/QwenLM/qwen-code/tree/main/.qwen/skills/structured-debugging into .github/skills/structured-debugging/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "structured-debugging", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add QwenLM/qwen-code --skill structured-debugging -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install QwenLM/qwen-code structured-debugging --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/QwenLM/qwen-code.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.qwen/skills/structured-debugging .opencode/skills/structured-debugging && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "structured-debugging" agent skill from https://github.com/QwenLM/qwen-code/tree/main/.qwen/skills/structured-debugging into .opencode/skills/structured-debugging/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "structured-debugging", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
structured-debuggingHypothesis-driven debugging methodology for hard bugs. An agent skill from QwenLM/qwen-code.
Structured Debugging is an agent skill from QwenLM/qwen-code. Hypothesis-driven debugging methodology for hard bugs. Use this skill whenever you're investigating non-trivial bugs, unexpected behavior, flaky tests, or tracing issues through complex systems. Activate proactively when debugging requires more than a quick glance — especially when the first attempt at a fix didn't work, when behavior seems "impossible", or when you're tempted to blame an external system (model, API, library) without evidence.
Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `examples/headless-bg-agent-empty-stdout.md`).
It sits in Development, covering Debugging and Failing and flaky tests. The repository describes itself as: An open-source AI coding agent that lives in your terminal. The licence is Apache-2.0.
6 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 4970bfa. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Structured Debugging loads about 2k tokens when it runs. Until then it costs about 117 tokens; SKILL.md has 1,161 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from QwenLM/qwen-code at commit 4970bfa, republished under its Apache-2.0 licence (© QwenLM). 1,161 words, ~2,017 tokens.
.claude/skills/structured-debugging/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.When debugging hard issues, the natural instinct is to form a theory and immediately apply a fix. This fails more often than it works. The fix addresses the wrong cause, adds complexity, creates false confidence, and obscures the real issue. Worse, after several failed attempts you lose track of what's been tried and start guessing randomly.
This methodology replaces guessing with a disciplined cycle that converges on the root cause. Each iteration narrows the search space. It's slower per attempt but dramatically faster overall because you stop wasting runs on wrong theories.
Before touching code, write down what you think is happening and why. Be specific about the expected state at each step in the execution path.
Bad: "Something is wrong with the wait loop." Good: "The leader hangs because
hasActiveTeammates() returns true after all agents have reported completed,
likely because terminal status isn't being set on the agent object after the
backend process exits."
For bugs you expect to take more than one round, create a side note file for the investigation in whichever location the project uses for such notes.
Write your hypothesis there. This file persists across conversation turns and even across sessions — it's your investigation journal.
Add targeted debug logs or assertions at the exact decision points that would confirm or reject your hypothesis. Think about what data you need to see.
Don't scatter console.log everywhere. Identify the 2-3 places where your
hypothesis makes a testable prediction, and instrument those.
Prefer logging values (return codes, payload contents, stream types, message bodies, env state) over presence checks ("was this function called?", "was this branch taken?"). Code-path traces tell you what ran; data traces tell you what it ran on. Most non-trivial bugs are correct code processing wrong data.
Ask yourself: "If my hypothesis is correct, what will I see at point X? If it's wrong, what will I see instead?"
Before running, confirm that your instrumentation output will actually be captured and accessible.
Common traps:
2>/dev/null in the test commandA test run that produces no data is wasted.
Execute the test. Read the actual output — every line of it. Don't assume what it says.
When the data contradicts your hypothesis, believe the data. Don't rationalize it away. The whole point of this step is to let reality override your theory.
Update the side note with:
This is critical for not losing context across attempts. Hard bugs typically take 3-5 rounds. Without notes, you'll forget what you ruled out and waste runs re-checking things.
Update the hypothesis based on the new evidence. Go back to step 2. Each round should narrow the search space.
If you're not making progress after 3 rounds, step back and question your assumptions. The bug might be in a layer you haven't considered.
These are the specific traps this methodology is designed to prevent. When you notice yourself drifting toward any of them, stop and return to the cycle.
The most common failure. You have a plausible theory, so you "fix" it and run again. If the theory was wrong, you've added complexity, wasted a test run, and possibly introduced a new bug. The side note should always show "hypothesis verified by [specific data]" before any fix is applied.
"The model is hallucinating." "The API is flaky." "The library has a bug." These conclusions feel satisfying because they put the problem outside your control. They're also usually wrong.
Before blaming an external system, inspect what it actually received. A model that appears to hallucinate may be responding rationally to stale data you didn't know was there. An API that appears flaky may be receiving malformed requests. Look at the inputs, not just the outputs.
You instrument the code and prove it executes correctly — the right functions are called, in the right order, with no errors. But the bug persists. Why?
Because the code can work perfectly while processing garbage input. A function that correctly reads an inbox, correctly delivers messages, and correctly formats output is still broken if the inbox contains stale messages from a previous run.
Always inspect the content flowing through the code, not just whether the code runs. Check payloads, message contents, file data, and database state.
When the user reports a symptom your own run doesn't reproduce, the contradiction is the evidence — the two environments differ in some way you haven't identified yet. The wrong move is to reframe their report ("they must be on a stale SHA", "they must be confused about what they saw", "must be a flake") so that your run becomes the ground truth. Once you do that, every later piece of evidence gets bent to defend the reframing, and the actual bug stays hidden.
The right move: catalogue what differs between their environment and yours (TTY vs pipe, terminal emulator, shell, locale, env vars, prior state, build artifacts) before forming any hypothesis. For ambiguous symptoms ("no output", "it's slow", "it's wrong") ask one disambiguating question first — e.g., "does does it hang or exit cleanly?" That prunes the hypothesis space before any test run.
After several debugging rounds, you start forgetting what you already tried and what you ruled out. You re-check things, go in circles, or abandon a promising line of investigation because you lost track of where it was heading.
This is why the side note file exists. Update it after every run. When you start a new round, re-read it first.
Features that persist data across runs — caches, session recordings, message queues, temp files, and database rows often cause "impossible" bugs. The current run's behavior is contaminated by leftover state from previous runs.
When behavior seems irrational, always check:
This is easy to miss because the code is correct — it's the data that's wrong.
Apply the fix only when you can point to specific data from your instrumentation that confirms the root cause. Write in the side note:
Root cause: [specific mechanism]
Evidence: [specific log lines / data that confirm it]
Fix: [what you're changing and why it addresses the root cause]Then apply the fix, remove instrumentation, and verify with a clean run.
examples/headless-bg-agent-empty-stdout.md
— pipe-captured runs all passed; the user's TTY printed nothing. The
contradiction was the bug. Illustrates reproduction contradiction is data
and instrument data, not code paths.© QwenLM, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in .qwen/skills/structured-debugging of QwenLM/qwen-code.
Open the folder on GitHubat commit 4970bfa
Structured Debugging next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Structured Debugging this skillQwenLM/qwen-code | 28k | — | ~2k | Automated safety check: Pass | Apache-2.0 | |
| React Router Bug Fix Workflowremix-run/react-router | 57k | — | ~1.3k | Automated safety check: Pass | MIT | |
| Runtime DebugOpenHikmah/openhikmah-web | 181 | — | ~618 | Automated safety check: Pass | GPL-3.0 | |
| Root Cause Debuggingjsmastery-pro/skills | 1.4k | — | ~1.8k | Automated safety check: Notes | MIT | |
| Superpowers Systematic Debuggingchristopherarter/superpowers-reasonix | 102 | — | ~2k | Automated safety check: Pass | MIT | |
| Fix The Classjoetawil7/first-pass | 112 | — | ~1.5k | Automated safety check: Pass | MIT |
remix-run/react-router
Fixes a React Router bug reported in a GitHub issue end to end: fetching the issue, validating the reproduction, writing a failing test and implementing the fix on a new branch.
OpenHikmah/openhikmah-web
Debug and verification workflow for runtime-bundle and module-resolution regressions.
jsmastery-pro/skills
Runs a reproduce, localize, hypothesize, test, fix and verify loop to find a bug's root cause, applies the minimal fix and hands off a regression test.
christopherarter/superpowers-reasonix
Any bug, failing or flaky test, or surprise behavior?. An agent skill from christopherarter/superpowers-reasonix.
joetawil7/first-pass
Bug-fix routine that fixes the whole class of bug, not just the reported instance.
cobusgreyling/loop-engineering
Makes the smallest code change that fixes one well-scoped problem, such as a CI failure, review comment or typo, without refactoring anything unrelated.
QwenLM/qwen-code
Reproduces a feature from Codex or Claude Code in Qwen Code by running the reference agent under capture, reading the traces, then implementing matching behavior.
QwenLM/qwen-code
Guides end-to-end testing of the Qwen Code CLI in headless mode with real model calls, MCP test servers and inspection of raw API traffic.
QwenLM/qwen-code
Scheduled CI skill that scans a repository for small, certain docs, test and code hygiene issues and fixes them on one branch with a commit per finding.
QwenLM/qwen-code
Builds a rebranded Qwen Code desktop package from the Tauri shell using only a brand id and a logo, with sensible derived defaults.
QwenLM/qwen-code
Walks through capturing and comparing V8 heap snapshots to find memory leaks in the Qwen Code Node.js CLI, using tmux and the chrome-devtools CLI.
QwenLM/qwen-code
Drives Qwen Code in a real tmux session the way a user would and saves a readable step-by-step transcript of each screen for maintainers to review.
Categories
Hypothesis-driven debugging methodology for hard bugs. An agent skill from QwenLM/qwen-code. Structured Debugging is an agent skill from QwenLM/qwen-code. Hypothesis-driven debugging methodology for hard bugs.
Structured Debugging fits situations like: youre investigating non-trivial bugs; unexpected behavior; tracing issues through complex systems.
Run `npx skills add QwenLM/qwen-code --skill structured-debugging -a claude-code`. Or copy the skill folder (.qwen/skills/structured-debugging in QwenLM/qwen-code) into .claude/skills/structured-debugging in your project. Claude Code loads it when a task matches its description.
Run `npx skills add QwenLM/qwen-code --skill structured-debugging -a codex`. Or copy the skill folder (.qwen/skills/structured-debugging in QwenLM/qwen-code) into .agents/skills/structured-debugging in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add QwenLM/qwen-code --skill structured-debugging -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/structured-debugging, .gemini/skills/structured-debugging, .github/skills/structured-debugging and .opencode/skills/structured-debugging in your project.
SKILL.md names no scripts, command-line tools or credentials: Structured Debugging is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Structured Debugging is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2k tokens (SKILL.md is roughly 8.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Structured Debugging: React Router Bug Fix Workflow (remix-run/react-router, 57k stars), Runtime Debug (OpenHikmah/openhikmah-web, 181 stars), Root Cause Debugging (jsmastery-pro/skills, 1.4k stars) and Superpowers Systematic Debugging (christopherarter/superpowers-reasonix, 102 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
QwenLM (a GitHub organization) maintains it in QwenLM/qwen-code, which has 28,337 GitHub stars. The repository holds 41 skills in this directory. The repository was last updated on October 7, 2026.
Source: QwenLM/qwen-code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.