check-for-missing-tests

A code-review rule for finding important tests that are missing from the files shown in a message. It focuses on behavior users or other software rely on.

In plain words
What is it for?
Use it when reviewing source files to propose and prioritize tests, with critical, high, or medium severity levels.
Why use it?
It helps expose untested success paths, errors, edge cases, and integration problems before they reach users.

Cursor rule for Cursor

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 rules/zackiles/cursor-config/check-for-missing-tests
Clone the repo
git clone --depth 1 https://github.com/zackiles/cursor-config

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 321 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.00000 $0.00321
Opus 5 $0.00000 $0.00161
Sonnet 5 $0.00000 $0.00064
Haiku 4.5 $0.00000 $0.00032

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

Security

Grade A, and why

check-for-missing-tests 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.

.cursor/rules/global/check-for-missing-tests.mdc · 36 lines

What it actually says

Prompt: Identify Critical Missing Tests

Objective

Review the code files shown in the same message and propose the most critical missing tests so the test suite fully protects user-facing contracts and likely real-world scenarios.

Inputs

  • One or more source-code files provided as attachments to this prompt.

Requirements

  • Focus on functionality that directly affects user or consumer experience.

  • Evaluate explicit contracts (public APIs, documented behaviors) and implicit contracts (common usage patterns, error handling, performance assumptions).

  • Prioritize tests by likelihood of occurrence × impact of failure.

  • Output a numbered list sorted from most to least important.

  • For each list item include:

    • Level – one of critical, high, medium.
    • Scenario – concise description of what the test covers.
    • Notes – bullet-point tips for the implementor (setup hints, edge cases, data variations).

Instructions

  1. Read every attached file and infer the intended public behavior and side-effects.
  2. Map out user journeys and typical integration paths.
  3. Detect untested branches, error cases, race conditions, and contract guarantees.
  4. Score each potential test on likelihood and impact; assign critical, high, or medium.
  5. List only the top tests that provide the highest risk reduction; omit trivial or redundant cases.
  6. Present the final answer strictly in the numbered list format described above—no extra commentary.
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 · 36 lines · 0 tokens per session scan A b5df1df361d8

Subscribe to this mod's changes

check-for-missing-tests is a cursor rule published in the GitHub repository zackiles/cursor-config (17 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 321 tokens. 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.