prompt-quality

prompt-quality is a cursor rule for Cursor from mhmdreza-rafiei/agent-tools. It costs 33 tokens per session (375 once invoked), scanned A, original, MIT.

A set of rules for writing clear, precise prompts and instructions for coding agents.

In plain words
What is it for?
It helps define scope, audience, acceptance criteria, verification steps, and actions an agent must not take when creating or improving prompts.
Why use it?
It reduces vague requests, missing requirements, unclear output formats, and tasks that cannot be checked reliably.

Cursor rule for Cursor

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

Good fit It helps define scope, audience, acceptance criteria, verification steps, and actions an agent must not take when creating or improving prompts.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/mhmdreza-rafiei/agent-tools/prompt-quality
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/mhmdreza-rafiei/agent-tools

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

README.md
[![agentmods](https://agentmods.dev/badge/rules/mhmdreza-rafiei/agent-tools/prompt-quality/github.svg)](https://agentmods.dev/rules/mhmdreza-rafiei/agent-tools/prompt-quality)
Your own site
<a href="https://agentmods.dev/rules/mhmdreza-rafiei/agent-tools/prompt-quality"><img src="https://agentmods.dev/badge/rules/mhmdreza-rafiei/agent-tools/prompt-quality/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-quality

Your own site · 80×15
<a href="https://agentmods.dev/rules/mhmdreza-rafiei/agent-tools/prompt-quality"><img src="https://agentmods.dev/badge/rules/mhmdreza-rafiei/agent-tools/prompt-quality.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 375 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.00033 $0.00375
Opus 5 $0.00016 $0.00187
Sonnet 5 $0.00007 $0.00075
Haiku 4.5 $0.00003 $0.00038

Measured 8d ago against content hash fb340b1e5ce9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

prompt-quality 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 8d 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.

rules/prompt-quality.mdc · 44 lines

What it actually says

Prompt quality

Applies when writing or enhancing prompts, or authoring new agent instructions. Load for enhance-prompt or for new agent development. Not every chat - only when prompt quality is a concern.

Clarity and precision

  • Specific verbs: Prefer create to make, implement to do.
  • Concrete nouns: API endpoint instead of stuff.
  • Unambiguous scope: State what is in scope, and what is explicitly out.
  • Audience: Write for the target agent (if known), or a general implementer.

Output format

  • Specify format: Always state the desired output format (Markdown, JSON, code block).
  • Structure: If structured output is expected, give a template or example.
  • Completeness: Define what a complete answer looks like.

Measurability

  • Acceptance criteria: For tasks, include 1-3 measurable acceptance criteria. These allow the implementing agent to self-verify.
  • Verification steps: Explicitly state how the output can be verified.

Must-nots

  • Forbidden actions: Explicitly state actions that must NOT be taken. These act as guardrails (e.g. no breaking changes, do not modify X).
  • Exclusions: State things that are out of scope or should not be included.

Do not

  • Invent requirements: Never assume or invent requirements the user did not state.
  • Inject local context: Avoid workspace-local paths, stack, credentials.
  • Be vague: Avoid words like improve, make better without concrete definitions.
  • Conflate what with how: Separate the desired outcome from implementation details.
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. 8d ago First seen · 44 lines · 33 tokens per session scan A fb340b1e5ce9

Subscribe to this mod's changes

prompt-quality is a cursor rule published in the GitHub repository mhmdreza-rafiei/agent-tools (5 stars, last pushed 24d ago), licensed MIT. It adds 33 tokens to every session and 375 once invoked, about $0.0002 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.