agentleFS
tmussertmusser/ai-engineering-skills/skills/test-mini/SKILL.md

test-mini

Skill6 starsChanged 3 months agoMITView on GitHub

Add focused deterministic tests, fixtures, or smoke checks.

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. About 0 are common, 16 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈16

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use for ML model workflows, agents, dashboards, data transformations, metric calculations, scheduled jobs, and any behavior that can appear …

    line 14
  2. Distinctive:

    Add one deterministic behavior test when possible.

    line 26
  3. Distinctive:

    Add one fixture or golden example when useful.

    line 27
  4. Distinctive:

    Add one smoke test or manual verification path.

    line 28
  5. Very specific:

    If SPEC marks Test sensitivity requirement: REQUIRED, run the targeted fault-injection pass described below.

    line 30
  6. Distinctive:

    Keep tests focused on the changed behavior.

    line 32
  7. Distinctive:

    Use this only when SPEC explicitly requires it.

    line 36
  8. Very specific:

    Start from the declared Test command and Fault model.

    line 42
  9. Distinctive:

    Prefer a disposable worktree, scratch copy, or exact reversible local edit.

    line 44
  10. Distinctive:

    Do not inject faults into production, shared external state, or irreversible data.

    line 45
  11. Distinctive:

    Run the exact declared targeted test command.

    line 47
  12. Distinctive:

    Do not broaden this into a mutation-testing campaign unless the user explicitly asks for one.

    line 62
  13. Distinctive:

    Prefer adding tests over changing existing tests.

    line 67
  14. Distinctive:

    If modifying existing tests:

    line 69
  15. Distinctive:

    Never weaken tests merely to match the implementation.

    line 77
  16. Distinctive:

    Test-sensitivity evidence when SPEC requires it

    line 85
  17. Distinctive:

    No deterministic check is possible without changing the design.

    line 90
  18. Distinctive:

    Only checking that the code runs without checking correctness.

    line 94

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Test Mini

Purpose

Protect against wrong behavior without heavy tests.

When to use

Use for ML model workflows, agents, dashboards, data transformations, metric calculations, scheduled jobs, and any behavior that can appear to run while being wrong.

Inputs

  • Implemented slice
  • Expected behavior
  • Available fixtures or examples
  • Build/test/run commands
  • Optional SPEC test-sensitivity contract

Workflow

  1. Add one deterministic behavior test when possible.
  2. Add one fixture or golden example when useful.
  3. Add one smoke test or manual verification path.
  4. Run exact commands.
  5. If SPEC marks Test sensitivity requirement: REQUIRED, run the targeted fault-injection pass described below.
  6. Record command output and result.
  7. Keep tests focused on the changed behavior.

Test sensitivity pass

Use this only when SPEC explicitly requires it. The point is to prove a targeted test is sensitive to the behavior it claims to protect, not to maximize mutation coverage.

For each declared Sensitivity ID:

  1. Start from the declared Test command and Fault model.
  2. Inject one narrow fault that should violate the protected behavior.
  3. Prefer a disposable worktree, scratch copy, or exact reversible local edit. Do not inject faults into production, shared external state, or irreversible data.
  4. Run the exact declared targeted test command.
  5. Count the fault as killed only when:
    • the command exits nonzero;
    • the failure is the expected protected-behavior assertion or signal, not a syntax/import/setup crash;
    • concise failure evidence is recorded.
  6. Restore the implementation exactly.
  7. Rerun the same targeted test command and require exit code 0.
  8. Record the fault, mutated exit code, Expected failure observed: yes/no, concise failure evidence, restored exit code, and restoration evidence in VERIFY.md.

A surviving fault is REVIEW_REQUIRED: the test may be too weak, the fault model may be poor, or the protected behavior may not be exercised. It is not automatically a functional failure in the implementation.

Do not broaden this into a mutation-testing campaign unless the user explicitly asks for one.

Test integrity

Prefer adding tests over changing existing tests.

If modifying existing tests:

  1. Record the changed test path.
  2. State why the old assertion was wrong or incomplete.
  3. Name the source of truth.
  4. Preserve the prior assertion or replace it intentionally.
  5. Mark verification as REVIEW_REQUIRED unless the rationale is explicit.

Never weaken tests merely to match the implementation.

Outputs

  • Focused test or fixture
  • Smoke path
  • Exact command results
  • Remaining risk notes
  • Test-sensitivity evidence when SPEC requires it

Stop conditions

  • The behavior is proven enough for the task risk.
  • No deterministic check is possible without changing the design.

Anti-patterns

  • Only checking that the code runs without checking correctness.
  • Adding broad tests unrelated to the changed behavior.
  • Hiding manual verification steps in chat.
  • Counting any nonzero mutated test run as proof even when it failed for the wrong reason.
  • Leaving an injected fault in the working tree after the sensitivity pass.
  • Running fault injection against production or shared external state.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.