prp-debug

A workflow for finding the root cause of a software bug and recording the evidence in the appropriate GitHub issue. Root cause means the underlying reason the problem occurs, not just its visible symptom.

In plain words
What is it for?
Use it to investigate bugs, stack traces, unexpected behavior, or GitHub issues. It gathers context, checks related discussions, and publishes the diagnosis without changing the code.
Why use it?
It separates investigation from implementation, helping turn a vague report, error, or regression into a documented and reproducible diagnosis.

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

Made for: Claude Code, Codex.

Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 852 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.00084 $0.00852
Opus 5 $0.00042 $0.00426
Sonnet 5 $0.00017 $0.00170
Haiku 4.5 $0.00008 $0.00085

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

Security

Grade A, and why

prp-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.

.agents/skills/prp-debug/SKILL.md · 61 lines

How it starts

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

Arguments: $ARGUMENTS (and $1, $2, ...) refer to the arguments given when this skill was invoked. Take them from the user's request; if absent, infer them from the conversation.

PRP Debug

Diagnose broken current behavior through the root-cause-analyzer, then make the finding durable in the appropriate GitHub issue. Do not implement the fix.

Input: $ARGUMENTS (if absent, use the conversation).

1. Resolve the report and publication target

Read repository guidance and establish the complete report: symptom, expected behavior, environment, reproduction, logs, and any supplied stack trace.

When the input points to a GitHub issue, read its body, relevant comments, linked issues, duplicates, pull requests, and attachments before diagnosing. Treat the body as historical context, not verified causality.

When no issue is specified, search open issues in the current GitHub repository using the symptom, distinctive errors, affected feature, and likely underlying behavior. Inspect candidate bodies and discussion; title similarity alone is not a duplicate.

  • One clear match → use it.
  • Several plausible matches → ask the user which issue should own the finding.
  • No clear match → plan to create an issue after diagnosis.

If GitHub access or the repository cannot be resolved, complete the diagnosis but stop before publication and state what access is missing. Honor --no-publish or an equivalent explicit request without treating publication as a failure.

2. Run the root-cause analysis

Spawn root-cause-analyzer with the original report, complete tracker context, repository path, and any decisive runtime evidence already available. Do not give it a preferred cause or fix.

Require:

  • reproduction at the cheapest authoritative boundary when reasonably possible;
  • competing hypotheses and focused falsification;
  • a causal chain from observed symptom to the smallest fixable cause;
  • the violated invariant and its smallest responsible fix boundary: the existing or missing primitive that should own it, not merely the smallest patch;
  • rejected alternatives and explicit uncertainty;
  • a regression check that fails before the fix and passes after it.

Read the full file on GitHub · 61 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 · 61 lines · 84 tokens per session scan A 96f041bc8ab2

Subscribe to this mod's changes

prp-debug is a skill published in the GitHub repository Wirasm/prp (2,240 stars, last pushed 4d ago), licensed MIT. It adds 84 tokens to every session and 852 once invoked, about $0.0004 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

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens