Test quality

From edmundmiller/dotfiles · View interactive version

Test quality is an AI agent skill from the GitHub repository edmundmiller/dotfiles. Use when adding or editing test files, stubs, fakes or test doubles, writing failure-path, concurrency or subprocess tests, or before calling a suite green. Write, change, review, or remove automated tests with independent expectations and observable public behavior; reject tautological, vacuous, im

How to use this skill

Skill file

Test quality

Use this skill whenever automated tests are written, changed, reviewed, or

removed. Read the nearest CODING_STANDARDS.md first when one exists; its

project-specific standards apply.

Keep the test's contract independent from the implementation:

independently chosen oracle—not from the helper, fixture, constant, or code

path being tested.

output, or other externally visible result). Test structure only when that

structure is itself the contract.

prove a meaningful result at the system boundary; a mock returning exactly

what the test configured is not evidence.

Choose checks that can expose plausible mistakes:

it from the required behavior. For a bug fix, show the regression test fails

on the original code and passes with the fix when practical.

on the same inputs, especially both sides of behavioral boundaries. Resolve

disagreements against the contract; the reference can also be wrong.

sequences alongside invalid cases. Check meaningful invariants and confirm

the generator reaches the risky behavior, rather than mostly exercising input

rejection. Preserve minimized failures as regression cases.

Identify and correct weak coverage:

that configured input came back unchanged.

would pass when the behavior is broken.

internal representation instead of a documented contract.

independently verifiable behavior.

Replace weak tests with meaningful behavioral coverage using independent

inputs and expected outcomes. If the code has no unique contract worth

protecting, remove the test rather than preserving a coverage count.

Prefer existing libraries and small generators over custom testing frameworks.

Separate disposable investigation from permanent regression coverage; keep

tests that protect a meaningful contract, not every experiment used during

development.

Follow the repository's existing test command and any explicitly required

development workflow; this skill governs test quality, not the full development

process.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.