agentleFS
furkananterfurkananter/skills/test-guard/SKILL.md

test-guard

Skill1 starsChanged 4 months agoMITView on GitHub

Automatic test and coverage guardrail for code changes. Use whenever implementation, bug fixes, refactors, API changes, code deletion, or other changes affect executable or observable behavior. Ensure changed behavior is meaningfully tested, existing test patterns are followed, coverage stays at or above 80%, and verification status is reported honestly before completion.

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. amElnagdy/guard-skills★ 1.3ksame name
    2. Abdox-menara/guard-skills★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repositoryOne other file it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 15 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈15

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not complete a code-changing task without considering tests and coverage.

    line 12
  2. Distinctive:

    Do not wait for the user to mention tests or coverage.

    line 27
  3. Distinctive:

    Do existing tests cover it?

    line 36
  4. Distinctive:

    If a meaningful test is required, add it.

    line 41
  5. Distinctive:

    follow existing repository patterns,

    line 50
  6. Distinctive:

    add meaningless tests only to increase coverage,

    line 55
  7. Distinctive:

    test implementation details without behavioral value,

    line 57
  8. Distinctive:

    Do not consider the task complete if coverage drops below 80%.

    line 64
  9. Distinctive:

    Use the repository's existing coverage tooling and calculation as the source of truth.

    line 66
  10. Distinctive:

    Do not lower, bypass, or game coverage thresholds.

    line 67
  11. Distinctive:

    Do not chase coverage numbers with low-value tests.

    line 68
  12. Distinctive:

    Add new tests only when touched behavior is insufficiently protected or a concrete regression risk is uncovered.

    line 74
  13. Distinctive:

    Run the narrowest relevant verification allowed by repository and user instructions.

    line 78
  14. Distinctive:

    If the agent must not run tests or coverage:

    line 80
  15. Distinctive:

    do not claim verification ran,

    line 83

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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 Guard

Do not complete a code-changing task without considering tests and coverage.

Trigger

Apply automatically whenever executable or observable behavior changes.

This includes:

  • features,
  • bug fixes,
  • refactors,
  • API changes,
  • code deletion,
  • behavior-preserving rewrites.

Do not wait for the user to mention tests or coverage.

Skip only changes that cannot affect behavior, such as documentation, comments, or formatting.

Core rule

Before completion, determine:

  1. What behavior changed or could regress?
  2. Do existing tests cover it?
  3. Are new or updated tests required?
  4. Is coverage still at or above 80%?
  5. What verification actually ran?

If a meaningful test is required, add it.

Test discipline

Prefer tests that:

  • verify observable behavior,
  • protect the changed or fixed behavior,
  • cover relevant branches and failure paths,
  • follow existing repository patterns,
  • survive harmless implementation refactors.

Do not:

  • add meaningless tests only to increase coverage,
  • duplicate existing tests without reason,
  • test implementation details without behavioral value,
  • introduce a new testing framework or dependency unless required.

Coverage

Maintain test coverage at or above 80% for code changes.

  • Do not consider the task complete if coverage drops below 80%.
  • Preserve or improve coverage when it is already above 80%.
  • Use the repository's existing coverage tooling and calculation as the source of truth.
  • Do not lower, bypass, or game coverage thresholds.
  • Do not chase coverage numbers with low-value tests.

Refactors

For behavior-preserving refactors, existing tests may be sufficient.

Add new tests only when touched behavior is insufficiently protected or a concrete regression risk is uncovered.

Verification

Run the narrowest relevant verification allowed by repository and user instructions.

If the agent must not run tests or coverage:

  • still add or update required tests,
  • do not claim verification ran,
  • provide the exact command the user should run.

Completion

A code-changing task is complete only when:

  • changed behavior is meaningfully covered, or there is a concrete reason no test is needed,
  • coverage is at or above 80%,
  • unrelated test work was not added,
  • verification status is stated honestly.

Compilation alone is not sufficient verification.

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.