testing

testing is a skill for Claude Code, Codex from kok-o/koko-contextos-agents. It costs 34 tokens per session (610 once invoked), scanned A, original, MIT.

A testing guide for Vitest, React Testing Library, and Playwright. It covers unit tests, component and API integration tests, and end-to-end tests, while defining test-driven and behavior-driven development practices.

In plain words
What is it for?
Planning and writing tests for functions, React components, integrations, and complete user journeys such as authentication or checkout.
Why use it?
It helps teams find regressions without relying on fragile tests or checking private implementation details.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Install

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.

agentmods
npx agentmods add skills/kok-o/koko-contextos-agents/testing
Any agent
npx skills add kok-o/koko-contextos-agents --skill testing
Clone the repo
git clone --depth 1 https://github.com/kok-o/koko-contextos-agents

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/kok-o/koko-contextos-agents/testing.svg)](https://agentmods.dev/skills/kok-o/koko-contextos-agents/testing)
Your own site
<a href="https://agentmods.dev/skills/kok-o/koko-contextos-agents/testing"><img src="https://agentmods.dev/badge/skills/kok-o/koko-contextos-agents/testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 610 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00034 $0.00610
Opus 5 $0.00017 $0.00305
Sonnet 5 $0.00007 $0.00122
Haiku 4.5 $0.00003 $0.00061

Measured 5d ago against content hash 7fe257e1ccde, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

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 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.

.agents/core/skills/testing/SKILL.md · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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)

  1. NEVER mock internal implementation details: Mock ONLY external I/O boundaries (HTTP network requests via MSW, Database via test containers or in-memory DB).
  2. NEVER test implementation details: In React Testing Library, query by user-facing roles (getByRole, getByLabelText), NEVER by CSS selectors or internal component state.
  3. NEVER write assertions without an expected failure mode: Each test must test a single logical behavior and fail if that behavior breaks.
  4. NEVER leave flaky tests or arbitrary sleep (await delay(1000)): Always use waitFor() or explicit event triggers with timeouts.
  5. 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

Read the full file on GitHub · 71 lines

Files

What ships with it

4 files 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.

Changes

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.

  1. 5d ago First seen · 71 lines · 34 tokens per session scan A 7fe257e1ccde

Subscribe to this mod's changes

testing is a skill published in the GitHub repository kok-o/koko-contextos-agents (2 stars, last pushed yesterday), licensed MIT. It adds 34 tokens to every session and 610 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

verify-work

Verify feature, bug, UI, API, mobile, security, or deployment work against acceptance criteria.

HoangNguyen0403/agent-skills-standard · 23 tokens

testing-strategies

Systematic testing for confidence without over-testing — the right test at the right level.

fabioc-aloha/Alex_Skill_Mall · 21 tokens

testing

Testing strategies and methodologies including TDD and E2E testing. Use when writing tests, implementing TDD workflow, or setting up E2E test infrastructure.

xiaobei930/cc-best · 34 tokens

testing-guide

測試金字塔,以及 UT/IT/ST/E2E 的測試撰寫標準。 支援 ISTQB 與業界通行金字塔兩種框架。 Use when: 撰寫測試、討論測試覆蓋率、測試策略或測試命名時。 Not for: 驅動紅-綠-重構循環——請用 /tdd;量測實際達成的覆蓋率——請用 /coverage。 Keywords: test, unit, integration, e2e, coverage, mock, ISTQB, SIT, 測試, 單元測試, 整合測試, 端對端.

AsiaOstrich/universal-dev-standards · 152 tokens

sota-testing

State-of-the-art software testing strategy and practice (2026) for designing test strategy, writing unit/integration/e2e tests, or auditing test suites. Covers suite shape (pyramid/trophy/honeycomb), test design quality (behavior-first, AAA, determinism, smells), test doubles (mocks/fakes/stubs), test data (builders…

martinholovsky/SOTA-skills · 239 tokens

testing-strategy

Deciding what to test, at which level, and how to keep tests trustworthy. Use when writing tests, setting up a test suite, reviewing test coverage, fixing flaky tests, doing TDD, or when the user says "test", "coverage", "unit test", "integration test", "e2e", or "how do I test this".

05-deepak-patidar/claude-skills · 76 tokens