good-test-bad-test

good-test-bad-test is a skill for Codex from zacharygcook/agent-skills. It costs 52 tokens per session (467 once invoked), scanned A, original, MIT.

A skill for deciding whether a proposed test checks useful user-facing behavior, accidentally preserves implementation details, or is only temporary proof during test-driven development (TDD). TDD is a practice of using tests to guide code changes.

In plain words
What is it for?
Use it before adding, expanding, reviewing, or deleting tests, especially for coverage work, bug fixes, and tests that rely heavily on mocks or private helpers.
Why use it?
It helps avoid tests that inflate coverage while making refactoring harder or keeping dead and questionable code alive.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it before adding, expanding, reviewing, or deleting tests, especially for coverage work, bug fixes, and tests that rely heavily on mocks or private helpers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zacharygcook/agent-skills/good-test-bad-test
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 zacharygcook/agent-skills --skill good-test-bad-test
Clone the repo
git clone --depth 1 https://github.com/zacharygcook/agent-skills

Made for: 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 good-test-bad-test

README.md
[![agentmods](https://agentmods.dev/badge/skills/zacharygcook/agent-skills/good-test-bad-test/github.svg)](https://agentmods.dev/skills/zacharygcook/agent-skills/good-test-bad-test)
Your own site
<a href="https://agentmods.dev/skills/zacharygcook/agent-skills/good-test-bad-test"><img src="https://agentmods.dev/badge/skills/zacharygcook/agent-skills/good-test-bad-test/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 good-test-bad-test

Your own site · 80×15
<a href="https://agentmods.dev/skills/zacharygcook/agent-skills/good-test-bad-test"><img src="https://agentmods.dev/badge/skills/zacharygcook/agent-skills/good-test-bad-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 467 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.00052 $0.00467
Opus 5 $0.00026 $0.00234
Sonnet 5 $0.00010 $0.00093
Haiku 4.5 $0.00005 $0.00047

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

Security

Grade A, and why

good-test-bad-test 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 11d 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.

skills/good-test-bad-test/SKILL.md · 58 lines

How it starts

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

Good Test, Bad Test

Optimize for production confidence and maintainability, not raw coverage.

Required Classification

Before adding a test:

  1. Name the behavior or branch.
  2. Name the real production workflow that reaches it.
  3. Classify the test as good, bad, or temporary proof/TDD.
  4. Choose whether to test, simplify production code, delete dead code, or temporarily prove a hypothesis.

Good Tests

Good tests protect behavior users or operators depend on:

  • public contracts, domain rules, and critical state transitions;
  • realistic external data and failure modes;
  • regressions for bugs likely to recur;
  • auth, data integrity, idempotency, retry, and concurrency invariants;
  • integration seams where a unit mock would conceal risk.

They should survive reasonable refactors because they assert outcomes rather than private choreography.

Bad Tests

Do not add tests whose main effect is to:

  • pin private helper calls, internal ordering, or incidental object shape;
  • exercise unreachable defensive branches;
  • preserve stale exports, obsolete commands, placeholder providers, or speculative abstractions;
  • mock so much that the behavior under test cannot fail realistically;
  • restate framework or library behavior;
  • inflate line or branch coverage without protecting an invariant.

If production cannot reach a branch, prefer deleting or simplifying it. If it is an intentional placeholder, keep it small and document why coverage is deferred.

Temporary Proof/TDD Tests

Temporary tests may recreate a bug, test a narrow hypothesis, or drive an unsettled implementation. Before handoff, either convert them into durable behavior tests or delete them. Keep one only when the user explicitly approves the maintenance cost and the reason is documented.

Coverage Triage

For each uncovered branch, ask in order:

  1. Can a real workflow reach it?
  2. Does it protect meaningful behavior?
  3. Can it be tested through a public boundary?
  4. Would deleting or simplifying the code be safer?

Read the full file on GitHub · 58 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. 11d ago First seen · 58 lines · 52 tokens per session scan A c7be7c4de962

Subscribe to this mod's changes

good-test-bad-test is a skill published in the GitHub repository zacharygcook/agent-skills (2 stars, last pushed 1mo ago), licensed MIT. It adds 52 tokens to every session and 467 once invoked, about $0.0003 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

build-test

Run the project's build / typecheck / lint / test commands and emit the build.passing + tests.passing signals devloop convergence reads.

nexu-io/open-design · 31 tokens

rudder

Use locally captured coding-session intent to resolve a device-local behavioral spec, generate focused tests from that spec, implement the smallest production changes through red-green TDD, and verify coverage with the repository's native tooling. Use when the user asks to run Rudder, create or regenerate tests for…

RudderCode/Rudder · 101 tokens

TDD 开发纪律助手

A development skill based on TDD, or test-driven development: write or update a test first, make it pass with the smallest code change, then improve the code and check for regressions.

cdavid817/vanehub-ai · 27 tokens

ship

Enforces Law 1 (Research Before Executing), Law 3 (One Thing at a Time), and Law 4 (Verify Before Reporting) of the 7 Laws of AI Agent Discipline. Fix one defect through TDD and one PR, isolate unrelated dirty checkouts in an owner-locked clean worktree, and return only eligible clean checkouts to the detected default…

naimkatiman/continuous-improvement · 105 tokens

debugging

Investigate failures whose root cause is still unknown — narrow the search space, instrument, and test falsifiable hypotheses. Use for intermittent or environment-dependent behavior, unexplained stack traces, regressions with no known trigger, or any symptom without a confirmed cause. Ends once the root cause is…

thixpin/pitway · 86 tokens

mutation-testing

Finds weak or missing tests by analyzing if code changes would be caught. Use when verifying test effectiveness, strengthening test suites, or validating TDD workflows.

saski/arnesto · 34 tokens