debug

A troubleshooting procedure for a modified Claude Desktop application. It gathers the latest agent session transcript and application logs before diagnosing a reported problem.

In plain words
What is it for?
Use it to investigate Claude Desktop errors, failed tool calls, session problems, or unexpected behavior.
Why use it?
It gives the diagnosis local evidence instead of relying only on a description of what went wrong.

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/patrickjaja/claude-desktop-extra/debug
Any agent
npx skills add patrickjaja/claude-desktop-extra --skill debug
Clone the repo
git clone --depth 1 https://github.com/patrickjaja/claude-desktop-extra

Made for: Claude Code, Codex.

Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,663 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.00068 $0.01663
Opus 5 $0.00034 $0.00831
Sonnet 5 $0.00014 $0.00333
Haiku 4.5 $0.00007 $0.00166

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

Security

Grade A, and why

debug 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/SKILL.md · 89 lines

How it starts

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

Debug - collect evidence, then diagnose

The issue to debug: $ARGUMENTS

You are debugging the patched Claude Desktop. Cowork runs on the .deb's bundled native VM backend (the old claude-cowork-service daemon is deprecated). Gather the relevant local evidence below (skip what's clearly irrelevant to "$ARGUMENTS"), form a hypothesis, then ask the user for anything you can't collect yourself. Read /architecture for how the pieces fit and /linux for session/CU specifics if relevant.

0. Resolve the config/log dir FIRST (1p vs 3p) - or you read stale evidence

The runtime dir is conditional: a 3p/enterprise deployment relocates everything to ~/.config/Claude-3p/. Resolve it once and use $CFG everywhere below.

# 3p (inference-gateway / Bedrock / managed) -> Claude-3p ; otherwise -> Claude
if [ -f /etc/claude-desktop/managed-settings.json ]; then CFG=~/.config/Claude-3p; else CFG=~/.config/Claude; fi
# sanity-check against the running process (named profiles add a further -<profile> suffix):
pgrep -af claude | grep -o -- '--user-data-dir=[^ ]*' | head -1
echo "using CFG=$CFG"

If pgrep shows a --user-data-dir that differs from $CFG (e.g. a named profile), prefer that path.

1. Last local-agent-mode session transcript (the single source of truth for Cowork/Dispatch/agent runs)

audit.jsonl records exactly what the model saw and did. Find the newest one and read the user's last prompt + the assistant tool calls + any errors:

AUDIT=$(find "$CFG"/local-agent-mode-sessions -name audit.jsonl -printf '%T@ %p\n' 2>/dev/null | sort -n | tail -1 | cut -d' ' -f2)
echo "newest audit: $AUDIT"
python3 -c "
import json,sys
p='$AUDIT'
if not p: sys.exit('no audit.jsonl found')
rows=[json.loads(l) for l in open(p) if l.strip()]
# user's first/last prompt
users=[r for r in rows if r.get('type')=='user']
def text(m):
    c=(m or {}).get('content')
    if isinstance(c,str): return c
    if isinstance(c,list): return ' '.join(x.get('text','') for x in c if isinstance(x,dict))
    return str(c)
if users: print('FIRST USER PROMPT:', text(users[0].get('message'))[:500])
if len(users)>1: print('LAST USER PROMPT:', text(users[-1].get('message'))[:500])
# tool calls + errors
for i,r in enumerate(rows):
    t=r.get('type')
    if t=='assistant':
        for c in (r.get('message',{}).get('content') or []):
            if isinstance(c,dict) and c.get('type')=='tool_use': print(f'[{i}] tool_use: {c.get(\"name\")} {str(c.get(\"input\",{}))[:120]}')
    elif t=='user' and ('Error' in str(r) or 'Permission' in str(r) or 'denied' in str(r)):
        print(f'[{i}] error/result: {str(r)[:200]}')
    elif t=='result': print(f'[{i}] RESULT: {str(r.get(\"result\",r))[:200]}')
"

If "$ARGUMENTS" is about dispatch/cowork/skills not working, this transcript usually shows the failing tool call, a permission denial, or a wrong path.

Read the full file on GitHub · 89 lines

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 · 89 lines · 68 tokens per session scan A c021edacc151

Subscribe to this mod's changes

debug is a skill published in the GitHub repository patrickjaja/claude-desktop-extra (610 stars, last pushed 4d ago), licensed MIT. It adds 68 tokens to every session and 1,663 once invoked, about $0.0003 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-30.

Related

Other skills, from other repositories

liveagent-code-review

Review an open GitHub pull request or the current local branch and working tree with parallel, independent reviewers and evidence-based validation. Use when the user asks for code review, invokes the Code Review action from Git Review, or explicitly mentions this skill.

Stack-Cairn/LiveAgent · 54 tokens

Unsafe Symlink

Use when testing symlink safety.

ilysenko/codex-desktop-linux · 11 tokens

sessions

Search and ask questions about coding agent session history across Claude Code, Codex, and Cursor. Use when asking what was worked on, what was tried before, how a problem was investigated across sessions, what happened recently, or any question about past agent sessions. Also use when the user references prior…

slopus/happy · 78 tokens

agent-workspace-linux

Use when a task needs an isolated hidden Linux desktop or workspace-owned browser: GUI app QA, web/browser/shopping automation, sandboxed app observation, or stale workspace cleanup. Routes agent-workspace-linux MCP tools on demand. Does NOT apply to host desktop/Chrome control, generic MCP setup, or pure code/file…

ilysenko/codex-desktop-linux · 70 tokens

lc-curate-context

Decide which files a task actually needs, record that as a reusable llm-context rule, verify it against the codebase - including the files your selection references but leaves out - and pack it for your own context, a chat, or a sub-agent you dispatch. Load when choosing what code to put in front of a model, packing…

cyberchitta/llm-context.py · 90 tokens

discover-interview-synthesis

Synthesizes user research interviews into actionable insights, patterns, and recommendations. Use after conducting user interviews, customer calls, or usability sessions to extract and communicate findings across participants. Distinct from foundation-meeting-recap, which summarizes one internal meeting for its…

product-on-purpose/pm-skills · 69 tokens