pn-testing-strategy

pn-testing-strategy is a skill for Cursor from perniemann/pnCore. It costs 46 tokens per session (814 once invoked), scanned A, original, MIT.

A guide for choosing and organizing unit, integration, and end-to-end tests across a project. End-to-end tests check complete user journeys, while unit tests check small isolated pieces.

In plain words
What is it for?
Use it to define a testing approach, review coverage gaps and flaky tests, choose testing tools, and set up test infrastructure.
Why use it?
It helps prevent slow, fragile test suites with too many end-to-end tests and too few focused checks. It also supports decisions about tools and test-environment setup.

Skill for Cursor

Written for Cursor: shipped in a Cursor plugin.

Part of the pn-core plugin — 133 skills, 19 commands, 9 agents, 1 MCP server shipped together

Good fit Use it to define a testing approach, review coverage gaps and flaky tests, choose testing tools, and set up test infrastructure.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/perniemann/pncore/pn-testing-strategy
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.

Any agent
npx skills add perniemann/pnCore --skill pn-testing-strategy
Clone the repo
git clone --depth 1 https://github.com/perniemann/pnCore

Made for: Cursor.

Or install pn-core, the plugin that ships this one along with the rest of its 133 skills, 19 commands, 9 agents, 1 MCP server.

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 pn-testing-strategy

README.md
[![agentmods](https://agentmods.dev/badge/skills/perniemann/pncore/pn-testing-strategy/github.svg)](https://agentmods.dev/skills/perniemann/pncore/pn-testing-strategy)
Your own site
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-testing-strategy"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-testing-strategy/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.

agentmods 80×15 button for pn-testing-strategy

Your own site · 80×15
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-testing-strategy"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-testing-strategy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 814 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00046 $0.00814
Opus 5 $0.00023 $0.00407
Sonnet 5 $0.00009 $0.00163
Haiku 4.5 $0.00005 $0.00081

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

Security

Grade A, and why

pn-testing-strategy 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.

packages/pn-core-mcp/content/skills/discipline/pn-testing-strategy/SKILL.md · 84 lines

How it starts

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

Testing strategy

When to use

  • Deciding which types of tests to write for a new feature
  • Reviewing a test suite for gaps, redundancy, or flakiness
  • Setting up a project's test infrastructure from scratch
  • Choosing between Vitest, Playwright, MSW, or other test tools
  • Adding contract testing to a multi-service architecture

For full setup code, config examples, and CI configuration, see reference.md.

The testing pyramid

         /\
        /E2E\       few, high-confidence, slow
       /------\
      /  Integ  \   moderate, key user flows
     /------------\
    /    Unit      \  many, fast, isolated
   /----------------\
Layer Target share Tools Speed Confidence
Unit 60–70% Vitest < 1ms per test Logic correctness
Integration 20–30% Vitest + real DB / MSW 10–100ms Boundary contracts
E2E 5–10% Playwright 1–30s Full user journeys

Anti-pattern — the ice-cream cone: too many E2E tests, few units. Result: slow CI, brittle tests, hard to pinpoint failures.

Tool decision matrix

Need Tool Notes
Unit tests (JS/TS) Vitest Fast, native ESM, compatible with Jest API
React component tests Vitest + Testing Library @testing-library/react for user-centric assertions
Server-side API tests Vitest + supertest Test handlers in-process; no network overhead
Mock HTTP requests MSW Intercepts at the network level; works in browser + Node
E2E / browser tests Playwright Multi-browser, reliable, built-in tracing
Visual regression Playwright + screenshots or Chromatic Catch unintended UI changes
Contract testing Pact or OpenAPI test Verify consumer/provider contracts

What to write for each layer

Unit tests — always write for:

  • Pure functions with business logic
  • Utility functions (formatting, validation, calculation)
  • State machines and reducers
  • Individual React components (behaviour, not snapshot)

Read the full file on GitHub · 84 lines

Files

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.

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 · 84 lines · 46 tokens per session scan A 490d25e098d8

Subscribe to this mod's changes

pn-testing-strategy is a skill published in the GitHub repository perniemann/pnCore (0 stars, last pushed 2d ago), licensed MIT. It adds 46 tokens to every session and 814 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-09-03.

Related

Other skills, from other repositories