testing-guidelines

testing-guidelines is a skill for Claude Code, Codex from Casper-Studios/casper-marketplace. It costs 35 tokens per session (611 once invoked), scanned A, original, MPL-2.0.

A set of rules for deciding which tests are worth writing and how to write them. It focuses on tests that check behavior owned by your project, rather than repeating what libraries or test setup already guarantee.

In plain words
What is it for?
Use it when proposing, writing, reviewing, or deleting tests, especially around wrappers, schemas, database tools, frameworks, mocks, and spies. It helps identify the exact behavior a test protects and the realistic defect it should catch.
Why use it?
It helps avoid tests that pass only because a mock or test fixture was configured that way. It also makes missing integration or contract testing visible as a coverage gap instead of hiding it behind weak unit tests.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Part of the codebase-architecture plugin — 4 skills shipped together

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/casper-studios/casper-marketplace/testing-guidelines
Any agent
npx skills add Casper-Studios/casper-marketplace --skill testing-guidelines
Clone the repo
git clone --depth 1 https://github.com/Casper-Studios/casper-marketplace

Made for: Claude Code, Codex.

Or install codebase-architecture, the plugin that ships this one along with the rest of its 4 skills.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/casper-studios/casper-marketplace/testing-guidelines.svg)](https://agentmods.dev/skills/casper-studios/casper-marketplace/testing-guidelines)
Your own site
<a href="https://agentmods.dev/skills/casper-studios/casper-marketplace/testing-guidelines"><img src="https://agentmods.dev/badge/skills/casper-studios/casper-marketplace/testing-guidelines.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 611 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.00035 $0.00611
Opus 5 $0.00017 $0.00305
Sonnet 5 $0.00007 $0.00122
Haiku 4.5 $0.00003 $0.00061

Measured yesterday against content hash 074d109b8586, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

testing-guidelines 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 yesterday.

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.

plugins/engineering/codebase-architecture/skills/testing-guidelines/SKILL.md · 63 lines

How it starts

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

Testing Guidelines

This skill treats tests as protection for project-owned behavior, not as a coverage ritual. It favors cheap sans-I/O tests and rejects tests that merely restate test-double configuration, third-party libraries, or transparent wiring.

A meaningful test protects an exact project-owned invariant with an independently derived oracle at a level capable of observing a realistic defect. When the available infrastructure cannot provide that evidence, add no test and record the coverage gap when protection is still required.

Test Admission

Test behavior that the project owns. Assume third-party libraries are correct and already tested.

Add a test only when it can fail because project-owned behavior is wrong.

Before adding or retaining a test, require all of the following:

  • Name the exact project-owned invariant that the test protects.
  • Name a realistic defect that violates that invariant and causes the test to fail.
  • Derive the expected result independently of test-double configuration.
  • Select the test level capable of observing that defect.
  • Treat missing contract or integration infrastructure as a coverage gap. Test doubles cannot substitute for that infrastructure.

Project-owned behavior includes:

  • Business rules and calculations.
  • State-machine transitions and exhaustive decisions.
  • Transformations that add domain meaning.
  • Selection, retry, fallback, caching, and persistence policy.
  • Error translation that adds a stable project contract.

Do not add a test when the implementation only forwards values to a dependency and returns its result unchanged.

Existing-Test Review

Delete a test when it only:

  • Repeats third-party documentation.
  • Asserts schema-library mechanics.
  • Verifies a one-to-one forwarding wrapper.
  • Asserts test-double configuration.
  • Checks getters, constructors, or field assignment without behavior.
  • Exercises framework plumbing without a project-owned contract.

Do not preserve a useless test for coverage. Coverage is evidence of execution, not evidence of meaningful verification.

Read the full file on GitHub · 63 lines

Files

What ships with it

6 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. yesterday Changed · +2 lines · -48 tokens per session 074d109b8586
  2. 6d ago First seen · 61 lines · 83 tokens per session scan A 479646f92fb8

Subscribe to this mod's changes

testing-guidelines is a skill published in the GitHub repository Casper-Studios/casper-marketplace (12 stars, last pushed yesterday), licensed MPL-2.0. It adds 35 tokens to every session and 611 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-30.