agentleFS
wangnan0916wangnan0916/runtime-debug-toolkit/skills/debug-mode/SKILL.md

debug-mode

Skill0 starsChanged 3 months agoMITView on GitHub

Diagnose and fix runtime bugs using temporary structured logs and verified evidence. Use when the user invokes debug-mode or requests instrumented debugging, and resume active sessions after reproduction or verification replies. Use trace-mode for code location without a fix.

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 5 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Start for $debug-mode, /debug-mode, debug mode, or an instrumented debugging request.

    line 9
  2. Distinctive:

    Wait for the user's current-attempt result before advancing either manual gate.

    line 24
  3. Distinctive:

    Read the entry points, handlers, state transitions, logs, and changes relevant to the symptom.

    line 30
  4. Distinctive:

    Use enough hypotheses and probes to distinguish the cause, without a fixed quota.

    line 45
  5. Distinctive:

    Prefer events that separate multiple explanations.

    line 46
  6. Very specific:

    Read trace-mode and use its caller mode with the Bug Card and Hypothesis Matrix.

    line 51
  7. Distinctive:

    Keep probes and connection checks active through the fix and verification.

    line 55
  8. Very specific:

    Use references/checkpoints.md for the attempt boundary, supported interaction path, result validation, and phase mappings.

    line 59
  9. Very specific:

    Read references/troubleshooting.md only when collection, reproduction, or delivery fails.

    line 76

“Common” is measured: kept by at least 6 in 10 of the 8 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Debug Mode

Prove a runtime cause, fix it, verify the original behavior, and clean up. Start for $debug-mode, /debug-mode, debug mode, or an instrumented debugging request; resume an active session after replies or compaction. An unrelated task or a checkpoint answer without an active session does not start instrumentation. The sibling trace-mode supplies the collector and instrumentation workflow and requires Node.js 24 or later.

Working Contract

Within host permissions, explicit user scope and workflow choices override skill defaults. Continue authorized work without step-by-step approval. Resolve routine unknowns from available evidence; ask only for missing input that changes the next decision. Keep one compact Bug Card and Hypothesis Matrix in session context, updating them instead of repeating the plan. Read references as their stage applies.

Manual reproduction and verification are the default observations for this workflow. Wait for the user's current-attempt result before advancing either manual gate. Tests or arriving logs cannot supply that result. An explicitly user-selected automated method changes only the named phase; report which method actually ran.

1. Analyze and Hypothesize

Read the entry points, handlers, state transitions, logs, and changes relevant to the symptom. Keep a Bug Card: symptom versus expected behavior; trigger and input; candidate path and disputed boundaries; environment and available evidence; observable acceptance criterion. Mark unavailable facts unknown.

Rank hypotheses supported by that evidence. Each needs:

H1 <cause>
Prediction: <runtime state, path, or timing>
Probe: <events and code locations>
CONFIRMED when: <record condition>
REJECTED when: <record condition>

Use enough hypotheses and probes to distinguish the cause, without a fixed quota. Prefer events that separate multiple explanations. Batch independent reads; keep session edits, checkpoints, and cleanup under one owner.

2. Instrument Through Trace Mode

Read trace-mode and use its caller mode with the Bug Card and Hypothesis Matrix. Read references/probes.md for the debug event extension. Return before standalone capture with active probes, the Collector Contract, producer connection status, and any tunnel handle. Keep probes and connection checks active through the fix and verification.

3. Reproduce, Prove, Fix, and Verify

Use references/checkpoints.md for the attempt boundary, supported interaction path, result validation, and phase mappings.

  • PENDING: keep the session active and wait.
  • Pre-fix B or C: follow the result table, adjust the attempt, and checkpoint again.
  • Pre-fix A: follow references/prove-fix-verify.md through evidence, correction, verification, and cleanup. No additional approval is needed to fix the confirmed cause within the requested scope.

Completion and Exceptions

Report the cause with current-attempt evidence and file locations, what changed, verification performed, cleanup status, and remaining uncertainty. Use the user's language and detail proportional to the diagnosis.

The session ends after cleanup or explicit abandonment. For abandonment, follow references/cleanup.md without claiming a verified fix. Read references/troubleshooting.md only when collection, reproduction, or delivery fails.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.