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/ezyang/codemcp/expecttestgit clone --depth 1 https://github.com/ezyang/codemcpWhat 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.00552 |
| Opus 5 | $0.00000 | $0.00276 |
| Sonnet 5 | $0.00000 | $0.00110 |
| Haiku 4.5 | $0.00000 | $0.00055 |
Grade A, and why
expecttest 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.
What it actually says
expecttest
We use expecttest for testing. If you need to match against a multiline string or some output that is likely to change in the future (e.g., the kind of thing you would have ordinarily done an assertIn with), use an expect test. If a test is assertExpectedInline and it fails, use 'accept' command to update the output, do NOT relax the test. If the output of the test seems nondeterministic (e.g., you run accept but the test is still failing on the assertExpectedInline) you should halt and ask for help from the user.
Below is its README.
This library implements expect tests (also known as "golden" tests). Expect tests are a method of writing tests where instead of hard-coding the expected output of a test, you run the test to get the output, and the test framework automatically populates the expected output. If the output of the test changes, you can rerun the test 'accept' command to accept the output.
Somewhat unusually, this library implements inline expect tests: that is to say, the expected output isn't saved to an external file, it is saved directly in the Python file (and we modify your Python file when updating the expect test.)
The general recipe for how to use this is as follows:
-
Write your test and use
assertExpectedInline()instead of a normalassertEqual. Leave the expected argument blank with an empty string:self.assertExpectedInline(some_func(), """""") -
Run your test. It should fail, and you get an error message about accepting the output with
EXPECTTEST_ACCEPT=1(this means to use 'accept' command) -
Rerun the test with 'accept' command. Now the previously blank string literal will contain the expected value of the test.
self.assertExpectedInline(some_func(), """my_value""")
A minimal working example:
# test.py
import unittest
from expecttest import TestCase
class TestStringMethods(TestCase):
def test_split(self):
s = 'hello world'
self.assertExpectedInline(str(s.split()), """""")
if __name__ == '__main__':
unittest.main()
Run accept command, and the content in triple-quoted string will be
automatically updated, so you don't have to fill it out yourself.
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 · 67 lines · 0 tokens per session scan A 189e57d28eab
expecttest is a cursor rule published in the GitHub repository ezyang/codemcp (1,607 stars, last pushed 8mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 552 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.