agentleFS
Tianea2160Tianea2160/claude-skills/skills/feature-test/SKILL.md

feature-test

Skill1 starsChanged 7 months agoMITView on GitHub

Test authoring phase of a feature workflow. Derives scenarios from an approved Plan, writes tests per file via delegated agents, runs them, and self-heals implementation up to 2 retries. Usage: /feature-test <plan-path>

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. telefrek/vallorcine★ 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 repository6 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the project's existing test framework.

    line 19
  2. Very specific:

    Every delegated agent prompt ends with the fixed return schema (see feature-research/references/plan-schema.md § Agent Return Schema).

    line 20
  3. Very specific:

    Read the frontmatter. If status.work is pending, ask whether to (a) abort, (b) continue anyway, or (c) run /feature-work first.

    line 35
  4. Very specific:

    Test command (from package.json scripts, Makefile, build.gradle, pyproject.toml, CLAUDE.md).

    line 40
  5. Very specific:

    Test file location convention (colocated *.test.ts, sibling tests/, __tests__/, test/<mirror>).

    line 41
  6. Distinctive:

    If detection is ambiguous, ask via AskUserQuestion to choose among detected candidates.

    line 44
  7. Distinctive:

    Run the full test command once.

    line 64
  8. Distinctive:

    Do not create new test frameworks or alternative runners.

    line 104
  9. Very specific:

    Do not touch Plan sections other than ## Test Scenarios and status.test.

    line 105

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

feature-test

Third stage of the 4-skill feature workflow. Consumes the Plan (now with status.work: done) and produces the test suite for the implemented feature.

$ARGUMENTS must be the path to the Plan file.

Language note: This skill is authored in English per .claude/rules/skill-authoring.md. User-facing output follows the project's CLAUDE.md language preference.

Invariants

  • Pass the Plan by path to agents; never inline its body into prompts.
  • Run the project's existing test framework; do not introduce a new one without AskUserQuestion.
  • Every delegated agent prompt ends with the fixed return schema (see feature-research/references/plan-schema.md § Agent Return Schema).
  • Self-healing loop: on test failure the owning agent attempts a fix and re-reports status: ok. Maximum two retries per scenario; on the third failure, surface to the user.

References

  • references/test-patterns.md — How to detect the project's test framework, convention, and command.
  • ../feature-research/references/plan-schema.md — Plan contract and agent return schema.

Workflow

1. Resolve the Plan

  1. Take the Plan path from $ARGUMENTS. If empty, prompt via AskUserQuestion (same resolution as feature-work).
  2. Read the frontmatter. If status.work is pending, ask whether to (a) abort, (b) continue anyway, or (c) run /feature-work first.

2. Detect the test framework

Consult references/test-patterns.md to determine:

  • Test command (from package.json scripts, Makefile, build.gradle, pyproject.toml, CLAUDE.md).
  • Test file location convention (colocated *.test.ts, sibling tests/, __tests__/, test/<mirror>).
  • Assertion style and helpers in use.

If detection is ambiguous, ask via AskUserQuestion to choose among detected candidates.

3. Derive test scenarios (delegated)

Dispatch one Explore agent (read-only scenario derivation) to read the Plan's ## Goal, ## Change Plan, ## Reuse, and ## External Notes, then return a list of scenarios. Each scenario: title, target path:line, inputs, expected outcome. Prompt ends with the fixed return schema.

4. Persist scenarios to the Plan

Open the Plan file and append the returned scenarios to the ## Test Scenarios section. Do not rewrite other sections.

5. Write tests (delegated, per file)

For each test file to be created (grouped by target module):

  1. Dispatch the implementer agent (subagent_type: implementer) with: the Plan path, the scenarios for this module, the target file conventions, and the fixed return schema.
  2. The agent writes the test file and returns only the created path plus a one-line summary.

Parallelization: test files for different modules may be dispatched in one Agent block as parallel implementer instances; collate the returns before proceeding.

6. Run tests and self-heal

  1. Run the full test command once.
  2. For each failing test: dispatch implementer with the failure output and ask it to fix either the test or the implementation and re-report. The agent retries up to 2 times internally, then surfaces status: blocked.
  3. On blocked status, stop self-healing and ask the user via AskUserQuestion how to proceed.

7. Update Plan status

Set status.test: done in the Plan's frontmatter. Do not modify other fields.

8. Mini-report (outline style)

Emit a final outline-form report as model text, in the project's preferred language. Labels below are reference-only.

──────────────────────────────────────────
  ✓ feature-test done   **<slug>**
──────────────────────────────────────────

**▸ Summary**
  - **Scenarios added** — **<n>**
  - **Test files created** — **<k>**
  - **Self-heals applied** — **<m>**

**▸ Artifacts**
  - `<test-path>` — **<covers>**
  - …

**▸ Metrics**
  - Tests **<pass/total>**
  - Framework — `<vitest|pytest|go test|...>`

**▸ Next steps**
  - **Run `/feature-review <plan-path>`** to validate
──────────────────────────────────────────

Outline rules: no complete sentences; bold nouns/identifiers/numerics/status; symbols only from ✓ ⚠ ✗ ▸; never emit via Bash.

Constraints

  • SKILL.md body length ≤ 200 lines.
  • Do not create new test frameworks or alternative runners.
  • Do not touch Plan sections other than ## Test Scenarios and status.test.
  • Two-retry ceiling on self-healing; beyond that, the user decides.

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.