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/aaydin-tr/swagger-navigator-mcp/testing-standardsgit clone --depth 1 https://github.com/aaydin-tr/swagger-navigator-mcpWrote 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/aaydin-tr/swagger-navigator-mcp/testing-standards)<a href="https://agentmods.dev/rules/aaydin-tr/swagger-navigator-mcp/testing-standards"><img src="https://agentmods.dev/badge/rules/aaydin-tr/swagger-navigator-mcp/testing-standards.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.00816 | $0.00816 |
| Opus 5 | $0.00408 | $0.00408 |
| Sonnet 5 | $0.00163 | $0.00163 |
| Haiku 4.5 | $0.00082 | $0.00082 |
Grade A, and why
testing-standards 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.
How it starts
The opening of the file, as written. The whole thing — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Testing Standards
Test Structure
- All tests should be placed in the
tests/directory, mirroring thesrc/structure - Test files must use
.test.tsextension - Use descriptive
describeanditblocks that clearly explain what is being tested
Coverage Requirements
- Aim for 100% code coverage on utility modules like env-substitution.ts
- All exported functions must have comprehensive test coverage
- Test both happy path and error scenarios
Test Organization
describe("moduleName", () => {
const originalEnv = process.env;
beforeEach(() => {
jest.resetModules();
jest.clearAllMocks();
process.env = { ...originalEnv };
});
afterAll(() => {
process.env = originalEnv;
});
describe("functionName", () => {
it("should handle expected behavior", () => {
// Test implementation
});
it("should handle error cases", () => {
// Error test implementation
});
});
});
Mocking Guidelines
- Mock external dependencies (fs, yaml, etc.) using Jest mocks
- Use typed mocks:
const mockFunction = fn as jest.MockedFunction<typeof fn> - Always restore original environment variables and mocks between tests
- Test integration flows by mocking at appropriate boundaries
Required Test Types
- Unit Tests: Test individual functions in isolation
- Integration Tests: Test function interactions
- Error Handling: Test all error paths and edge cases
- Environment Variable Tests: Test env var substitution and validation
- Path Resolution Tests: Test relative/absolute path handling
Test Naming Conventions
- Use descriptive test names that explain the scenario
- Follow pattern: "should [expected behavior] when [condition]"
- Group related tests using nested
describeblocks
Testing Standards
Test Structure
- All tests should be placed in the
tests/directory, mirroring thesrc/structure - Test files must use
.test.tsextension - Use descriptive
describeanditblocks that clearly explain what is being tested
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 · 132 lines · 816 tokens per session scan A 9373fd38b55d
testing-standards is a cursor rule published in the GitHub repository aaydin-tr/swagger-navigator-mcp (2 stars, last pushed 2mo ago), licensed MIT. It adds 816 tokens to every session, about $0.0041 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-08-31.
Other cursor rules, from other repositories
testing
Test conventions for openapi-to-cli (Jest).
typescript-coding-rule
It allows a subset of JSDoc tags. Most tags must occupy their own line, with the tag at the beginning of the line.
git-github-workflow
When asked, to create a commit.
architecture
Architecture of openapi-to-cli (ocli).
code-style
Code style for openapi-to-cli (TypeScript).
implementation-order
Implementation order for openapi-to-cli (one unit at a time).