agentleFS
boshu2boshu2/agentops/skills/test/SKILL.md

test

Skill447 starsChanged 5 months agoApache-2.0View on GitHub

Write behavioral tests, practice TDD or inspect important coverage gaps. Use when: test design or missing proof needs work; running an existing suite needs no skill.

98 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use develop, perf and 9 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.
  • bamechoSkill

    develop

    开发实施阶段详细规则;进入开发实施时读取;包含执行流程、代码规范、一致性审计、方案包迁移

    Also in 6 projects that use this

  • MicrosoftSkill

    perf

    Speed and memory performance rules for Rust crates, the Node addon, webui-framework, and webui-router.

    Also in 6 projects that use this

  • nicolasestremSkill

    document

    Create focused documentation for specific components or features

    Also in 8 projects that use this

  • BugRogerSkill

    project

    Project lifecycle management. Dispatches to Ada.

    Also in 6 projects that use this

  • vltingSkill

    scope

    Interactive planning + orchestration. Approval-gated workflow covering saga→epic→task hierarchy via progressive scoping.

    Also in 5 projects that use this

  • bitwize-music-studioSkill

    tutorial

    Provides interactive guided album creation for new users. Use when the user is new to the plugin or asks for a walkthrough of the album creation process.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 5 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 80 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write or strengthen tests for a named behavior.

    line 35
  2. Very specific:

    Default to generate; mode and scope are skill prompt choices, not invented CLI flags.

    line 49
  3. Distinctive:

    Use the repository's framework and real check recipe.

    line 58
  4. Distinctive:

    Prefer exact observable values or errors when known.

    line 67
  5. Very specific:

    Read the accepted examples and relevant public interface.

    line 93
  6. Distinctive:

    If the repository already uses scenario-to-test annotations, maintain them and use its scenario coverage checker.

    line 96
  7. Very specific:

    Use Domain's standards only if additional guidance would affect the test choice.

    line 100
  8. Very specific:

    Write the smallest test that observes the promised result through a stable interface.

    line 103
  9. Distinctive:

    Run the focused checks during editing, then the relevant integration recipe before handoff.

    line 107

“Common” is measured: kept by at least 6 in 10 of the 80 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

Test

Write or strengthen tests for a named behavior. Use existing tests directly when the task is only to run a known suite; this skill is not a required wrapper. A test is useful when it distinguishes an accepted outcome from a plausible failure, not merely when it executes the implementation.

Modes

ModeUse whenResult
generateExisting behavior needs testsUseful tests and focused/suite results
coverageThe caller asks to find or fill gapsBefore/after coverage, valuable tests and remaining risks
tddNew behavior is being developed test firstReal expected RED, implementation, green and refactor
strategyThe caller wants test design onlyPrioritized risks and proposed checks in the existing discussion

Default to generate; mode and scope are skill prompt choices, not invented CLI flags. Coverage thresholds come from the caller or repository.

Critical Constraints

  • Derive cases from accepted observable behavior. Reuse examples from the conversation, bead, specification or existing contract before inventing new ones.
  • Preserve established domain names in test names and fixtures. Different bounded contexts may use different terms; do not unify them by renaming tests.
  • Use the repository's framework and real check recipe. Keep tests isolated from accidental timing, ordering and mutable shared-state dependencies.
  • A test that starts green on existing correct behavior is legitimate. Never manufacture a RED claim or alter acceptance to excuse a product defect.
  • Repair a discovered defect when already authorized; otherwise report the reproducer and finding. Do not mask it by deleting or weakening a test.

Oracle-strength hierarchy

Prefer exact observable values or errors when known. Use properties or invariants when they express the contract more faithfully than one example. Differential agreement needs an independently credible reference. A smoke check proves only what it observes; it cannot establish an exact behavior by itself. Explain a material oracle limit in the native handoff, without creating a worksheet or mandatory report.

Mutation-kill proof

Establish that an important new behavioral check can catch the defect it claims to guard. An authentic pre-fix RED or reproduction is usually sufficient. If a regression test was written after the fix, run it against the pre-fix version or use a safe, targeted negative control in an isolated copy. Mutate only when that would resolve real doubt about the oracle, then restore and verify the candidate. Do not demand one mutation experiment per table row or new test.

Harness health floors

Confirm the runner completed, the intended tests actually ran, and assertions observe the promised behavior. Report crashes, truncation, unexpected skips or exclusions as gaps. When runner discovery or failure reporting changed, use a negative control through that same path before trusting green. No need to re-prove an unchanged healthy runner on each edit.

Workflow

  1. Read the accepted examples and relevant public interface. For a small change, one discriminating example may suffice; add consequential error/boundary cases where they could falsify acceptance. A .feature file is optional. If the repository already uses scenario-to-test annotations, maintain them and use its scenario coverage checker. Do not add a feature file just to satisfy this skill.
  2. Find the owning suite, applicable repository standards and a narrow baseline. Use Domain's standards only if additional guidance would affect the test choice. Measure broad coverage only for coverage mode or an existing repository requirement.
  3. Write the smallest test that observes the promised result through a stable interface. In tdd mode run it before implementation and require the expected missing-behavior failure, then implement and refactor under green. In other modes use evidence appropriate to existing versus newly fixed behavior.
  4. Run the focused checks during editing, then the relevant integration recipe before handoff. Broaden only for changed risk, a failure or repository policy; avoid replaying the full suite after every small edit.
  5. Return test changes, literal commands and results, discovered defects and material unchecked behavior. Compare against the original accepted examples. New tests added after implementation may supplement but never replace them.

Specialized references

Load only the guidance needed by the subject:

  • Public compatibility contracts: conformance-harnesses
  • Parsers and hostile inputs: fuzzing
  • Snapshots: golden artifacts and update strategy
  • Invariants: metamorphic testing
  • Service integration: real-service E2E

Output Specification

Tests belong in the repository's language-native locations. Check facts and limits belong in the existing handoff. Persist coverage or other reports only when requested or required by a declared consumer, at its selected destination; no automatic .agents/ output. Factual green is input to fresh validation, not the test author's binding PASS.

Example: for a duplicate Job delivery, assert that the completed result is returned and the external side effect is called only once. Run the focused case and owning suite. A coverage increase without those assertions would not prove the behavior.

This guidance uses original examples informed by Matt Pocock's engineering skills, with AgentOps' existing acceptance and evidence boundaries.

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.