interactive-debugging
Skill21 starsChanged 10 days agoMITView on GitHub
Use this skill when debugging runtime behavior requires live data from the running app, temporary instrumentation, or hypothesis verification through logs. Trigger for async timeouts, stale or incorrect state updates, race conditions, event ordering bugs, intermittent failures, browser/client behavior that static inspection cannot explain, or any issue where the agent should create a local debug HTTP server, insert temporary probes, ask the user to reproduce, inspect .debug/debug.log, then remove all debug instrumentation and assets.
- Sends data out
1 other project uses a version of this.
Adopted by
Most recently taken up by
- denysdovhan/skillsword for word, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 1
- denysdovhan/skills★ 21100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
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 repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-logSkill
- commitSkill
- readable-codeSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. About 0 are common, 13 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill to run a debug loop: hypothesize, instrument, reproduce, inspect runtime logs, fix, verify, and clean up.
- Distinctive: line 22
Read the relevant code before changing anything.
- Distinctive: line 24
Do not jump to a fix before collecting data unless the cause is already proven.
- Very specific: line 28
Create .debug/ in the project under debug.
- Distinctive: line 31
Keep the server thin: no schemas, dashboards, persistence, extra routes, or broad utilities.
- Distinctive: line 35
Run it from the project root:
- Very specific: line 43
Use another port only if 3333 is occupied.
- Very specific: line 44
Verify it with curl http://localhost:3333/health.
- Distinctive: line 49
Add the fewest probes needed to test the hypotheses.
- Distinctive: line 105
Use the target language's matching comments:
- Distinctive: line 116
Do not log secrets, tokens, cookies, credentials, full environment dumps, or private user data.
- Distinctive: line 122
Stop and wait while they reproduce unless you can run the reproduction yourself.
- Very specific: line 127
If it is large, use tail, wc -l, or targeted rg before reading the whole file.
- Distinctive: line 129
If the logs are inconclusive, add a smaller second round of probes and repeat reproduction.
- Distinctive: line 134
Keep instrumentation until the fix is verified.
- Very specific: line 139
Remove every #region DEBUG / #endregion DEBUG block and its contents.
- Distinctive: line 140
Stop the debug server.
- Very specific: line 141
Delete .debug/debug_server.* and .debug/debug.log.
- Very specific: line 142
Verify cleanup with rg '#region DEBUG|#endregion DEBUG|localhost:3333/debug|debug_server|\\.debug/debug.log', replacing 3333 with the port …
- Distinctive: line 143
Run the relevant test or reproduction check after cleanup.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Interactive Debugging
Use this skill to run a debug loop: hypothesize, instrument, reproduce, inspect runtime logs, fix, verify, and clean up.
Required Paths
- Debug server:
.debug/debug_server.* - Debug log:
.debug/debug.log - Default endpoint:
http://localhost:3333/debug
The bundled servers in this skill's scripts/ directory (next to this SKILL.md, not in the project being debugged) are intentionally thin. They accept POST /debug, append the raw request body to .debug/debug.log with a timestamp, and return ok.
Steps
Step 1: Understand the Bug
- Read the relevant code before changing anything.
- State 1-3 concrete hypotheses that runtime data can prove or disprove.
- Do not jump to a fix before collecting data unless the cause is already proven.
Step 2: Create the Debug Server
- Create
.debug/in the project under debug. - Copy the matching bundled server from this skill's
scripts/directory to.debug/debug_server.jsor.debug/debug_server.pyin the project. - For another language, create the smallest equivalent server at
.debug/debug_server.<ext>. - Keep the server thin: no schemas, dashboards, persistence, extra routes, or broad utilities.
Step 3: Start the Debug Server
Run it from the project root:
node .debug/debug_server.js 3333
python3 .debug/debug_server.py 3333- The server is a long-running foreground process; start it in the background (or another terminal) so it does not block your shell.
- Use another port only if
3333is occupied. - Verify it with
curl http://localhost:3333/health. - Clear
.debug/debug.logbefore reproduction if it already exists.
Step 4: Instrument the Code
- Add the fewest probes needed to test the hypotheses.
- Wrap every probe or probe block in matching debug region markers:
// #region DEBUG
fetch("http://localhost:3333/debug", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
event: "function-entry",
traceId,
value,
}),
}).catch(() => {});
// #endregion DEBUGDependency-free examples for other languages:
# #region DEBUG
import json
import urllib.request
try:
urllib.request.urlopen(
urllib.request.Request(
"http://localhost:3333/debug",
data=json.dumps({"event": "function-entry", "value": value}).encode(),
headers={"Content-Type": "application/json"},
method="POST",
),
timeout=0.2,
).close()
except Exception:
pass
# #endregion DEBUG# #region DEBUG
require "json"
require "net/http"
require "uri"
begin
Net::HTTP.post(
URI("http://localhost:3333/debug"),
{ event: "function-entry", value: value }.to_json,
"Content-Type" => "application/json",
)
rescue StandardError
end
# #endregion DEBUG- Use the target language's matching comments:
- JavaScript, TypeScript, Java, C#, Go, Rust, C, C++:
// #region DEBUGand// #endregion DEBUG - Python, Ruby, Shell, YAML:
# #region DEBUGand# #endregion DEBUG - HTML, Vue, Svelte:
<!-- #region DEBUG -->and<!-- #endregion DEBUG --> - Lua:
-- #region DEBUGand-- #endregion DEBUG
- JavaScript, TypeScript, Java, C#, Go, Rust, C, C++:
Step 5: Choose Useful Probe Data
- Include event names such as
process-order:entry,state-before-set, orbranch-empty-result. - Include IDs needed to correlate flow, such as
traceId, request ID, entity ID, or attempt number. - Include compact values that distinguish hypotheses.
- Do not log secrets, tokens, cookies, credentials, full environment dumps, or private user data.
- Redact or summarize large objects.
Step 6: Ask for Reproduction
- Tell the user exactly what is ready and ask them to reproduce the issue.
- Stop and wait while they reproduce unless you can run the reproduction yourself.
Step 7: Read the Logs
- Inspect
.debug/debug.log. - If it is large, use
tail,wc -l, or targetedrgbefore reading the whole file. - Compare the observed events, ordering, and values to the hypotheses.
- If the logs are inconclusive, add a smaller second round of probes and repeat reproduction.
Step 8: Fix and Verify
- Make the smallest fix explained by the logs.
- Keep instrumentation until the fix is verified.
- Clear
.debug/debug.log, ask the user to verify again when manual reproduction is required, then inspect the new log if needed.
Step 9: Clean Up
- Remove every
#region DEBUG/#endregion DEBUGblock and its contents. - Stop the debug server.
- Delete
.debug/debug_server.*and.debug/debug.log; delete.debug/if empty. - Verify cleanup with
rg '#region DEBUG|#endregion DEBUG|localhost:3333/debug|debug_server|\\.debug/debug.log', replacing3333with the port actually used. - Run the relevant test or reproduction check after cleanup.
Log Reading Checklist
- Missing events show code paths that did not run.
- Event ordering shows async races and stale updates.
- Value changes across awaited work show mutation timing.
- Duplicate events show retries, repeated subscriptions, or double handlers.
- Error payloads near a missing event often explain swallowed failures.
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
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.

