test

test is a cursor rule for Cursor from rajitsaha/100xprism. It costs 6 tokens per session (4,383 once invoked), scanned A, original, MIT.

A testing rule that runs a project’s unit, integration, and end-to-end tests. Unit tests check small pieces, integration tests check connected parts, and end-to-end tests check the complete system.

In plain words
What is it for?
Use it to test changed files or the whole codebase, run a specific test layer, and add tests when coverage is below the project’s threshold.
Why use it?
It reduces the risk of declaring a change safe after checking only one layer of the application.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions CLAUDE.md; mentions subagents; positional $N argument.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is [ -f manage.py ] && ./venv/bin/python manage.py migrate --settings=config.settings.test 2>/dev/null || true.

Good fit Use it to test changed files or the whole codebase, run a specific test layer, and add tests when coverage is below the project’s threshold.

Compare 6 cursor rules from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/rajitsaha/100xprism
agentmods
npx agentmods add rules/rajitsaha/100xprism/test

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 test

README.md
[![agentmods](https://agentmods.dev/badge/rules/rajitsaha/100xprism/test/github.svg)](https://agentmods.dev/rules/rajitsaha/100xprism/test)
Your own site
<a href="https://agentmods.dev/rules/rajitsaha/100xprism/test"><img src="https://agentmods.dev/badge/rules/rajitsaha/100xprism/test/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 test

Your own site · 80×15
<a href="https://agentmods.dev/rules/rajitsaha/100xprism/test"><img src="https://agentmods.dev/badge/rules/rajitsaha/100xprism/test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 6 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,383 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.00006 $0.04383
Opus 5 $0.00003 $0.02191
Sonnet 5 $0.00001 $0.00877
Haiku 4.5 $0.00001 $0.00438

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

Security

Grade A, and why

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

.cursor/rules/test.mdc · 479 lines

How it starts

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

Test — Run All Tests: Unit → Integration → E2E

Auto-detect all test layers (unit, integration, frontend, backend, E2E/system), run them all, write more if coverage is below threshold, loop until everything passes.

Do NOT ask for permission. Do NOT stop until coverage is met.


Testing philosophy

Prefer real implementations over mocks.

Layer Environment What to mock
Unit In-process only External APIs that cannot run locally (Stripe, Firebase Auth, Resend, Twilio, cloud SDKs)
Integration Real DB + real app via Docker Only payment gateways and third-party external APIs
E2E / System Full stack via docker compose up Nothing — zero mocks

Never mock: the database, internal services, business logic, utilities, or pure functions.
Only mock: services that are genuinely unreachable locally (payment processors, auth providers, email senders, external SaaS APIs).


How to use

  • /test — all layers for files changed since last commit
  • /test --all — full pass across the entire codebase
  • /test <file> — target a specific source file
  • /test --unit — unit tests only
  • /test --integration — integration tests only (spins up Docker services)
  • /test --e2e — E2E/system tests only (full docker compose stack)
  • /test --e2e staging — E2E against staging environment
  • /test --e2e prod — E2E against production

Coverage thresholds (unit + integration — not E2E)

Defaults below apply only when the project does not declare its own — check first:

# Project-declared thresholds win over the defaults below. Look, in order, at:
#   - the instruction file (CLAUDE.md/AGENTS.md/…): a line like "coverage: lines 80, branches 70"
#   - jest/vitest config: coverageThreshold.global.{lines,functions,statements,branches}
#   - pyproject.toml / .coveragerc: [tool.coverage.report] fail_under
grep -hiE "coverage(Threshold)?|fail_under" CLAUDE.md AGENTS.md jest.config.* vitest.config.* vite.config.* pyproject.toml .coveragerc 2>/dev/null | head

Read the full file on GitHub · 479 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 · 479 lines · 6 tokens per session scan A b8c7adbe8cf8

Subscribe to this mod's changes

test is a cursor rule published in the GitHub repository rajitsaha/100xprism (10 stars, last pushed 8d ago), licensed MIT. It adds 6 tokens to every session and 4,383 once invoked, about $0.0000 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.