debug-prompt

debug-prompt is a skill for Claude Code, Codex from rekursiv-ai/sagent. It costs 50 tokens per session (5,393 once invoked), scanned A, original, Apache-2.0.

A controlled testing method for finding defects caused by prompts or agent configuration. It compares fresh agents using different prompt versions and measures whether a suspected behavior can be reproduced and reduced.

In plain words
What is it for?
Use it to reproduce a prompt or configuration problem, compare candidate fixes, and hold back a change to confirm that it really improves the result.
Why use it?
It replaces guesswork and visual inspection with a reproducible test, so a proposed one-line change is checked against a measured baseline.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

Good fit Use it to reproduce a prompt or configuration problem, compare candidate fixes, and hold back a change to confirm that it really improves the result.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rekursiv-ai/sagent/docs
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 rekursiv-ai/sagent --skill docs
Clone the repo
git clone --depth 1 https://github.com/rekursiv-ai/sagent

Made for: Claude Code, Codex.

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-prompt

README.md
[![agentmods](https://agentmods.dev/badge/skills/rekursiv-ai/sagent/docs/github.svg)](https://agentmods.dev/skills/rekursiv-ai/sagent/docs)
Your own site
<a href="https://agentmods.dev/skills/rekursiv-ai/sagent/docs"><img src="https://agentmods.dev/badge/skills/rekursiv-ai/sagent/docs/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-prompt

Your own site · 80×15
<a href="https://agentmods.dev/skills/rekursiv-ai/sagent/docs"><img src="https://agentmods.dev/badge/skills/rekursiv-ai/sagent/docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,393 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.
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.00050 $0.05393
Opus 5.5 $0.00020 $0.02157
Sonnet 5.5 $0.00010 $0.01079
Haiku 4.5 $0.00005 $0.00539

Measured 5d ago against content hash b0b394c43f9a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

debug-prompt 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 5d 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.

sagent/scripts/prompt_debug/docs/SKILL.md · 380 lines

How it starts

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

Debug Prompt

Isolate a suspected prompt/config defect by measuring fresh agents' behavior under controlled prompt variants, then prove a one-line fix moves the rate.

Core rule

Reproduce the problem before you test any fix. A fresh agent, in a cold session, must exhibit the behavior at a high measured rate. Until that happens you have no test, and every number a "fix" produces is noise. This is the whole method; the phases below are just how to do it carefully.

If the behavior happened -- in this session, a transcript, a user report -- then it EXISTS. A cold session that fails to show it means your repro task is wrong, not that the bug is absent. Rebuild the task until it bites.

One occurrence proves a repro exists, and bounds how hard it is to find. The argument is three steps and it is airtight:

  1. The behavior occurred under some concrete input -- a session, a transcript, a report.
  2. Therefore an input that elicits it EXISTS. In the worst case that input is the entire originating session, replayed turn by turn. That upper bound is always available and always bites; a minimal repro is merely a shrink of it.
  3. Only once an input actually bites do you have a test, and only then can any fix be measured.

So a null control never licenses "the behavior is not in the config." It licenses exactly one move: climb toward the known-good upper bound. Replay the real turns verbatim -- same files, same corrections, same order -- and once THAT bites, shrink it. Shrinking a working repro is tractable; guessing a minimal one from scratch is not, and repeated nulls are evidence you are guessing.

A "the behavior isn't in the prompt" conclusion drawn from a null control is the single most expensive error in this method: it retires a real defect and reverts a possibly-working fix on no evidence.

Then, and only then: a candidate fix must move that rate on held-back trials the fix never touched. Your own in-session behavior is an anecdote, not data -- it is contaminated by the very context you are debugging.

Read the full file on GitHub · 380 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. 5d ago Changed · -1 lines b0b394c43f9a
  2. 6d ago First seen · 381 lines · 50 tokens per session scan A 87ae687d7e5e

Subscribe to this mod's changes

debug-prompt is a skill published in the GitHub repository rekursiv-ai/sagent (84 stars, last pushed today), licensed Apache-2.0. It adds 50 tokens to every session and 5,393 once invoked, about $0.0002 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-11-24.

Related

debug-prompt compared with skills from other repositories

debug-prompt next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
debug-promptrekursiv-ai/sagentSkill84todayApache-2.0A50Claude Code, Codex
rn-debuggingLykhoyda/rn-dev-agentSkill201mo agoMITA123Claude Code
doctorLykhoyda/rn-dev-agentSkill201mo agoMITA30Claude Code, Codex
debug-screenLykhoyda/rn-dev-agentSkill201mo agoMITA36Claude Code, Codex
python-code-qualitymicrosoft/agent-frameworkSkill15k13d agoMITA40Claude Code, Codex
semantixGnosil/semantixSkill816yesterdayMITA47Claude Code, Codex
semantix-guideGnosil/semantixSkill816yesterdayMITA115Claude Code