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/yu-iskw/skill-inspector/unit-test-mannersgit clone --depth 1 https://github.com/yu-iskw/skill-inspectorWrote 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/yu-iskw/skill-inspector/unit-test-manners)<a href="https://agentmods.dev/rules/yu-iskw/skill-inspector/unit-test-manners"><img src="https://agentmods.dev/badge/rules/yu-iskw/skill-inspector/unit-test-manners.svg" alt="Measured on agentmods" 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.00334 | $0.00334 |
| Opus 5 | $0.00167 | $0.00167 |
| Sonnet 5 | $0.00067 | $0.00067 |
| Haiku 4.5 | $0.00033 | $0.00033 |
Grade A, and why
unit-test-manners 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.
This is a copy
92% identical to unit-test-manners — 3 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.
What it actually says
Unit Test Manners: Decoupling for Testability
When implementing unit tests, adhere to the following principles to ensure robust, maintainable, and fast tests:
-
Avoid Mocks and Patches for External Dependencies:
- Do not rely on mocks or patches, especially for methods or functions that involve external interactions such as network requests, database calls, or file system operations.
- Such tests often become brittle, difficult to maintain, and can give a false sense of security, as they test the interaction with a mocked dependency rather than the actual behavior of the system under test when integrated with real dependencies.
-
Decouple Methods and Functions:
- Design your methods and functions to be as decoupled as possible from external dependencies.
- Focus on creating "pure" functions or components with clear inputs and deterministic outputs, allowing them to be tested in isolation without the need for network requests or other I/O operations.
- Consider patterns such as "functional core, imperative shell" or "Hexagonal Architecture" to separate business logic from infrastructure concerns.
- For infrastructure components that still require testing, explore techniques like "Nullables" where production code includes an "off" switch for dependencies or mechanisms to track output for state-based assertions, as discussed in "Testing Without Mocks: A Pattern Language" by James Shore [https://www.jamesshore.com/v2/blog/2018/testing-without-mocks].
By following these guidelines, you can write unit tests that are reliable, fast, and accurately reflect the behavior of your code.
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.
- 5d ago First seen · 20 lines · 334 tokens per session scan A 47cb0628f0c8
unit-test-manners is a cursor rule published in the GitHub repository yu-iskw/skill-inspector (2 stars, last pushed 5d ago), licensed Apache-2.0. It adds 334 tokens to every session, about $0.0017 per session on Opus 5. A static security scan graded it A with 0 findings. It is 92% identical to unit-test-manners, differing in 3 lines, and is treated as a copy.
Other cursor rules, from other repositories
cursorrules
aggregatereports to keep SUMMARY.md and metadata.json synchronized.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
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.
cli-error-handling
CLI command error handling patterns.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.