prompt-debugging

prompt-debugging is a cursor rule for Cursor from mohitagw15856/pm-claude-skills. It costs 127 tokens per session (1,016 once invoked), scanned A, original, MIT.

A guide to finding why an AI prompt fails, such as unclear wording, missing background, conflicting instructions, or an unspecified answer format.

In plain words
What is it for?
Use it to diagnose inconsistent AI answers, correct prompts, test the fix on more than one example, and learn when the model—not the prompt—is the limitation.
Why use it?
It replaces random rewrites with a targeted fix and helps you understand the underlying prompting problem.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it to diagnose inconsistent AI answers, correct prompts, test the fix on more than one example, and learn when the model—not the prompt—is the limitation.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/mohitagw15856/pm-claude-skills/prompt-debugging
About the project

PM Skills is a collection of plain-Markdown instructions that teach AI assistants structured methods for handling professional, personal, and life-admin tasks. People use it with Claude, ChatGPT, Gemini, Cursor, Codex, and other supported agents for work such as writing product requirements, reviewing documents, or planning difficult situations.

mohitagw15856/pm-claude-skills · 1,341 stars · on GitHub · mohitagw15856.github.io

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.

Clone the repo
git clone --depth 1 https://github.com/mohitagw15856/pm-claude-skills

Made for: Cursor.

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

README.md
[![agentmods](https://agentmods.dev/badge/rules/mohitagw15856/pm-claude-skills/prompt-debugging/github.svg)](https://agentmods.dev/rules/mohitagw15856/pm-claude-skills/prompt-debugging)
Your own site
<a href="https://agentmods.dev/rules/mohitagw15856/pm-claude-skills/prompt-debugging"><img src="https://agentmods.dev/badge/rules/mohitagw15856/pm-claude-skills/prompt-debugging/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 prompt-debugging

Your own site · 80×15
<a href="https://agentmods.dev/rules/mohitagw15856/pm-claude-skills/prompt-debugging"><img src="https://agentmods.dev/badge/rules/mohitagw15856/pm-claude-skills/prompt-debugging.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 127 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,016 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.00127 $0.01016
Opus 5 $0.00063 $0.00508
Sonnet 5 $0.00025 $0.00203
Haiku 4.5 $0.00013 $0.00102

Measured 5d ago against content hash 187691f98197, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

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

exports/cursor/pm-ai-native/prompt-debugging/prompt-debugging.mdc · 70 lines

How it starts

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

Prompt Debugging

When a prompt misbehaves, most people randomly reword it until something sticks — slow, and it doesn't teach you anything. Prompts fail in diagnosable ways: ambiguity, missing context, a format the model can't follow, or instructions that contradict each other. This finds the actual failure, applies the targeted fix, and names the principle — so you fix it once and stop hitting the same wall.

What This Skill Produces

  • A diagnosis — the specific failure mode: ambiguous ask, missing context, unspecified output format, conflicting instructions, buried key instruction, or too much at once
  • The targeted fix — the change that addresses that failure, not a superstitious reword
  • A corrected prompt — rewritten to fix the diagnosed problem, with the change explained
  • A generalization check — testing that the fix works across cases, not just the one example (the trap of overfitting to a single output)
  • The principle — the underlying rule (be specific, show the format, resolve conflicts, front-load the key instruction) so you recognize it next time
  • When it's the model, not the prompt — the honest call when the task is beyond what prompting fixes

Required Inputs

Ask for these if not provided:

  • The prompt — the actual text that's misbehaving
  • What it's doing wrong — ignoring an instruction, wrong format, inconsistent, off-topic
  • What you want — the correct output, ideally with an example
  • The pattern — does it fail always or sometimes (points at ambiguity vs. a hard miss)

Framework: Diagnose Before You Reword

  1. Name the failure mode. Match the symptom to a cause — ignored instructions often mean it's buried or conflicting; inconsistent output usually means ambiguity; wrong shape means the format wasn't specified.
  2. Fix that cause specifically. Ambiguous → add specificity; missing context → add it; no format → show the exact format; conflict → resolve it; buried → move the key instruction up front.
  3. Show, don't just tell. For format and quality problems, an example of the desired output fixes more than paragraphs of description.
  4. Check it generalizes. Re-test on several cases — a fix that only works on your one example is overfitting, not a fix.
  5. Extract the principle. Name the rule behind the fix so the next prompt starts right.
  6. Know when to stop. If the task genuinely exceeds the model or needs tools/context it can't have, say so instead of endless rewording.

Read the full file on GitHub · 70 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 First seen · 70 lines · 127 tokens per session scan A 187691f98197

Subscribe to this mod's changes

prompt-debugging is a cursor rule published in the GitHub repository mohitagw15856/pm-claude-skills (1,341 stars, last pushed yesterday), licensed MIT. It adds 127 tokens to every session and 1,016 once invoked, about $0.0006 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-09-03.