agentleFS
aixisstudioaixisstudio/claude-skills/skills/test-writer/SKILL.md

test-writer

Skill2 starsChanged 4 days agoMITView on GitHub

Designs and writes focused unit tests for a function or module. Use when asked to add tests, raise coverage, or after fixing a bug that needs a regression test.

37 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use debug-fix, changelog-writer 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.
  • zebbernSkill

    debug-fix

    Find and fix a bug or issue — from any source (GitHub issue, error message, user report, or observed behavior)

    Also in 4 projects that use this

  • zbruhnkeSkill

    changelog-writer

    Maintain CHANGELOG.md with properly categorized entries. Use after implementing features, fixing bugs, or making any notable changes. Follows Keep a Changelog format.

    Also in 5 projects that use this

  • chmouelSkill

    commit-helper

    Generate conventional commit from staged changes

    Also in 3 projects that use this

  • glinckerSkill

    readme-generator

    Generates comprehensive README.md files for software projects by analyzing codebase structure

    Also in 4 projects that use this

  • IdkwhatImD0ingSkill

    readme-writer

    Write a winner-grade README for a hackathon project: a centered hero with shields.io badges, a clickable demo-video poster, awards and stats tables, a Mermaid architecture diagram, a tech-stack table, a repo map, team cards, and an honest build-context note, then set the repo's About metadata (description, website, and topics) to match. Use this skill whenever the user wants a README, GitHub landing page, project writeup, repo polish, or repo description and tags for a hackathon submission or portfolio piece.

    Also in 4 projects that use this

  • nimbalystSkill

    prd-writer

    Create structured Product Requirements Documents (PRDs) with prioritized requirements. Use when writing product specs, feature requirements, or project briefs.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 7 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 34 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the code under test and the existing tests to match framework, naming and fixtures.

    line 9
  2. Very specific:

    Write small tests, one behavior each, named for the behavior (test_rejects_negative_amount).

    line 11
  3. Distinctive:

    Run the tests. A test you did not run is not done.

    line 12
  4. Distinctive:

    No logic in tests (no loops that compute the expected value the same way the code does).

    line 16
  5. Distinctive:

    Prefer real objects and in-memory fakes.

    line 17
  6. Distinctive:

    Do not test private implementation details.

    line 18
  7. Distinctive:

    If a test is hard to write, report that the code is hard to test and suggest the smallest refactor.

    line 20
  8. Distinctive:

    Verify a new test can FAIL: temporarily break the code or reason explicitly why it would.

    line 21

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

Procedure

  1. Read the code under test and the existing tests to match framework, naming and fixtures.
  2. List behaviors to verify before writing anything: happy path, boundaries, invalid input, error paths, and one regression case for any bug being fixed.
  3. Write small tests, one behavior each, named for the behavior (test_rejects_negative_amount).
  4. Run the tests. A test you did not run is not done.

Rules

  • Arrange / Act / Assert, visibly separated.
  • No logic in tests (no loops that compute the expected value the same way the code does).
  • Prefer real objects and in-memory fakes; mock only true external boundaries (network, clock, filesystem).
  • Do not test private implementation details; test observable behavior.
  • Make tests deterministic: fixed time, seeded randomness, no network.
  • If a test is hard to write, report that the code is hard to test and suggest the smallest refactor.
  • Verify a new test can FAIL: temporarily break the code or reason explicitly why it would.

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.