agentleFS
shinprshinpr/agentic-code/.agents/skills/testing/SKILL.md

testing

Skill49 starsChanged 3 months agoMITView on GitHub

Applies repository-aware TDD, observable test design, and applicable quality checks. Use when changing behavior, writing tests, or reviewing test quality.

123 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use oss-pr, pr-automation and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • CES-LtdSkill

    oss-pr

    Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.

    Also in 3 projects that use this

  • CES-LtdSkill

    pr-automation

    PR Automation Orchestrator: poll open PRs, check CI, run review, fix, and merge eligible PRs. Use when: (1) Invoked by daemon via scripts/pr-automation.sh, (2) User says "/pr-automation".

    Also in 3 projects that use this

  • ffsshhttiikkSkill

    cicd

    Continuous integration and delivery pipelines

    Also in 4 projects that use this

  • ffsshhttiikkSkill

    networking

    Practical application and coding skills for Networking

    Also in 3 projects that use this

  • JohnJBorenSkill

    ci-cd

    CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies

    Also in 9 projects that use this

  • Cogni-AI-OUSkill

    dotfiles

    Reference for repository dotfiles, including their purposes, standard configurations, and usage guidelines. You MUST load this skill when configuring, troubleshooting, or understanding repository dotfiles.

    Also in 3 projects that use this

  • +2 more from CES-Ltd
  • +1 more from ffsshhttiikk

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 105 edited versions we read keep these.

  • 11

    Distinctive

    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:

    Read a language reference only when the repository uses that language and the reference affects the current test or check:

    line 10
  2. Distinctive:

    Use RED → GREEN → REFACTOR when a behavior change can be represented by a focused failing test.

    line 18
  3. Distinctive:

    Write or select a test that observes the required behavior.

    line 22
  4. Distinctive:

    Run it and confirm the current implementation does not satisfy the new expectation.

    line 23
  5. Distinctive:

    If the test already passes, inspect whether the outcome is already satisfied, the test observes the wrong boundary, or implementation work …

    line 24
  6. Distinctive:

    Run the focused proof and the repository's applicable established checks.

    line 36
  7. Distinctive:

    Keep internal implementation details outside tests unless they are themselves an accepted contract.

    line 49
  8. Distinctive:

    Use clear setup, action, and observable expectation.

    line 59
  9. Distinctive:

    Keep test data minimal and free of secrets.

    line 60
  10. Distinctive:

    Prefer deterministic behavior and independent state.

    line 61
  11. Distinctive:

    When a repository lacks a relevant check, report the verification gap.

    line 75

“Common” is measured: kept by at least 6 in 10 of the 105 edited versions of this file we could read. “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

Testing Rules

Language-Specific References

Read a language reference only when the repository uses that language and the reference affects the current test or check:

  • TypeScript/Vitest: references/typescript.md

Repository commands and established conventions take precedence over generic examples.

TDD Process

Use RED → GREEN → REFACTOR when a behavior change can be represented by a focused failing test.

RED

  1. Write or select a test that observes the required behavior.
  2. Run it and confirm the current implementation does not satisfy the new expectation.
  3. If the test already passes, inspect whether the outcome is already satisfied, the test observes the wrong boundary, or implementation work is still required elsewhere.

GREEN

Implement the smallest change that makes the focused proof pass while preserving current contracts and non-goals.

REFACTOR

Improve structure only where the current change supplies evidence that refactoring is needed. Keep the focused proof passing.

VERIFY

Run the focused proof and the repository's applicable established checks. Fix in-scope regressions before completion.

TDD is not required for documentation-only changes, pure configuration without executable behavior, disposable spikes, or a no-change conclusion. Add a test after an emergency fix when the test protects the reproduced failure from recurrence.

Test Boundary

Test observable behavior:

  • public or shared contracts;
  • outputs, errors, and persisted effects;
  • required external calls or side effects;
  • named interactions across components or processes.

Keep internal implementation details outside tests unless they are themselves an accepted contract.

Choose the narrowest sufficient level:

  • unit or local check for isolated behavior;
  • integration for a named interaction boundary;
  • E2E for a complete journey required by the acceptance criterion.

Test Design

  • Use clear setup, action, and observable expectation.
  • Keep test data minimal and free of secrets.
  • Prefer deterministic behavior and independent state.
  • Mock external I/O at unit boundaries; use real internal collaborators when their interaction is the behavior under test.
  • Reuse or extend existing representative coverage before adding another lane.

Failure Resolution

  • Fix the test when it asserts an invalid requirement, depends on implementation details, or no longer observes its stated behavior.
  • Fix the implementation when the test represents a current requirement or preserved contract.
  • Return to the user only when resolution requires a new requirement or a changed approved boundary.

Applicable Quality Checks

Discover checks from repository scripts, CI configuration, language tooling, and contributor documentation. Run checks affected by the change, plus broader required checks before final completion.

When a repository lacks a relevant check, report the verification gap. Add new tooling only when the approved outcome or a demonstrated recurring failure justifies its cost.

Completion Check

  • Focused proof observes the intended behavior.
  • Applicable established checks pass.
  • Unavailable verification and residual risk are reported.

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.