debug-session — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited debug-session (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A disciplined diagnose-before-fix workflow. The goal is to find the root cause, not patch the first symptom, and to leave the codebase with a regression test plus a captured insight so the same bug can't recur.
Before starting, route to the right approach:
| Situation | Use |
|---|---|
| App won't start, build fails, crash on load | This skill (debug-session) |
| Runtime error, logic bug, wrong data | This skill (debug-session) |
| "UI isn't doing what I expect visually" | Browser-automation testing (Playwright) |
| "Verify a specific UI interaction works" | Browser-automation testing (Playwright) |
| "Take a screenshot of the app" | Browser-automation testing (Playwright) |
| "Why isn't my button/form/component working?" | Start here → if no code error found, hand off to browser-automation testing |
If a debug session isolates the problem to a UI behavior (not a code crash), stop and switch to browser-level investigation.
Before investigating the specific bug, categorize it:
(Check any local record of past bugs/known failure modes if one exists.)
This narrows the search space BEFORE you read code. The category determines your strategy.
Before asking the user anything, run these immediately:
git diff # what changed in the working tree
git log --oneline -5 # recent commit historyFallback: If git diff fails (git not found, not a repo, or permission error), skip it and ask: "What changed since it last worked? Any recent file edits, installs, or commands?"Prior-insight retrieval: Before diagnosing, check whatever local notes exist (project notes, prior-decisions file, persistent insight log) for past learnings in this domain. Grep for keywords from the error (module names, error types, domain tags). If a past insight matches, state it: "Previously learned: [insight]. Checking if it applies here." This prevents re-discovering the same root cause.
Then collect only what you still can't answer from context:
git diff / git log first; only ask if unclearIf the user gives a vague "it's broken" — run git commands first, then ask only the questions you can't self-answer.
| Severity | Definition | Action |
|---|---|---|
| 🔴 Critical | App won't start / data at risk / irreversible side effects affected | Stop everything, stabilize first |
| 🟠 High | Core feature broken, tests failing, build fails | Fix before new work |
| 🟡 Medium | Feature degraded, visual bug, non-critical test fail | Fix in current session |
| 🟢 Low | Minor cosmetic, edge case, nice-to-have | Log and schedule |
High-stakes note: Any issue touching live execution / payments / production writes = 🔴 Critical regardless of apparent severity. Stop and assess before proceeding.
Don't debug what you can't reproduce. Steps:
If it can't be reproduced:
Narrow down where the problem lives before touching code.
Frontend / web UI checklist:
Backend / service checklist:
.env vars missing or misread?An agent made changes and broke something:
git diff to see exactly what changedgit log --oneline -10 to find the last known-good commitRoot cause, not symptoms. Don't fix the first thing that looks wrong. Ask "Why did this happen?" at least twice. The first answer is usually a symptom. Infrastructure bugs especially tend to have a structural cause that recurs if you only patch the symptom. (Classic example: a series of "contamination" fixes that were all symptoms of one structural problem — a shared working directory.)
IMPORTANT: Log your hypothesis BEFORE running reproduce attempts. Without a hypothesis first, you're guessing — not debugging.
Before forming a hypothesis, collect raw evidence:
console.log('DEBUG:', variable) / print(f"DEBUG: {variable}") at the point of failureJSON.stringify(response) or print(response) and read the actual outputawait; a missing one returns a Promise/coroutine object instead of the valuestate.x = y instead of an immutable update)Only after collecting this evidence, proceed to form a hypothesis.
Form a hypothesis before writing any fix. State it explicitly:
"I think the issue is [X] because [evidence Y]. If I'm right, fixing [Z] should resolve it."
Evidence that supports a hypothesis > instinct. Common root causes by type:
Import / dependency errors:
package.json / requirements.txt / lockfile)Config / env errors:
.env var → add itLogic errors:
Data errors:
Agent-introduced errors:
Only after Steps 3–5 are complete.
Fix rules:
# Fixes: [what was wrong and why]For high-stakes (trading/financial/production) fixes:
After the fix:
fix: [what was broken and what fixed it]Don't mark as resolved until verified.
After resolving, capture what happened so it doesn't repeat:
CLAUDE.md / AGENTS.md) if an agent was the cause or this is a common mistake to avoid"[BUG PATTERN]: [cause] → [fix]" — e.g., "[API KeyError]: response shape changed in v2 → access data['result']['price'], not data['price']" [DATE] [tag] INSIGHT: [root cause in one sentence]
[DATE] [tag] WHY: [why it wasn't obvious / what made it tricky]Tag with the domain (e.g., [data], [ml], [api], [auth]) for future retrieval.
Was the agent the cause? Ask explicitly: "Did the agent produce the bug (wrong edit, wrong approach, wrong assumption)?" If yes, record the mistake pattern, check whether it's a repeat, and promote repeats into your hard-rules file so they can't recur.
PYTHONUTF8=1 (cp1252 vs UTF-8 mismatches)try/except, not add_signal_handler (not supported on Windows)which bash works; PowerShell behaves differently for shell scripts| Error | Likely Cause | Quick Fix |
|---|---|---|
| White screen / blank render | UI framework crash — check console | Capture console output via browser automation |
Cannot read properties of undefined | Data not loaded before render | Add loading state / null check |
| Styles missing | Utility class not in config | Check class name, check the CSS/build config |
| API 404 | Wrong endpoint or dev server not running | Confirm the dev server is running |
| Stale UI after change | Hot reload failed | Hard refresh (Ctrl+Shift+R) |
| Error | Likely Cause | Quick Fix |
|---|---|---|
ModuleNotFoundError | Package not installed | Install it / activate the correct virtual environment |
KeyError on API response | API response shape changed | Print the raw response and inspect |
| Logic not triggering | Condition / branch not met | Add debug logging where the condition is evaluated |
| Request rejected by an external service | Input exceeds a limit | Check the relevant limit/config value |
AttributeError on config | Missing key or wrong default | Check the config module and class defaults |
Bug appears in two repos at once: Likely a shared dependency. Debug each repo independently first; check shared tooling (runtime, package manager, git, virtual environment) last.
If changes broke things and you want to revert:
# See what changed
git diff HEAD
# Unstage (keeps working-tree changes)
git reset HEAD
# Discard all working-tree changes
git reset --hard HEAD
# Revert a specific file only
git checkout HEAD -- path/to/file.py
# Go back to a specific commit
git log --oneline -10 # find the commit hash
git reset --hard <hash> # go back to itAlways confirm with the user before running git reset --hard — it discards changes permanently.
If the bug is elusive after 2+ hypotheses, suggest a different model's perspective (e.g. codex exec 'Find the bug in this diff'). If the bug involves an external API/library behaving unexpectedly, suggest verifying the documented behavior with a grounded search tool (e.g. gemini -p 'Does [API/function] actually work this way? Check the docs.').
TypeError on line 50 may be caused by bad data on line 12. Trace the data flow backward from the error site before fixing at the crash point.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.