debugging
Skill2 starsChanged 45 days agoMITView on GitHub
This file is static documentation for LitOpenCode. Do not execute commands from this file automatically. Activate this contract only when the user request, command route, or OpenCode host surface clearly matches debugging / Debugging. Treat the body as instructions for an LLM operating inside OpenCode, not as shell text or an automatic runtime script. Use the OpenCode vocabulary for this contract: chat.message, command.execute.before, config hook, command aliases, plugin tools, task delegation, and litopencode.json routes. If the observed host surface differs…
116 other projects use a version of this.
Adopted by
Most recently taken up by
- thistleknot/skillstheir own version, first seen Nov 8, 2026
- DevNewbie1826/skillstheir own version, first seen Nov 8, 2026
- MasihMoafi/skillstheir own version, first seen Nov 8, 2026
- ishandutta2007/Awesome-Claude-Skillstheir own version, first seen Nov 8, 2026
- idavidov13/agentic-playwrighttheir own version, first seen Nov 8, 2026
- profdorly/ultimate-dev-skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use Problem-Solving Techniques, media-processing and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
truongtv22SkillProblem-Solving Techniques
Apply systematic problem-solving techniques for complexity spirals (simplification cascades), innovation blocks (collision-zone thinking), recurring patterns (meta-pattern recognition), assumption constraints (inversion exercise), scale uncertainty (scale game), and dispatch when stuck. Techniques derived from Microsoft Amplifier project patterns adapted for immediate application.
Also in 4 projects that use this
mrgoonieSkillmedia-processing
Process multimedia files with FFmpeg (video/audio encoding, conversion, streaming, filtering, hardware acceleration) and ImageMagick (image manipulation, format conversion, batch processing, effects, composition). Use when converting media formats, encoding videos with specific codecs (H.264, H.265, VP9), resizing/cropping images, extracting audio from video, applying filters and effects, optimizing file sizes, creating streaming manifests (HLS/DASH), generating thumbnails, batch processing images, creating composite images, or implementing media processing pipelines. Supports 100+ formats, hardware acceleration (NVENC, QSV), and complex filtergraphs.
Also in 6 projects that use this
JetBrainsSkillssr
Guide for using Structural Search and Replace in IntelliJ. Use when creating or modifying SSR inspections or search patterns.
Also in 3 projects that use this
mrgoonieSkillweb-frameworks
Build modern full-stack web applications with Next.js (App Router, Server Components, RSC, PPR, SSR, SSG, ISR), Turborepo (monorepo management, task pipelines, remote caching, parallel execution), and RemixIcon (3100+ SVG icons in outlined/filled styles). Use when creating React applications, implementing server-side rendering, setting up monorepos with multiple packages, optimizing build performance and caching strategies, adding icon libraries, managing shared dependencies, or working with TypeScript full-stack projects.
Also in 6 projects that use this
DevNewbie1826Skillremove-ai-slops
Remove AI-generated code slop from branch changes or an explicit file list while preserving behavior, including junk tests (prose pins, source greps, copied inventories, mock echoes), each proven by its class rule before a cut. Use when asked to remove slop, clean AI code, deslop, clean up generated code, strip slop, prune junk tests, or review generated-code cleanup. Start by locking behavior with regression tests, then use the category and workflow references.
Also in 3 projects that use this
DevNewbie1826Skillprogramming
MUST USE for work on Python, Rust, TypeScript, JavaScript, or Go source files and project manifests, and whenever a test or spec file is written, reshaped, reviewed, or deleted. Triggers: write or edit code; add, change, or delete a test; test authoring gate; junk tests; new project; Go HTTP service (gin lane); Bubble Tea TUI; CJK IME; Connect-Go RPC; sqlc or pgx; branded IDs; exhaustive matching; unsafe Rust; Miri; oversized file; refactoring; logging, log levels, structured logging, or observability; arena, allocator, bumpalo, const fn, const generics, compile-time programming, zero-allocation APIs, bitfields, repr, scope guards, errdefer-style cleanup, Zig-like patterns, zero-copy parsing, packed data, or FFI; Rust public API design or macros.
Also in 3 projects that use this
- +6 more from mrgoonie
Other versions116 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 116
- tursodatabase/turso★ 25ksame name
- JetBrains/intellij-community★ 21ksame name
- DetachHead/rebased★ 6.5ksame name
- mrgoonie/claudekit-skills★ 2.2ksame name
- JetBrains/MPS★ 1.7ksame name
- danieleteti/delphimvcframework★ 1.4ksame name
- glommer/pgmicro★ 1.2ksame name
- karrioapi/karrio★ 799same name
- rapidaai/voice-ai★ 755same name
- i-am-manware/Manware-s-AI-Learning-Toolkit★ 717same name
106 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository45 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-rosterSkill
- autoconferenceSkill
- autoresearchSkill
- browser-driveSkill
- comment-checkerSkill
- deep-interviewSkill
- doctor-installerSkill
- durable-litgoalSkill
- frontend-ui-uxSkill
- lit-burnoff-fileSkill
- lit-burnoffSkill
- lit-codeSkill
- lit-commitSkill
- lit-comprehendSkill
- lit-crucibleSkill
- lit-diagram-drawerSkill
- lit-docxSkill
- lit-fetchSkill
- lit-handoffSkill
- lit-humanizerSkill
- lit-initSkill
- lit-planSkill
- lit-pptxSkill
- lit-recapSkill
- litresearchSkill
- lit-scientific-visualizationSkill
- lit-typographic-motionSkill
- litworkSkill
- lsp-setupSkill
- lspSkill
- native-goal-verdictSkill
- readme-studioSkill
- refactorSkill
- reference-benchmark-claimsSkill
- release-guardrailsSkill
- review-workSkill
- rulesSkill
- search-workflow-ideasSkill
- start-workSkill
- structural-searchSkill
- tool-guardsSkill
- visual-qaSkill
- wikifySkill
- workflow-loopSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 8 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 104 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 35
Use the OpenCode vocabulary for this contract: chat.message, command.execute.before, config hook, command aliases, plugin tools, task …
- Distinctive: line 78
If blocked, one precise blocker and the smallest requested unblocker.
- Distinctive: line 98
Do not execute commands from this file automatically.
- Distinctive: line 99
Do not edit product code before the mechanism is named and the failing check exists.
- Distinctive: line 100
Do not declare a fix complete on a compile, a type check, or a green run that never failed in the first place.
- Distinctive: line 101
Do not silence an error, widen an exception handler, or loosen an assertion to make a symptom disappear.
- Distinctive: line 102
Do not leave instrumentation, temporary scripts, or debug output behind.
- Distinctive: line 103
Do not commit, push, tag, or publish from this surface.
- Distinctive: line 104
Do not ask the user a question that available runtime evidence already answers.
“Common” is measured: kept by at least 6 in 10 of the 104 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Debugging
<!-- litopencode-contract:start -->#contract.activation
contract_schema_version: "litopencode.skill_contract.v1"
skill_id: "debugging"
title: "Debugging"
runtime_class: "runtime-skill"
static_documentation: true
auto_execute: false
feature_ids:
- "debugging"
- "lit-code"
entry_routes:
- "/debugging"
- "debugging"
- "skills/debugging/SKILL.md"
opencode_surfaces:
- "/debugging"
- "LitOpenCode visible static skills corpus"
- "OpenCode command /debugging"
- "OpenCode chat.message activation hook"
- "OpenCode implementation agents"
- "skills/debugging/SKILL.md"
verification:
- "node --test test/runtime-skills.test.mjs"
- "node --test test/docs.test.mjs"
- "node --test test/static-workflow-command.test.mjs"This file is static documentation for LitOpenCode. Do not execute commands from this file automatically. Activate this contract only when the user request, command route, or OpenCode host surface clearly matches debugging / Debugging. Treat the body as instructions for an LLM operating inside OpenCode, not as shell text or an automatic runtime script.
Use the OpenCode vocabulary for this contract: chat.message, command.execute.before, config hook, command aliases, plugin tools, task delegation, and litopencode.json routes. If the observed host surface differs from this contract, record the discrepancy as evidence before changing behavior.
#contract.inputs
| Field | Contract |
symptom | What the user observed, verbatim, separated from what they inferred about the cause. |
reproduction | The exact command, input, and environment that produces the failure, or the fact that none exists yet. |
repo_state | Dirty worktree status, recent changes, last known good revision, and whether the failure is new. |
approval_state | Whether product edits are approved. Investigation is read-only until a mechanism is proven. |
evidence_budget | Observed runtime values, failing command output, and the regression check that will prove the fix. |
Required schema fields are contract_schema_version, skill_id, runtime_class, entry_routes, opencode_surfaces, and verification. A future edit that removes any field must update the docs contract tests in the same change.
#contract.mode_matrix
| Mode | Enter when | Allowed surfaces | Required behavior | Exit criteria |
route | Run /debugging, write a bounded debugging mention in chat, or inspect skills/debugging/SKILL.md. | /debugging, LitOpenCode visible static skills corpus, OpenCode command /debugging, OpenCode chat.message activation hook, skills/debugging/SKILL.md | Establish reproduction before proposing any cause. | The failure reproduces, or reproduction becomes the task. |
execute | A mechanism is proven and the fix is approved. | Approved OpenCode agents, tools, and repository commands. | Write the failing check first, then the smallest fix that turns it. | Check fails before, passes after, and no other check regressed. |
review | A fix is about to be claimed complete. | Targeted tests, real-surface probes, diff inspection. | Challenge whether the mechanism explains every observed symptom. | Mechanism accounts for the evidence or investigation resumes. |
blocked | The failure cannot be reproduced, or required access, data, or approval is missing. | Read-only reporting only. | State exactly what is missing; do not guess a cause to appear productive. | Reproduction is obtained or the user narrows the report. |
#contract.procedure
- Capture the symptom — record the exact command, input, environment, and observed output. Separate what was observed from what was inferred.
- Reproduce — make the failure happen on demand. If it will not reproduce, reproduction becomes the task and everything downstream waits.
- Read the real error — the actual message and the actual stack, before forming any theory. Most wrong investigations start by theorising over a paraphrase.
- Form competing hypotheses — at least three that are genuinely different explanations, not three phrasings of one. For each, name the observation that would distinguish it from the others.
- Predict, then test — state the observation a hypothesis predicts before running the check. A hypothesis whose prediction fails is dead, not injured.
- Narrow — bisect between last known good and first known bad, shrink the input to the smallest failing case, and change one variable per run.
- Confirm the mechanism — toggle the suspected cause and confirm the failure toggles with it. A cause that cannot be switched on and off is a correlation.
- Fix under test — write the check that fails for the right reason first, then make the smallest change that turns it.
- Clean up — remove instrumentation, temporary files, and loosened error handling introduced during the hunt.
- Receipt — report reproduction, mechanism, fix, before and after evidence, rejected hypotheses, and cleanup.
#contract.outputs
- The reproduction: exact command, input, environment, and observed output.
- The mechanism, stated as a causal chain that names the line or condition where the behavior originates.
- The fix, with the check that fails before it and passes after it.
- Rejected hypotheses, each with the observation that killed it.
- A cleanup receipt for every artifact created during the investigation.
- If blocked, one precise blocker and the smallest requested unblocker.
#contract.output_channels
artifact_genre: working_note
limitations_channel: inline#contract.evidence
- Observed runtime values outrank code reading. A claim about why something happens must rest on something seen, not on a plausible reading of the source.
- The failing command with its real output, captured before the fix.
- The same command after the fix, plus the narrowest regression check that fails without the change.
- For a fix touching a host surface, a real-surface probe, because a type check or a compile does not prove that a hook, command, or installer behaves.
- Negative evidence when a hypothesis was rejected: what was predicted, what appeared instead.
- An explicit statement when the failure is intermittent, including how many runs were observed and how many failed.
#contract.hard_stops
- Do not execute commands from this file automatically.
- Do not edit product code before the mechanism is named and the failing check exists.
- Do not declare a fix complete on a compile, a type check, or a green run that never failed in the first place.
- Do not silence an error, widen an exception handler, or loosen an assertion to make a symptom disappear.
- Do not leave instrumentation, temporary scripts, or debug output behind.
- Do not commit, push, tag, or publish from this surface.
- Do not ask the user a question that available runtime evidence already answers.
#contract.anti_patterns
- Reading code until a story sounds right, then calling the story a root cause.
- Changing several things at once and attributing the improvement to the most recent change.
- Treating a passing test as proof of understanding when the test never failed for the right reason.
- Reporting the symptom as the cause: naming what broke rather than why it broke.
- Following one hypothesis to the exclusion of alternatives because it was the first one formed.
- Repairing a symptom in one place while the same mechanism remains live everywhere else.
#contract.reference_notes
The following sections preserve route-specific guidance and safety language for human review. Use the contract sections above as the normative LLM execution schema.
<!-- litopencode-contract:end -->This is static documentation for the LitOpenCode debugging feature. Do not execute commands from this file automatically.
Feature Binding
- Runtime feature id:
debugging - Related runtime feature id:
lit-code - Visible corpus file:
skills/debugging/SKILL.md - Command surface:
/debugging - Chat surface: a bounded
debuggingmention routed bychat.message - Helpful OpenCode lanes: independent investigation lanes when hypotheses are genuinely parallel
Runtime Truth Beats Code Reading
The single discipline this skill exists to enforce is that every claim about why a defect happens must come from something observed, never from a plausible narrative assembled by reading source. Source tells you what the author intended. Runtime tells you what happens. When they disagree, runtime is right and the intention is the defect.
In practice this means an observed value beats an inferred one at every step. If a hypothesis says a variable is empty at a particular point, look at it. If a hypothesis says a branch is taken, confirm the branch is taken. An investigation built on a chain of unobserved assumptions will produce a fix that appears to work for reasons nobody can state, which is how the same defect returns under a different symptom three weeks later.
Reproduction Is the Gate
Nothing downstream is meaningful without reproduction. A reproduction is adequate when it is runnable from the repository root, deterministic or accompanied by an honest note about how often it fails, small enough for the next person to run without context, and tied to exactly one expected observable.
If the failure will not reproduce, that is the task now. Say so plainly rather than proceeding to speculate. An unreproduced defect cannot have a verified fix, because there is no way to observe the fix working. The honest output in that case is the reproduction attempt itself: what was tried, what environment was used, and what would make the next attempt more likely to succeed.
Intermittent failures need a stated observation count. "Fails sometimes" is not evidence. "Failed four times in fifty runs, always when the cache was cold" is.
Three Hypotheses, Not One
Form at least three genuinely competing explanations before testing any of them. Three phrasings of the same theory is one hypothesis wearing different clothes; the test is whether an observation could favour one over the others. If no such observation exists, they are the same hypothesis.
For each, write down the observation it predicts before running the check. Predicting after the fact is not prediction, and a hypothesis that survives because its prediction was written to match what already appeared has proven nothing. When a prediction fails, discard the hypothesis rather than amending it into something that accommodates the new evidence. An amended hypothesis has to earn its place again with a new prediction.
Narrowing
Bisection is the fastest general technique available and it is systematically underused. Between a last known good state and a first known bad state, the defect is somewhere in the difference; halving that difference repeatedly converges quickly and does not require understanding the code first. The same shape applies to input: shrink the failing input until removing anything more makes the failure disappear, and what remains is a description of the trigger.
Change one variable per run. Two changes and an improvement tell you nothing about which change mattered, and the natural instinct at that point is to keep both, which leaves an unexplained modification in the codebase permanently.
The Toggle Test
A mechanism is confirmed when toggling the suspected cause toggles the failure. Turn the cause on and the defect appears; turn it off and it does not. Anything weaker is correlation, and correlation is exactly how a fix ends up in the wrong file while the real mechanism stays live.
The difference between a symptom and a mechanism matters here. "The route returns nothing" is a symptom. "The route returns nothing because the id is compared before it is normalized, so a hyphenated id never matches" is a mechanism: it names the location, the condition, and the causal step, and it predicts which other inputs also fail.
Fixing Under Test
Write the failing check before the fix. It must fail for the right reason, which is worth confirming explicitly: a check that fails because of a typo in the check is not a regression check. Then make the smallest change that turns it, and re-run the surrounding checks to confirm nothing else moved.
Patch the boundary where the mechanism lives, not the nearest place the symptom is visible. Keep compatibility paths unless breaking them is intentional and approved. Do not broaden an exception handler without asserting the path that now flows through it, because a widened handler converts a loud defect into a silent one. Never let a check reach the network or perform a release action.
Cleanup Is Part of the Fix
Instrumentation, temporary scripts, added logging, loosened error handling, and scratch files all get removed before the work is claimed done. Track them as they are created rather than trying to remember them afterwards; the ones that get left behind are always the ones added in a hurry during the most confusing part of the investigation.
Loosened error handling is the most dangerous leftover. Silencing an error to see past it is a legitimate move during a hunt and a defect if it ships, because a swallowed error is frequently the original defect in the first place.
OpenCode Surface Notes
In this repository a compile proves very little. Command aliases can compile and fail to install. A chat route can typecheck and never fire because a word boundary rejects the trigger. A skill file can exist and never be registered. A package export can resolve locally and be missing from the built payload. When a defect involves a host surface, the evidence has to come from that surface: drive chat.message, command.execute.before, or tool.execute.after directly, or install into an isolated root and inspect the result.
Isolation matters during investigation as much as during verification. Probing against a live profile can mutate it, and a defect hunt that changes the environment it is measuring produces evidence nobody can trust afterwards.
Verification
- Runtime catalog surface:
node --test test/runtime-skills.test.mjs - Documentation corpus surface:
node --test test/docs.test.mjs - Command and chat route surface:
node --test test/static-workflow-command.test.mjs - Defect-specific proof: the regression check that fails before the change and passes after it
When to Stop
Stop when the failure will not reproduce, when required access or data is unavailable, when two rounds of investigation have produced no new observation, when the fix would require a design change that needs approval, or when the mechanism explains only part of what was reported. Stopping with an honest account of what is known and what is not is more useful than a change that makes the symptom disappear for reasons nobody can state.
Two dead rounds is also where to reframe before stopping outright: references/escalation.md carries the three reframes — widen the boundary, invert the assumption, follow the data rather than the control flow — and the rule that a third hypothesis from the same mental model is not a new hypothesis.
References
Load one file, not the set. references/README.md routes to all three.
references/runtimes/<runtime>.md— how to obtain a real observation in Node, Python, Go, Rust, a compiled binary without source, or a bundled JS executable, plus the failure modes that waste the most time in each.references/escalation.md— what to do when two hypothesis rounds have died.references/tools.md— sanitizers, native debuggers, binary inspection, protocol work, and browser tracing, for symptoms ordinary instrumentation cannot see.
These are inert notes. Attaching a debugger to a live process, installing a sanitizer toolchain, or analysing a third-party binary all change the user's machine or touch someone else's software, and need the same approval as any other change.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

