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 skills add lugassawan/swe-workbench --skill principle-testinggit clone --depth 1 https://github.com/lugassawan/swe-workbenchWrote 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/lugassawan/swe-workbench/principle-testing)<a href="https://agentmods.dev/skills/lugassawan/swe-workbench/principle-testing"><img src="https://agentmods.dev/badge/skills/lugassawan/swe-workbench/principle-testing/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/skills/lugassawan/swe-workbench/principle-testing"><img src="https://agentmods.dev/badge/skills/lugassawan/swe-workbench/principle-testing.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.00098 | $0.01443 |
| Opus 5 | $0.00049 | $0.00722 |
| Sonnet 5 | $0.00020 | $0.00289 |
| Haiku 4.5 | $0.00010 | $0.00144 |
Grade A, and why
principle-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 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 — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Testing Strategy and Architecture
Strategy and architecture, not the red-green-refactor discipline. For that, see swe-workbench:principle-tdd.
The pyramid
Three tiers, wide base up: unit → integration → e2e. Baseline ratio: ~70% unit, ~20% integration, ~10% e2e — adjust toward more integration for infrastructure-heavy systems, more e2e for UI-heavy products.
Inverting the pyramid (heavy e2e, thin unit) produces a slow, brittle suite — e2e tests amplify flakiness and punish every external dependency.
- Unit — one class or function, no I/O, milliseconds.
- Integration — two or more collaborators, real infrastructure (DB, message bus), seconds.
- e2e — full stack through the UI or API gateway; minutes.
Prefer more granular tests. One integration test that exercises a migration is worth more than five e2e tests covering the same path.
Test doubles
Five kinds (Meszaros's xUnit Patterns taxonomy). State-based: Stub, Fake. Behavior-verification: Spy, Mock. Dummy is a degenerate no-op.
| Double | What it does | When to use |
|---|---|---|
| Dummy | Passed but never called | Satisfying required params |
| Stub | Returns canned responses | Isolating the path under test |
| Fake | Working implementation (e.g. in-memory DB) | Fast integration tests |
| Spy | Records calls for post-hoc assertion | Verifying interactions |
| Mock | Pre-programmed expectations; fails on violation | Strict boundary contracts |
Mock only at trust boundaries: network, clock, filesystem, random, external services. The seam is domain ↔ infrastructure (Clean Architecture's dependency rule). Everything inside the domain is instantiated for real.
If a collaborator is hard to instantiate, that is a design signal — recommend a refactor, not a mock.
Coverage vs confidence
Line coverage is a metric, not a quality signal. 90% coverage with assertions only on getters is worthless; 60% coverage with well-targeted branch assertions is not.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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 · 111 lines · 98 tokens per session scan A 6d7215f8e514
principle-testing is a skill published in the GitHub repository lugassawan/swe-workbench (2 stars, last pushed 3d ago), licensed MIT. It adds 98 tokens to every session and 1,443 once invoked, about $0.0005 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-03.
Other skills, from other repositories
check-and-test
Run lint checks (ruff for Python, Biome for TS/JS), type checks (pyright for Python, tsc for TS/JS), and the standard pytest tiers (unit + e2e + tests skipped during pre-commit). Investigates failures to determine if they are application bugs or test issues, and fixes application bugs rather than weakening tests. Does…
brooks-test
Test quality review drawing on twelve classic engineering books — with primary focus on xUnit Test Patterns, The Art of Unit Testing, How Google Tests Software, and Working Effectively with Legacy Code — that diagnoses structural problems in an existing test suite: brittleness, mock abuse, coverage illusions, slow…
test-implement
Implements React/TypeScript unit, integration, and browser E2E tests with the repository's configured runner, mocks, setup, and browser harness. Use when creating or completing frontend tests and generated test skeletons.
verify
Verification loop — lint -> typecheck -> unit -> integration -> e2e.
check-coverage
Comprehensive assessment of Unit / Integration / E2E three-layer test coverage, identify gaps and provide actionable recommendations.
testing-assistant
Manages testing lifecycle including unit tests, integration tests, validation, and quality assurance.