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/d-padmanabhan/agent-engineering-handbook/300-testinggit clone --depth 1 https://github.com/d-padmanabhan/agent-engineering-handbookWhat 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.00022 | $0.08881 |
| Opus 5 | $0.00011 | $0.04441 |
| Sonnet 5 | $0.00004 | $0.01776 |
| Haiku 4.5 | $0.00002 | $0.00888 |
Grade A, and why
300-testing 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 3d 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 — 1,453 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Testing Strategies & Best Practices
Audience: engineers writing and reviewing tests across languages and frameworks Goal: Create reliable, maintainable test suites that provide fast feedback and high confidence
Testing Philosophy (Core Principles)
Core Principles:
- "Test pyramid, not test ice cream cone" - More unit tests, fewer integration tests, minimal E2E tests
- "Fast feedback loop" - Tests should run quickly and fail fast with clear error messages
- "Tests are documentation" - Tests describe how code should behave, make them readable
- "Isolation is essential" - Tests should be independent, repeatable, and not depend on each other
- "Quality over quantity" - 80% coverage is good, but meaningful tests matter more than coverage percentage
- "Test behavior, not implementation" - Test what the code does, not how it does it
- "Fail fast, fail clearly" - Tests should fail with actionable error messages
- "Maintainability matters" - Tests should be easy to update when requirements change
Applying Testing Principles:
// BAD: Testing implementation, unclear, slow
it('test1', () => {
const result = service.process();
expect(result).toBeTruthy();
});
// GOOD: Testing behavior, clear, fast
it('should calculate total price with 10% discount', () => {
// Arrange
const cart = new ShoppingCart();
cart.addItem({ id: '1', price: 100 });
cart.addItem({ id: '2', price: 50 });
// Act
const total = cart.calculateTotal(0.1);
// Assert
expect(total).toBe(135); // (100 + 50) * 0.9
});
Guiding Principles
- Test Pyramid: More unit tests, fewer integration tests, minimal E2E tests
- Fast Feedback: Tests should run quickly and fail fast
- Isolation: Tests should be independent and repeatable
- Clarity: Tests are documentation - make them readable
- Coverage: Aim for 80%+ coverage, but quality > quantity
Test Pyramid
E2E Tests (Few)
- Slow, brittle, expensive
- Test critical user journeys
E2E - 5-10% of tests
Integration Tests (Some)
Integration - Medium speed
- Test component interactions
- 20-30% of tests
Unit Tests (Many)
Unit - Fast, focused, reliable
- Test individual functions/classes
- 60-70% of 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.
- 3d ago First seen · 1,453 lines · 22 tokens per session scan A 9721dc5bccaf
300-testing is a cursor rule published in the GitHub repository d-padmanabhan/agent-engineering-handbook (15 stars, last pushed 3d ago), licensed MIT. It adds 22 tokens to every session and 8,881 once invoked, about $0.0001 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-30.
Other cursor rules, from other repositories
testing-patterns
Паттерны тестирования 1С: YaXUnit, Vanessa.
verify-scope
改完代码要跑验证时读——三档验证阶梯的窄化命令配方(pytest ::/-k/--lf、vitest 点名文件/-t/--related、shoot 场景过滤)、release:gate 五段分拆与失败续跑、反空转与跨包边界。跑 release:gate / 全量 pytest / 全量 vitest / pnpm shoot 前必读。.
testing
Testing conventions and Playwright patterns.
testing
Testing strategy for AI developers.
testing-guide
Cursor rule "testing-guide" from HeeGyeong/ComposeSample, covering testing guide, unit tests, ui tests, test coverage and performance testing.
issues-tests
Backend test conventions — QuarkusTest, REST Assured, Given, ArchUnit.