Source profileQuality 92/100

nimadorostkar/Claude-Skills-collection/skills/testing/test-strategy/SKILL.md

test-strategy

Use when deciding what to test and at which level. Covers the test pyramid, what belongs in unit versus integration versus end-to-end tests, coverage as a signal rather than a target, and eliminating flakiness.

Source repository stars
26
Declared platforms
0
Static risk flags
0
Last source update
2026-08-18
Source checked
2026-08-25

Decision brief

What it does: where it fits

Covers the test pyramid, what belongs in unit versus integration versus end-to-end tests, coverage as a signal rather than a target, and eliminating flakiness.

Best for

  • Designing a test suite for a new project.
  • A suite that is slow, flaky, or fails to catch bugs.
  • Deciding what to test for a specific change.

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/nimadorostkar/Claude-Skills-collection --skill "skills/testing/test-strategy"
Safe inspection promptEditorial

Inspect the Agent Skill "test-strategy" from https://github.com/nimadorostkar/Claude-Skills-collection/blob/03f39b7041ec2679255f8d6bb5b18421561821ae/skills/testing/test-strategy/SKILL.md at commit 03f39b7041ec2679255f8d6bb5b18421561821ae. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Workflow

    1. Test behavior, not implementation — A test that breaks when you rename a private method is a test that prevents refactoring rather than enabling it. 2. Choose the level by what you are verifying — Business logic: unit tests, fast and many. Integration with a real database or…

    Test behavior, not implementation — A test that breaks when you rename a private method is a test that prevents refactoring rather than enabling it.Choose the level by what you are verifying — Business logic: unit tests, fast and many. Integration with a real database or queue: integration tests, fewer. A complete user journey: end-to-end, a handful.Use real dependencies where practical — A test against a real Postgres in a container catches the SQL error that a mocked repository never will. Mocks verify that you called a thing; they do not verify that it works.
  2. 02

    Bad: verifies the implementation. Breaks on any refactor; catches no bugs.

    def testrefundcallsgateway(): gateway = Mock() RefundService(gateway).refund(order, 1000) gateway.refund.assertcalledoncewith(order.chargeid, 1000) This passes even if the refund is never recorded, the amount is wrong in the database, and the customer is charged again.

    def testrefundcallsgateway(): gateway = Mock() RefundService(gateway).refund(order, 1000) gateway.refund.assertcalledoncewith(order.chargeid, 1000) This passes even if the refund is never recorded, the amount is wrong i…
  3. 03

    Purpose

    Build a test suite that catches real defects, runs fast enough to be run, and does not need to be rewritten every time the code is refactored.

    Build a test suite that catches real defects, runs fast enough to be run, and does not need to be rewritten every time the code is refactored.
  4. 04

    When to Use

    Designing a test suite for a new project.

    Designing a test suite for a new project.A suite that is slow, flaky, or fails to catch bugs.Deciding what to test for a specific change.
  5. 05

    Capabilities

    Test-level selection: unit, integration, contract, end-to-end.

    Test-level selection: unit, integration, contract, end-to-end.Test-double strategy: what to fake, what to use for real.Coverage interpretation.

Permission review

Static risk signals and limitations

No configured static risk pattern was detected

This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score92/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars26SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
nimadorostkar/Claude-Skills-collection
Skill path
skills/testing/test-strategy/SKILL.md
Commit
03f39b7041ec2679255f8d6bb5b18421561821ae
License
MIT
Collected
2026-08-25
Default branch
main
View the original SKILL.md

Test Strategy

Purpose

Build a test suite that catches real defects, runs fast enough to be run, and does not need to be rewritten every time the code is refactored.

When to Use

  • Designing a test suite for a new project.
  • A suite that is slow, flaky, or fails to catch bugs.
  • Deciding what to test for a specific change.
  • Setting a coverage policy without making coverage the goal.

Capabilities

  • Test-level selection: unit, integration, contract, end-to-end.
  • Test-double strategy: what to fake, what to use for real.
  • Coverage interpretation.
  • Flakiness diagnosis and elimination.
  • Suite performance: parallelization and selective execution.

Inputs

  • The system, its dependencies, and its risk profile.
  • The current suite: its runtime, its failure rate, its bug-escape rate.

Outputs

  • A test suite whose distribution across levels is deliberate.
  • A fast feedback loop for the tests run on every change.
  • Zero tolerated flakes.

