Skip to content
Back to skills

Test Discipline

ASecurity

Design assertions that prove the actual contract and fail on realistic regressions

  • 802 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 6, 2026
ai-agentstestingapi

Works with

  • api

Security analysis

A100/100

Scanned October 6, 2026

npx -y skills add sbroenne/mcp-server-excel --skill test-discipline --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Test Discipline?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Test Discipline
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sbroenne-test-discipline/badge)](https://www.skillsdirectory.com/skills/sbroenne-test-discipline)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: test-discipline
description: Design assertions that prove the actual contract and fail on realistic regressions
domain: quality
confidence: high
source: current regression tests and retained quality incident lessons
---

## Context

Use this skill whenever a change affects an API, public interface, workflow contract, generated
artifact, or user-observable behavior. A passing status-only test is not evidence that the
intended artifact or contract is correct.

## Patterns

- Update tests in the same change as an API, signature, export, or public-interface change.
- Make assertions name and inspect the offending artifact, output, or configuration field—not just
  an exit code or broad success status.
- Mutation-test critical gates by changing the real source or emitted artifact and proving the
  assertion turns red.
- Exercise every caller path for a changed parser, normalizer, or helper; isolated unit coverage
  can miss the integration path that invokes it differently.
- Reproduce working-tree-only failures locally when the contract depends on index, filesystem,
  line-ending, or generated-output state.
- Keep expected inventory arrays synchronized with the files they enumerate.

## Examples

A workflow-compilation test mutates the source workflow, compiles it, and inspects the emitted
safe-output contract. A repair-script test constructs the actual index/blob/worktree state that
the repair routine must handle instead of a simplified fixture.

## Anti-Patterns

- Calling a test sufficient because it observes only a successful process exit
- Mutating a hand-built fixture instead of the source or artifact protected by the gate
- Testing a helper while omitting production callers
- Treating a local checkout defect as something CI alone can validate

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…