debug

debug is a skill for Claude Code from fcakyon/phd-skills. It costs 97 tokens per session (1,281 once invoked), scanned A, original, MIT.

A troubleshooting procedure for failed or abnormal machine-learning experiments, such as runs that stop, run out of memory, produce invalid numbers, or become unusually slow.

In plain words
What is it for?
Use it to inspect running processes, system messages, GPU status, logs, and saved checkpoints, then test a suspected cause with a small check.
Why use it?
It gathers system and run evidence before suggesting a cause, reducing the risk of applying a fix based only on guesswork.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the phd-skills plugin — 12 skills, 6 commands, 2 agents, 4 hooks shipped together

Good fit Use it to inspect running processes, system messages, GPU status, logs, and saved checkpoints, then test a suspected cause with a small check.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fcakyon/phd-skills/debug
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.

Any agent
npx skills add fcakyon/phd-skills --skill debug
Clone the repo
git clone --depth 1 https://github.com/fcakyon/phd-skills

Made for: Claude Code.

Or install phd-skills, the plugin that ships this one along with the rest of its 12 skills, 6 commands, 2 agents, 4 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for debug

README.md
[![agentmods](https://agentmods.dev/badge/skills/fcakyon/phd-skills/debug/github.svg)](https://agentmods.dev/skills/fcakyon/phd-skills/debug)
Your own site
<a href="https://agentmods.dev/skills/fcakyon/phd-skills/debug"><img src="https://agentmods.dev/badge/skills/fcakyon/phd-skills/debug/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for debug

Your own site · 80×15
<a href="https://agentmods.dev/skills/fcakyon/phd-skills/debug"><img src="https://agentmods.dev/badge/skills/fcakyon/phd-skills/debug.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 97 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,281 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00097 $0.01281
Opus 5.5 $0.00039 $0.00512
Sonnet 5.5 $0.00019 $0.00256
Haiku 4.5 $0.00010 $0.00128

Measured 1mo ago against content hash 4577b9681f1c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

plugin/skills/debug/SKILL.md · 126 lines

How it starts

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

Debug: evidence-before-action investigation

The most expensive class of mistake in ML debugging is asserting a cause based on plausibility, then attempting a "fix" that masks the real problem. This skill enforces the discipline of probe → hypothesis → smoke → controls → claim, in that order.

The agentic Stop hook routes here from reason when an assistant claims a cause without backing tool output.

When to run

The user just said any of:

  • "why is X failing / diverging / NaN / OOM / hung / slow / crashed"
  • "the loss is going up", "metrics look weird", "GPU util is 0"
  • "debug this", "diagnose", "troubleshoot", "investigate this run"
  • pasted a log excerpt asking what's wrong

Five-step protocol

Step 1: cheap probes

Before forming any hypothesis, gather the cheap evidence. None of these cost more than a few seconds:

Process state:

ps aux | grep -E '(python|train|torchrun|accelerate)' | grep -v grep

Is the process still running? Zombie? Defunct? Multiple instances?

Kernel / system events:

dmesg | tail -100 # OOM kills, hardware errors, NFS errors
journalctl -xe --since "1 hour ago" | tail -50

GPU state:

nvidia-smi
nvidia-smi --query-gpu=utilization.gpu,memory.used,temperature.gpu --format=csv

Is the GPU even being used? Idle GPU during "training" means the process is blocked on data loading or has died.

Disk / filesystem:

df -h /path/to/run-dir
du -sh /path/to/run-dir/*

Out of disk? Checkpoints not being written?

Log scrollback: Read the last few hundred lines of the training log. Don't trust the user's summary, they may have skimmed. Look for:

  • exception tracebacks
  • repeated "loss=NaN" or "grad_norm=Inf"
  • early-stop announcements (the run may have completed normally)
  • the last successful epoch / step (where did progress stop)

Checkpoint state:

ls -la /path/to/run-dir/checkpoints/

When was the last checkpoint written? What does its size suggest? An empty .pt is different from a 2GB one cut short.

Read the full file on GitHub · 126 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. 1mo ago First seen · 126 lines · 97 tokens per session scan A 4577b9681f1c

Subscribe to this mod's changes

debug is a skill published in the GitHub repository fcakyon/phd-skills (423 stars, last pushed 6d ago), licensed MIT. It adds 97 tokens to every session and 1,281 once invoked, about $0.0004 per session on Opus 5.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

adk-debug

Diagnoses misbehaving ADK agents by inspecting sessions, events, tool calls, and the exact request that reached the model. Covers the adk run CLI and the adk web dev server with its session, trace, and debug HTTP endpoints. Use when an agent returns the wrong answer, ignores a tool or swallows a tool error, hangs…

google/adk-python · 191 tokens

resolve-handoff

Emit the complete Resolve handoff with exact modes, outcomes, test evidence, and publication state.

omnigent-ai/omnigent · 23 tokens

typescript-testing

Select and run TypeScript SDK verification for packages, examples, type checks, linting, builds, Vitest suites, Effect v4 CLI tests, and runtime E2E tests. Use when adding tests, diagnosing TypeScript CI, choosing a focused test command, validating TypeScript package changes, or writing/porting CLI tests against…

ComposioHQ/composio · 91 tokens

cli-e2e

Write, modify, or debug Docker-based Composio CLI end-to-end tests under ts/e2e-tests/cli, including binary invocation, fixture isolation, output assertions, and package manifests. Use for CLI E2E test suites only; use cli-command for CLI source implementation.

ComposioHQ/composio · 62 tokens

potpie-cli

Use when the task is centered on running, explaining, configuring, or troubleshooting the potpie command: doctor, login, pot management, source registration, resolve/search/record, graph workbench reads/writes, resource (document payload) commands, and pot scope behavior.

potpie-ai/potpie · 60 tokens

rubber-duck

Adversarial "rubber duck" review that turns explaining-out-loud into a hallucination check. The main session is the PRESENTER (it did the work — a design doc, investigation, or analysis — and holds the real reasoning) and reconstructs the topic to a LISTENER — a spawned subagent pinned to a DIFFERENT-vendor model that…

kirodotdev/KiroCrew · 161 tokens