Agent skill

Test Strategy

by vibeeval in vibeeval/vibecosystem

Test pyramid decision matrix, coverage targets, when to write which test type, mock vs real dependency decisions, and test ROI analysis.

MITAuto-check passedTesting & QA

Install Test Strategy

skills CLI
$ npx skills add vibeeval/vibecosystem --skill test-strategy -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vibeeval/vibecosystem test-strategy --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/vibeeval/vibecosystem.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/test-strategy .claude/skills/test-strategy && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
test-strategy
GitHub stars
531
Token cost
~1.2k tokens
SKILL.md length
316 words
Files
1
Skills in repo
144
Repo updated
First seen
Licence
MIT

At a glance

Test pyramid decision matrix, coverage targets, when to write which test type, mock vs real dependency decisions, and test ROI analysis.

  • Works in 5 steps: Check for shared mutable state (global… → Check for missing await on async calls → Check for time-dependent assertions… → …
  • Tasks that involve Test strategy
  • SKILL.md covers Test Pyramid Ratio Guidance, Decision Matrix: Task Type →…, Mock vs Real Dependency… and Coverage Targets by Project Type, plus 6 more sections
  • Calls npx

What it does

Test Strategy is an agent skill from vibeeval/vibecosystem. Test pyramid decision matrix, coverage targets, when to write which test type, mock vs real dependency decisions, and test ROI analysis.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Test strategy and Unit testing. It works with Jest. The repository describes itself as: AI software team for Claude Code - 138 agents, 295 skills, 73 hooks. Self-learning, multi-agent swarm, autonomous skill evolution. The licence is MIT.

When your agent uses it

  • Tasks that involve Test strategy
  • Tasks that involve Unit testing

Example prompts

  • “/test-strategy”

Requirements

  • Node.js

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Check for shared mutable state (global variables, singleton caches)
  2. Check for missing await on async calls
  3. Check for time-dependent assertions (setTimeout, Date.now())
  4. Check for ordering dependencies (tests relying on previous test state)
  5. Add --runInBand to isolate and confirm

What it can do on your machine

Read from SKILL.md and the folder at commit 3b763b1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Test Strategy loads about 1.2k tokens when it runs. Until then it costs about 38 tokens; SKILL.md has 316 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~38
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from vibeeval/vibecosystem at commit 3b763b1, republished under its MIT licence (© vibeeval). 316 words, ~1,225 tokens.

Download SKILL.mdSave it as .claude/skills/test-strategy/SKILL.md (or your agent's skills folder).
name
test-strategy
description
Test pyramid decision matrix, coverage targets, when to write which test type, mock vs real dependency decisions, and test ROI analysis.

Test Strategy

Test Pyramid Ratio Guidance

        /\
       /e2e\         ~10% — critical user flows only
      /------\
     /  integ  \     ~20% — API contracts, DB interactions
    /------------\
   /    unit      \  ~70% — pure logic, transformations, edge cases
  /--------------\

Keep the pyramid right-side-up. Inverting it (too many e2e) leads to slow, flaky CI.

Decision Matrix: Task Type → Test Type

Task TypeTest TypeTool
Pure function / utilityUnitJest / Vitest
API endpointIntegrationSupertest / httpx
Critical user flowE2EPlaywright
Data transformationProperty-basedfast-check / Hypothesis
React/Vue componentComponentTesting Library
CLI commandIntegrationexeca + assertions
Database queryIntegration (real DB)jest + pg / pytest
Cron job / schedulerUnit (mocked time)Jest fakeTimers

Mock vs Real Dependency Decision Tree

Is it an external API (Stripe, Sendgrid, etc.)?
  → YES: Always mock. Use recorded fixtures or MSW.

Is it a database?
  → Unit test context: mock (in-memory store or jest.fn())
  → Integration test context: real DB (test container or local)

Is it the file system?
  → Mock with memfs or tmp dir, then clean up.

Is it time / Date.now()?
  → Always mock. Use Jest fakeTimers or freezegun (Python).

Is it a third-party SDK wrapper you wrote?
  → Skip testing the wrapper itself, test your code's behavior.

Coverage Targets by Project Type

Project TypeBranch CoverageNotes
Published library90%+Every exported function needs tests
Production app80%+Focus on critical paths
Internal tool70%+Happy path + main error cases
Prototype / spikeSkipThrow it away anyway
Generated codeSkipDon't test codegen output

Test Naming Conventions

Jest / Vitest (describe + it)
typescript
describe('calculateDiscount', () => {
  it('returns 10% for gold members', () => { ... })
  it('returns 0% when cart is empty', () => { ... })
  it('throws when discount rate exceeds 100', () => { ... })
})
Given-When-Then (BDD style)
typescript
describe('OrderService', () => {
  describe('given a confirmed order', () => {
    describe('when the user cancels', () => {
      it('then it transitions to CANCELLED state', () => { ... })
      it('then it sends a cancellation email', () => { ... })
    })
  })
})

When NOT to Test

  • Generated code (Prisma client, GraphQL types, protobuf outputs)
  • Third-party SDK wrappers with zero custom logic
  • Trivial getters/setters (getEmail() { return this.email })
  • Config files
  • Framework boilerplate (Next.js _app.tsx, Express server bootstrap)

Test Isolation Strategies

Transaction rollback (PostgreSQL)
typescript
beforeEach(async () => {
  await db.query('BEGIN')
})

afterEach(async () => {
  await db.query('ROLLBACK')
})
Cleanup hooks
typescript
afterEach(() => {
  jest.clearAllMocks()        // clear call counts
  jest.resetAllMocks()        // reset return values
  jest.restoreAllMocks()      // restore spied originals
})
Test containers (real DB, isolated)
typescript
import { PostgreSqlContainer } from '@testcontainers/postgresql'

let container: StartedPostgreSqlContainer

beforeAll(async () => {
  container = await new PostgreSqlContainer().start()
  process.env.DATABASE_URL = container.getConnectionUri()
})

afterAll(async () => {
  await container.stop()
})

Flaky Test Triage

When a test is flaky (passes/fails non-deterministically):

  1. Check for shared mutable state (global variables, singleton caches)
  2. Check for missing await on async calls
  3. Check for time-dependent assertions (setTimeout, Date.now())
  4. Check for ordering dependencies (tests relying on previous test state)
  5. Add --runInBand to isolate and confirm

Mutation Testing (Stryker)

Mutation testing verifies that your tests actually catch bugs:

bash
npx stryker run
json
// stryker.config.json
{
  "mutator": { "excludedMutations": ["StringLiteral"] },
  "thresholds": { "high": 80, "low": 60, "break": 50 },
  "reporters": ["html", "progress"]
}

Mutation score < 60% means tests pass without catching real logic errors. Focus on the surviving mutants — each one is an untested code path.

Test ROI Analysis

High ROI (write these first):

  • Business logic with branching conditions
  • Error handling paths
  • Data validation functions
  • State machine transitions

Low ROI (write last or skip):

  • Simple CRUD with no custom logic
  • Pass-through adapters
  • Logging statements
  • UI cosmetic details

© vibeeval, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/test-strategy of vibeeval/vibecosystem.

Open the folder on GitHubat commit 3b763b1

Compare with similar skills

Test Strategy next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Test Strategy compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Test Strategy this skillvibeeval/vibecosystem531—~1.2kAutomated safety check: PassMIT
Designing TestsCloudAI-X/claude-workflow-v21.4k1 repos~1.5kAutomated safety check: PassMIT
Handsontable Unit Testinghandsontable/handsontable22k—~1.2kAutomated safety check: PassCustom licence
Python Testing Patternsjh941213/my-cc-harness12616 repos~5.4kAutomated safety check: PassNone
Nestjs Expertdavila7/claude-code-templates32k6 repos~5.3kAutomated safety check: NotesMIT
Testing FundamentalsDanielPodolsky/ownyourcode2901 repos~1.5kAutomated safety check: PassMIT

Similar skills

  • Designing Tests

    CloudAI-X/claude-workflow-v2

    Designs and implements testing strategies for any codebase. An agent skill from CloudAI-X/claude-workflow-v2.

    1.4k GitHub starsUsed in 1 repo~1.5k tokens
    Testing & QAAuto-check passed
  • Handsontable Unit Testing

    handsontable/handsontable

    Conventions for Handsontable's Jest unit and TypeScript type tests: where files go, how to run them, mocking limits and when to write an E2E test instead.

    22k GitHub stars~1.2k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Python Testing Patterns

    jh941213/my-cc-harness

    Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development.

    126 GitHub starsUsed in 16 repos~5.4k tokens
    Testing & QAAuto-check passed
  • Nestjs Expert

    davila7/claude-code-templates

    Nest.js framework expert specializing in module architecture, dependency injection, middleware, guards, interceptors, testing with Jest/Supertest, TypeORM/Mongoose integration, and Passport.js…

    32k GitHub starsUsed in 6 repos~5.3k tokens
    Testing & QAAuto-check: notes
  • Testing Fundamentals

    DanielPodolsky/ownyourcode

    Guides test strategy for unit, integration, and E2E testing.

    290 GitHub starsUsed in 1 repo~1.5k tokens
    Testing & QAAuto-check passed
  • Senior QA

    alirezarezvani/claude-skills

    Generates unit tests, integration tests, and E2E tests for React/Next.js applications.

    28k GitHub starsUsed in 1 repo~2.1k tokens
    Testing & QAAuto-check passed

More from vibeeval/vibecosystem

All 144 skills in this repo
  • Agent Benchmark

    vibeeval/vibecosystem

    Framework for measuring and tracking agent response quality over time.

    531 GitHub stars~2.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Differential Review

    vibeeval/vibecosystem

    Security-focused differential code review with blast radius analysis, risk-adaptive depth (DEEP/FOCUSED/SURGICAL), git history correlation, and structured finding format.

    531 GitHub stars~1.6k tokensUpdated 2 mo ago
    Auto-check passed
  • Factcheck Guard

    vibeeval/vibecosystem

    A skill your agent uses when making any factual claim about the codebase — existence, absence, or behavior.

    531 GitHub stars~2.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Fp Check

    vibeeval/vibecosystem

    Systematic false positive verification for security findings.

    531 GitHub stars~1.6k tokensUpdated 2 mo ago
    Auto-check passed
  • N8n Workflows

    vibeeval/vibecosystem

    n8n otomasyon workflow'lari. An agent skill from vibeeval/vibecosystem.

    531 GitHub stars~3.3k tokensUpdated 2 mo ago
    Auto-check passed
  • Notepad System

    vibeeval/vibecosystem

    A skill your agent uses when context compression is imminent, when resuming a session, or when preserving critical decisions across long tasks.

    531 GitHub stars~1.7k tokensUpdated 2 mo ago
    Auto-check passed

Works with

Categories

Questions about Test Strategy

What does Test Strategy do?

Test pyramid decision matrix, coverage targets, when to write which test type, mock vs real dependency decisions, and test ROI analysis. Test Strategy is an agent skill from vibeeval/vibecosystem. Test pyramid decision matrix, coverage targets, when to write which test type, mock vs real dependency decisions, and test ROI analysis.

When should I use Test Strategy?

Test Strategy fits situations like: tasks that involve Test strategy; tasks that involve Unit testing.

How do I install Test Strategy in Claude Code?

Run `npx skills add vibeeval/vibecosystem --skill test-strategy -a claude-code`. Or copy the skill folder (skills/test-strategy in vibeeval/vibecosystem) into .claude/skills/test-strategy in your project. Claude Code loads it when a task matches its description.

How do I install Test Strategy in Codex?

Run `npx skills add vibeeval/vibecosystem --skill test-strategy -a codex`. Or copy the skill folder (skills/test-strategy in vibeeval/vibecosystem) into .agents/skills/test-strategy in your project. Codex loads it when a task matches its description.

Can I use Test Strategy in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vibeeval/vibecosystem --skill test-strategy -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/test-strategy, .gemini/skills/test-strategy, .github/skills/test-strategy and .opencode/skills/test-strategy in your project.

What does Test Strategy need to run?

Going by SKILL.md and its folder, Test Strategy needs the command-line tools its instructions call (npx). Our summary lists: Node.js.

Does Test Strategy access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Test Strategy safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Test Strategy use?

Test Strategy is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Test Strategy use?

About 1.2k tokens (SKILL.md is roughly 4.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Test Strategy?

Skills that share tags, products or a category with Test Strategy: Designing Tests (CloudAI-X/claude-workflow-v2, 1.4k stars), Handsontable Unit Testing (handsontable/handsontable, 22k stars), Python Testing Patterns (jh941213/my-cc-harness, 126 stars) and Nestjs Expert (davila7/claude-code-templates, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Test Strategy?

vibeeval (a GitHub user) maintains it in vibeeval/vibecosystem, which has 531 GitHub stars. The repository holds 144 skills in this directory. The repository was last updated on August 8, 2026.

Source: vibeeval/vibecosystem on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.