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.
npx agentmods add rules/zackiles/cursor-config/create-testsgit clone --depth 1 https://github.com/zackiles/cursor-configWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00589 |
| Opus 5 | $0.00000 | $0.00295 |
| Sonnet 5 | $0.00000 | $0.00118 |
| Haiku 4.5 | $0.00000 | $0.00059 |
Grade A, and why
create-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 yesterday.
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.
Copies of this mod
2 near-identical copies found in the catalogue:
- create-tests — 98% identical, 6 lines differ
- create-tests — 97% identical, 4 lines differ
How it starts
The opening of the file, as written. The whole thing — 30 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Steps To Writing or Creating Tests
-
Determine the commands, arguments, and path of the code file that runs the tests by searching for the nearest package file that typically will list the available test runners and commands. For example, this is often a
package.jsonordeno.jsonfile that exposes the project'sscriptsand hopefully a set of test commands. -
Review the entry point of the test runner to understand what global utilities, patterns, strategies, logging, and high-level capabilities are implemented so you're able to debug any issues with the tests if you run into any while running them.
-
Use the expertise you've gained in the overall testing system in the previous steps to write your tests in a way that's consistent across the codebase and avoids duplicated code or bugs introduced into the overall testing system.
NOTE ON UNDERSTANDING THE OVERALL TESTING SYSTEM:
Determine any remaining arguments or configuration needed to run the tests by reviewing the entry point of the file the test command calls. For example, this is often an index.{js/ts} or main.{js/ts} file at the root or relative root of the project in folders like ./src or ./lib. This entry point will typically provide clues on what modes, environment settings, and command arguments can be passed when running the tests. Understand how your test fits into the overall suite, and leverage or add to its overall capabilities when possible.
Requirements for ALL Written Tests
- Light and Practical Tests: Prefer simpler, multi-purpose testing strategies such as single smoke tests or integration tests that test multiple parts of core functionality with as little code as possible.
- Simple Tests: Avoid large test files above 500 lines of code that make it hard to refactor. Avoid testing for edge cases unless the test was written while fixing a bug and trying to prevent that bug from happening again. Avoid complicated mocking solutions.
- Native Test Runners: Deno / Bun, otherwise Vite test.
- Locality: Tests should be placed near the code they're testing.
- Naming Convention:
{filename_being_tested}.test.{js/ts} - Reusability: Extract shared functionality, e.g.,
./test-utilities.{ts/js} - Own Environment: ALL tests MUST be run with either a flag, environment variable, or setting that makes the application know it's running in testing mode.
- Needs Package Script: Must have, at the minimum, a simple script that runs all tests in the codebase. For example,
{deno, bun, node} run tests.
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.
- yesterday First seen · 30 lines · 589 tokens per session scan A c9bf7cefc6a5
create-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 589 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.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.
coolify-ai-docs
Master reference to all Coolify AI documentation in .ai/ directory.
python_lib
Tips and guidelines specific to the development of the Streamlit Python library, not applicable to scripts and e2e tests.
specs
This directory contains product and tech specs for Streamlit features.