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/yu-iskw/llmops-demo-tsWrote 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/llmops-demo-ts/unit-test-manners)<a href="https://agentmods.dev/rules/yu-iskw/llmops-demo-ts/unit-test-manners"><img src="https://agentmods.dev/badge/rules/yu-iskw/llmops-demo-ts/unit-test-manners/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/yu-iskw/llmops-demo-ts/unit-test-manners"><img src="https://agentmods.dev/badge/rules/yu-iskw/llmops-demo-ts/unit-test-manners.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.00326 | $0.00326 |
| Opus 5 | $0.00163 | $0.00163 |
| Sonnet 5 | $0.00065 | $0.00065 |
| 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 4d 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- unit-test-manners — 92% identical, 3 lines differ
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.
- 4d ago First seen · 19 lines · 326 tokens per session scan A bf4e49bc7cec
unit-test-manners is a cursor rule published in the GitHub repository yu-iskw/llmops-demo-ts (6 stars, last pushed 7d ago), licensed Apache-2.0. It adds 326 tokens to every session, about $0.0016 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-04.
Other cursor rules, from other repositories
spec-for-ut
Unit testing is essential to ensure the reliability and stability of code, especially for React components and functions. Adhering to best practices and ensuring high test coverage is critical to maintaining a robust codebase.
test-document-knowledge-base
When testing or our pdf.js annotations.
design
All tasks related to updating frontend components, CSS, and general styling.
general
No need to run the app. It's already up. i.e. no bun dev or bun run build.
workflow
BDD-style workflow, UI screenshots in the PR, HTTP OpenAPI and config schema sync before lint, final checks.
testing
Go tests, tags, and commands for this repo.