Workflow

  1. Test behavior, not implementation — A test that breaks when you rename a private method is a test that prevents refactoring rather than enabling it.
  2. Choose the level by what you are verifying — Business logic: unit tests, fast and many. Integration with a real database or queue: integration tests, fewer. A complete user journey: end-to-end, a handful.
  3. Use real dependencies where practical — A test against a real Postgres in a container catches the SQL error that a mocked repository never will. Mocks verify that you called a thing; they do not verify that it works.
  4. Write the test that would have caught the bug — After every production defect. This is where the highest-value tests come from — a real bug is empirical evidence of an untested path.
  5. Treat a flake as a defect — Quarantine it immediately, then fix it. A suite with a 2% flake rate teaches the team to re-run and eventually to ignore.
  6. Keep the fast loop fast — Under five minutes for what runs on every change, or people will stop running it.

Best Practices

  • Coverage is a signal, not a target. 100% coverage with assertion-free tests catches nothing; 60% coverage on the paths that matter catches most things. Look at what is not covered, not at the number.
  • The most valuable tests are at the boundaries: the empty list, the null, the concurrent write, the network failure. The happy path is the one that already works.
  • Mock what you do not own (a third-party payment API); use the real thing for what you do (your own database). Mocking your own repository layer tests only that your mock is configured correctly.
  • A test that requires a comment to explain what it is testing is testing too much.
  • Never assert on a log message or an internal call count unless that is the contract. Those assertions break on every refactor and catch nothing.
  • Delete tests that no longer earn their keep. A test suite is code and carries maintenance cost.

Examples

A test that verifies behavior, and one that verifies implementation:

# Bad: verifies the implementation. Breaks on any refactor; catches no bugs.
def test_refund_calls_gateway():
    gateway = Mock()
    RefundService(gateway).refund(order, 1000)
    gateway.refund.assert_called_once_with(order.charge_id, 1000)
    # This passes even if the refund is never recorded, the amount is wrong
    # in the database, and the customer is charged again.

# Good: verifies the behavior that the user and the business care about.
def test_refund_reduces_balance_and_is_idempotent(db, fake_gateway):
    order = place_order(db, total_cents=5_000)
    service = RefundService(fake_gateway, db)

    result = service.refund(order.id, amount_cents=2_000)

    assert result.ok
    assert db.orders.get(order.id).refunded_cents == 2_000
    assert fake_gateway.total_refunded(order.charge_id) == 2_000

    # The same request again must not refund twice.
    service.refund(order.id, amount_cents=2_000, idempotency_key=result.key)
    assert db.orders.get(order.id).refunded_cents == 2_000

The distribution that actually works:

Unit          ~70%   milliseconds each   business logic, edge cases, error paths
Integration   ~25%   seconds each        real DB, real queue, real HTTP layer
End-to-end     ~5%   tens of seconds     the three journeys that must never break

The proportions matter less than the principle: put the volume where the tests
are fast and the coverage is cheap, and reserve the slow, brittle level for
the handful of paths whose failure would be catastrophic.

Notes

  • Testcontainers gives you a real database, queue, or cache per test run, in Docker. It has largely eliminated the argument for mocking your own infrastructure — the real thing is now nearly as easy.
  • Contract tests (Pact and similar) verify that two services agree on their interface without deploying both. They are the right tool when end-to-end tests across services have become the bottleneck.
  • A test suite that has never caught a bug in production code is either a very good sign or a very bad one. Check which by mutating the code and seeing whether the tests notice.

Frequently asked questions

What to verify before installation and use

What does the test-strategy source document cover?

Covers the test pyramid, what belongs in unit versus integration versus end-to-end tests, coverage as a signal rather than a target, and eliminating flakiness.

How do I install test-strategy?

The source record exposes this install command: npx skills add https://github.com/nimadorostkar/Claude-Skills-collection --skill "skills/testing/test-strategy". Inspect the command and pinned source before running it.

Alternatives

Compare before choosing

Computed 10029,034

garrytan/gbrain

bulk-ingestion

End-to-end discipline for turning any large data source (audio libraries, email takeouts, document corpora, chat exports, API dumps) into brain pages at scale. The lifecycle spine: SCHEMA → ACCESS → TRIAL → EVALUATE → IMPROVE → CODIFY → TEST → SKILLIFY → BULK → MONITOR. State is tracked in a durable JSON manifest (see MANIFEST-PATTERN.md) so any crash, session boundary, or subagent fan-out resumes from ground truth instead of memory.

Computed 10024,921

alirezarezvani/claude-skills

app-store-optimization

App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

Computed 1005,241

dotnet/skills

migrate-vstest-to-mtp

Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing

Computed 991,257

vipshop/cache-dit

cache-dit-model-integration

High-level guide for integrating a new DiT model into cache-dit: Cache (BlockAdapter/ForwardPattern), Context Parallelism, Tensor Parallelism, Text Encoder Parallelism (TE-P), VAE Parallelism (VAE-P), generate CLI, installation, testing workflow, and detailed references. Use when adding support for a new diffusion transformer model in cache-dit.