debug-logs
Skill0 starsChanged 6 days agoMITView on GitHub
Collect a bounded browser-only reproduction timeline in window.__debug_logs instead of console output. Use when temporary client-side instrumentation is needed; use production-debugging for server, edge or database failures.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- AxlZero21/Skillstheir own version, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- AxlZero21/Skills★ 1same name
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 repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-work-verificationSkill
- create-taskSkill
- database-migration-reviewSkill
- dependency-upgradesSkill
- fix-prSkill
- pr-merge-gatesSkill
- production-debuggingSkill
- release-verificationSkill
- reliability-reviewSkill
- shipSkill
- workSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Use the team's temporary window.__debug_logs technique when console output is noisy or a reproduction must be handed back as JSON.
- Distinctive: line 18
Keep initialization out of the render path so a re-render does not erase the capture.
- Distinctive: line 44
Before a fresh reproduction, clear the array explicitly once.
- Very specific: line 45
Verify .debug/ at the project root is Git-ignored before writing a capture.
- Distinctive: line 49
Read the timeline against the actual code.
- Very specific: line 51
Remove all marked instrumentation and global declarations after the investigation.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
Browser debug timeline
Use the team's temporary window.__debug_logs technique when console output is noisy or a reproduction must
be handed back as JSON. Browser access still follows the current task's permission rules.
Instrument
- Choose only the decision points that distinguish the competing explanations. Use code-owned stage names,
counts, booleans and bounded status categories. No customer data, identifiers, tokens, full URLs, form values,
raw errors, props or response bodies belong in
window.__debug_logs. - Wrap every added helper, call and type declaration in
DEBUG START/DEBUG ENDmarkers. Keep initialization out of the render path so a re-render does not erase the capture. Adapt this bounded example to the repository's style; do not spread arbitrary objects into an entry:
// DEBUG START type DebugStage = 'load' | 'submit' | 'result'; interface DebugEntry { timestamp: number; stage: DebugStage; count: number; ok: boolean; } declare global { interface Window { __debug_logs?: DebugEntry[]; } } function debugLog(stage: DebugStage, count: number, ok: boolean) { if (typeof window === 'undefined') return; window.__debug_logs ??= []; if (window.__debug_logs.length >= 1000) window.__debug_logs.shift(); window.__debug_logs.push({timestamp: Date.now(), stage, count, ok}); } // DEBUG END
Capture and remove
- Before a fresh reproduction, clear the array explicitly once. Do not clear it on every mount or render.
- Verify
.debug/at the project root is Git-ignored before writing a capture. Do not put logs in a spec. - In an approved browser session, reproduce and export with
copy(JSON.stringify(window.__debug_logs ?? [], null, 2)); this DevTools helper is browser-specific. Save a reviewed capture as.debug/logs-1.json(choose the next unused index). - Read the timeline against the actual code. Missing stages prove absence only if the capture window, initialization and capacity limit cover them. Distinguish a bounded buffer eviction from a missing event.
- Remove all marked instrumentation and global declarations after the investigation. Search for both markers
and
__debug_logs, then run the relevant tests/build. Do not ship a dormant payload collector.
Report the captured stages, last proven boundary, resulting fix and cleanup status. If the failure is outside
the browser, switch to production-debugging rather than extending this array into a retained logging system.
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.

