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.
git clone --depth 1 https://github.com/zackiles/deno-kitWrote 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.
[](https://agentmods.dev/rules/zackiles/deno-kit/create-tests)<a href="https://agentmods.dev/rules/zackiles/deno-kit/create-tests"><img src="https://agentmods.dev/badge/rules/zackiles/deno-kit/create-tests/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.
<a href="https://agentmods.dev/rules/zackiles/deno-kit/create-tests"><img src="https://agentmods.dev/badge/rules/zackiles/deno-kit/create-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00554 |
| Opus 5.5 | $0.00000 | $0.00222 |
| Sonnet 5.5 | $0.00000 | $0.00111 |
| Haiku 4.5 | $0.00000 | $0.00055 |
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 1mo 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.
This is a copy
98% identical to create-tests — 6 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 26 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.
- 1mo ago First seen · 26 lines · 554 tokens per session scan A 8e9e69bf6f81
create-tests is a cursor rule published in the GitHub repository zackiles/deno-kit (3 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 554 tokens. A static security scan graded it A with 0 findings. It is 98% identical to create-tests, differing in 6 lines, and is treated as a copy.
Other cursor rules, from other repositories
use-contract-ir-factories
Use factory functions for creating ContractIR objects instead of manual object creation.
gonavi-go
A Go coding rule set for the GoNavi repository, based on common Go style guides and the project's own conventions. It covers file structure, errors, context, concurrency, logging, and tests.
workflow-level3
Defines the standard workflow for Level 3 (Intermediate Feature) tasks, guiding through comprehensive planning, targeted creative design, structured implementation, detailed reflection, and feature-specific archiving.
rule-calling-guide
Comprehensive guide for calling VAN QA rules.
common-fixes
Utility for VAN QA common validation fixes.
mockito
This guide provides definitive best practices for writing robust, maintainable, and readable unit tests using Mockito with JUnit 5, focusing on modern patterns and common pitfalls.