debug-session

A structured debugging workflow for investigating bugs, errors, and unexpected software behavior. It records the failure state and investigation progress so an unfinished session can be continued.

In plain words
What is it for?
Use it to trace an error, document hypotheses and attempted fixes, record investigated files, and continue a debugging session after it is interrupted.
Why use it?
It keeps the investigation focused on reproducing the problem and finding its underlying cause instead of guessing at fixes. The saved notes preserve what was tried and what remains to check.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/joris887/exosuit/debug-session
Any agent
npx skills add joris887/exosuit --skill debug-session
Clone the repo
git clone --depth 1 https://github.com/joris887/exosuit

Made for: Claude Code, Codex.

Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,182 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00020 $0.02182
Opus 5 $0.00010 $0.01091
Sonnet 5 $0.00004 $0.00436
Haiku 4.5 $0.00002 $0.00218

Measured 2d ago against content hash e2fc3ccec723, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

debug-session scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/debug-session/SKILL.md · 231 lines

How it starts

The opening of the file, as written. The whole thing — 231 lines — stays where its author put it; the contents beside it link to each section on GitHub.


debug-session

Skill metrics: Emit a start event to the activity log:

echo "{\"type\":\"skill\",\"event\":\"start\",\"skill\":\"debug-session\",\"ts\":\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"}" >> docs/sessions/.activity-log.jsonl

Debug session for: $ARGUMENTS

Failure State Persistence

At each phase transition, write docs/sessions/.failure-state.md with YAML frontmatter so the Stop hook and /continue can programmatically detect incomplete workflows.

At workflow start (Phase 1 entry):

---
status: active
skill: debug-session
phase: "1"
phase_name: "Root Cause Investigation"
started_at: "[ISO-8601 timestamp from date -u +%Y-%m-%dT%H:%M:%SZ]"
story: "[from $ARGUMENTS — the error description]"
branch: "[from git branch --show-current]"
next_action: "Reproduce error and trace root cause"
files_modified: []
---

## Context
Error: [error description]
Root cause: not yet identified
Hypothesis: none
Fix attempts: 0
Files investigated: [list as investigation proceeds]

At each phase transition: Update the frontmatter fields: phase, phase_name, next_action, and append to files_modified. Update the Context section with investigation progress (root cause, hypothesis, fix attempts).

On successful fix (Phase 5 complete): Delete .failure-state.md — clean state means no failure to recover from.

Phase 1: Root Cause Investigation (MANDATORY)

Do NOT skip this phase. Do NOT jump to a fix.

1a. Understand the Error

  • Read the FULL error message — every line, including stack trace
  • What is the exact error? (copy it verbatim)
  • Where does it occur? (file:line from stack trace)
  • When does it occur? (always, intermittently, under specific conditions)

1b. Reproduce Consistently

Run the relevant test or command to reproduce:

# Run the failing test or trigger the error

If it cannot be reproduced, gather more context before proceeding.

Read the full file on GitHub · 231 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 231 lines · 20 tokens per session scan A e2fc3ccec723

Subscribe to this mod's changes

debug-session is a skill published in the GitHub repository joris887/exosuit (4 stars, last pushed 12d ago), licensed MIT. It adds 20 tokens to every session and 2,182 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.