Skip to content

testing-changes

Use when deciding what tests a change needs - a feature, a bug fix, a refactor, any behavior change - or when reviewing whether a diff's tests are sufficient.

— (0 ratings) 29.1K downloads riekelt
$ npx skills add https://github.com/riekelt/principal-engineer --skill testing-changes

Skills can run code on your computer. Review the source before installing. This listing is community-made and isn't affiliated with Anthropic.

About this skill

Testing changes

REQUIRED BACKGROUND: the principal-engineering skill. Test craft lives in writing-unit-tests; this skill governs which tests a change owes.

Overview

A test is the executable form of a claim about behavior. A change that alters behavior without touching tests is a claim nobody wrote down. Two failure modes follow: the green suite over code that could not work, and the test or gate that never ran.

Tests a change owes

  1. Tests change with behavior, in the same change. An empty test diff on a behavior change is a review finding, not a style preference. A pure refactor owes the opposite proof: the existing tests still pass unmodified, which is what makes it a refactor.
  2. A bug fix ships its regression test. Named after the failure mode, not the ticket. The author shows both halves: red against the unfixed code, green against the fix. A regression test that never went red proves only that it compiles.
  3. Scenarios are concrete and include the surfaced edges. The edge cases that grounding and review turned up go into tests by name; the happy path alone tests the demo, not the change. When the change's risk is in the failure path, the failure path gets the tests (see handling-failures: it requires a logged, typed failure, and that surfacing is behavior a test owes).
  4. Every task carries its targeted verify command. The task names the verify command that proves this change, runnable alone and stated where the reviewer can run it. "The suite passed" vouches for nothing the suite never covered.
  5. Assertions must discriminate. A test that passes regardless of the change proves nothing. Break the code once, confirm the test goes red, then restore it. Non-discriminating assertions are how suites stay green over broken behavior.
  6. Aggregates that must reconcile get invariant tests. Anything on the project's declared critical paths (see the risk tiers in principal-engineering) that sums, derives, or mirrors other data gets more than point examples: the test asserts the reconciliation itself (the conservation pattern), the aggregate equals what the raw records imply.

The red-test rule


Installs: 29.1K | GitHub stars: 6 | First seen: Aug 21, 2026

Related skills

New

Coding & dev tools

hyperframes-cli

CLI toolkit for scaffolding, validating, previewing, and rendering HyperFrames video compositions.

New • 1.8M
New

Testing

grill-me

Relentless interviewing skill that stress-tests plans and designs through systematic questioning.

New • 1.6M
New

Testing

grill-with-docs

Relentless design interrogation that stress-tests plans against your domain model and sharpens terminology inline.

New • 1.4M