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 skills/sawrus/agent-guides/test-pyramidnpx skills add sawrus/agent-guides --skill test-pyramidgit clone --depth 1 https://github.com/sawrus/agent-guidesWrote 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/skills/sawrus/agent-guides/test-pyramid)<a href="https://agentmods.dev/skills/sawrus/agent-guides/test-pyramid"><img src="https://agentmods.dev/badge/skills/sawrus/agent-guides/test-pyramid.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.00026 | $0.00992 |
| Opus 5 | $0.00013 | $0.00496 |
| Sonnet 5 | $0.00005 | $0.00198 |
| Haiku 4.5 | $0.00003 | $0.00099 |
Grade A, and why
test-pyramid scanned grade A with 1 finding 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 2d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
with patch("requests.get") as mock: How it starts
The opening of the file, as written. The whole thing — 128 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test Pyramid Strategy Skill
Expertise: Test type selection, suite health, test doubles, coverage strategy, CI integration.
Test Type Decision Tree
Is this a user-visible multi-step workflow (login → action → confirmation)?
→ E2E test (Playwright/Cypress/Detox)
Does the code call external systems (DB, API, queue, file system)?
→ Integration test (real or containerized dependency)
Is this pure business logic, calculation, data transformation, conditional?
→ Unit test (fast, isolated, no I/O)
Is this a contract between two services?
→ Contract test (Pact or schema validation)
Healthy Suite Ratios
| Layer | Target % | When runs | Max duration |
|---|---|---|---|
| Unit | 70% | Every commit | < 2 min |
| Integration | 20% | Every PR | < 5 min |
| E2E | 10% | Pre-release | < 20 min |
Suite health signals to act on:
- Tests take > 10 min → too many E2E, not enough unit
- Flake rate > 1% → isolation problems
- Coverage high but bugs still escape → testing implementation, not behavior
Test Doubles Reference
Situation → Double
──────────────────────────────────────────────────────────
Verify a function WAS called → Mock
Control what a dependency returns → Stub
Need working but simplified implementation → Fake (in-memory DB)
Observe calls without replacing behavior → Spy
Golden rule: Never mock what you don't own. Wrap third-party libraries in your own adapter → mock the adapter.
# ❌ Mocking requests directly
with patch("requests.get") as mock:
mock.return_value.json.return_value = {"status": "ok"}
# ✅ Mock your own wrapper
class HttpClient:
async def get(self, url: str) -> dict: ...
class FakeHttpClient:
async def get(self, url: str) -> dict:
return {"status": "ok"}
service = MyService(http_client=FakeHttpClient())
Coverage Strategy (Risk-Based Priority)
Coverage is a floor, not a ceiling. Priority:
- Data mutations — anything that writes to DB
- Business rules — validation, state machines, calculations
- Error paths — what happens when things fail
- Integration boundaries — DB queries, API calls, queue messages
- Happy path UI flows — last, most expensive
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.
- 2d ago First seen · 128 lines · 26 tokens per session scan A 0dde31ddc368
test-pyramid is a skill published in the GitHub repository sawrus/agent-guides (17 stars, last pushed 5d ago), licensed MIT. It adds 26 tokens to every session and 992 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
appium-skill
Generates production-grade Appium mobile automation scripts for Android and iOS in Java, Python, or JavaScript. Supports real device and emulator testing locally and on TestMu AI cloud with 100+ real devices. Use when the user asks to automate mobile apps, test on Android/iOS, write...
android-ui-journey-testing
XML-specified Android UI journey testing, interactive step execution, assertion verification, and JSON outcome reporting.
quinn
Proves the system works by writing and executing comprehensive test suites.
android_ui_verification
Automated end-to-end UI testing and verification on an Android Emulator using ADB.
browser-testing-with-devtools
Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be…
awt-e2e-testing
AI-powered E2E web testing — eyes and hands for AI coding tools. Declarative YAML scenarios, Playwright execution, visual matching (OpenCV + OCR), platform auto-detection (Flutter/React/Vue), learning DB. Install: npx skills add ksgisang/awt-skill --skill awt -g.