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/kok-o/koko-contextos-agentsWrote 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/kok-o/koko-contextos-agents/testing)<a href="https://agentmods.dev/rules/kok-o/koko-contextos-agents/testing"><img src="https://agentmods.dev/badge/rules/kok-o/koko-contextos-agents/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/rules/kok-o/koko-contextos-agents/testing"><img src="https://agentmods.dev/badge/rules/kok-o/koko-contextos-agents/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.00032 | $0.01357 |
| Opus 5.5 | $0.00013 | $0.00543 |
| Sonnet 5.5 | $0.00006 | $0.00271 |
| Haiku 4.5 | $0.00003 | $0.00136 |
Grade A, and why
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 1mo 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 — 166 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Skill: testing
Testing
Overview
Testing strategy across unit, component, integration, and end-to-end testing suites using Vitest, React Testing Library, and Playwright.
When to Use
Activate for any task involving unit tests, integration tests, E2E testing, TDD/BDD workflows, or fixing regression bugs.
Rules & Patterns
️ The ContextOS Testing Pyramid
/\
/E2E\ 10% — Playwright (Critical user journeys, auth, checkout)
/-----\
/ Integ \ 20% — API & Component Integration (RTL + MSW / Supertest)
/---------\
/ Unit \ 70% — Pure functions, Domain Entities, Utils (Vitest)
/-------------\
Negative Constraints (What NOT to Do)
- NEVER mock internal implementation details: Mock ONLY external I/O boundaries (HTTP network requests via MSW, Database via test containers or in-memory DB).
- NEVER test implementation details: In React Testing Library, query by user-facing roles (
getByRole,getByLabelText), NEVER by CSS selectors or internal component state. - NEVER write assertions without an expected failure mode: Each test must test a single logical behavior and fail if that behavior breaks.
- NEVER leave flaky tests or arbitrary sleep (
await delay(1000)): Always usewaitFor()or explicit event triggers with timeouts. - NEVER share mutable state between tests: Every test must have isolated state via
beforeEach()setup and clean reset.
AAA Standard Pattern
describe('Feature / Unit', () => {
it('should achieve expected outcome when given specific condition', async () => {
// 1. ARRANGE
const user = createTestUser({ role: 'admin' });
// 2. ACT
const result = await processOrder(user, sampleCart);
// 3. ASSERT
expect(result.status).toBe('confirmed');
});
});
Code Examples
See EXAMPLES.md for detailed anti-patterns and production testing code.
Validation Checklist
- Tests follow Arrange-Act-Assert (AAA) structure
- No brittle CSS selectors or private state inspections
- Mocks isolated strictly to network/IO boundaries (MSW)
- Fast execution (< 5s for unit suite) with zero flaky sleeps
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.
- 1mo ago First seen · 166 lines · 32 tokens per session scan A d0cb96a22215
testing is a cursor rule published in the GitHub repository kok-o/koko-contextos-agents (2 stars, last pushed 1mo ago), licensed MIT. It adds 32 tokens to every session and 1,357 once invoked, about $0.0001 per session on Opus 5.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
develop-tdd
Test-driven development with red-green-refactor loop using vertical slices. Use for features (epic tasks) or bugs (specs/bugs/BUG-.md).
smoke-test
Post-deploy health-check against a live URL. Validates HTTP status, response content, and critical endpoints. Runnable standalone OR as the final step of the deploy skill.
fix-bug
Bug fix orchestrator — activeflow fixbug; reads specs/bugs/BUG-.md; chains investigate-bug, develop-tdd, validate-fix. Use when user reports a defect.
plan-tests
Design a risk-scaled test architecture for an epic before implementation begins. Produces prioritized scenarios, test level distribution, and fixture plans based on TEA and bigpowers principles.
investigate-bug
Investigate a bug or issue by exploring the codebase to find root cause, then write a TDD-based fix plan to specs/bugs/BUG-.md. Use when user reports a bug, wants to investigate a problem, mentions "triage", or wants to plan a fix.
simulate-agents
Run Mock User and Auditor agents against a feature in fresh contexts before human review. Use after verify-work, before request-review, when user wants pre-review simulation.