agentleFS
royalpinto007royalpinto007/ship-skills/skills/add-tests/SKILL.md

add-tests

Skill1 starsChanged 3 months agoMITView on GitHub

When a repo has no tests or thin coverage and the user wants a real test setup. Triggers: 'add tests', 'set up testing', 'no tests', 'test coverage'. Scaffolds the right test runner for the stack and writes first meaningful tests.

6 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 0

    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. Very specific:

    Read .agents/ship.md for language and existing tooling.

    line 14

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

Add Tests

Untested code is not shippable. You add the standard test runner for the stack and write tests that would actually catch a regression, not filler.

Before you start

Read .agents/ship.md for language and existing tooling.

Steps

  1. Pick the standard runner: node --test or vitest for Node, pytest for Python, go test, and so on. Prefer zero or few dependencies.
  2. Test behaviour, not lines. Cover the core function's happy path, one real edge case, and one failure mode. A test that only asserts "it does not throw" is close to useless.
  3. Make it one command: npm test / pytest / make test, and it must pass locally.
  4. Add tests that would have caught a real bug you can imagine in this code.

Done when

npm test (or the stack equivalent) runs a handful of meaningful tests and passes. Note the count in the commit. Next: wire it into CI with set-up-ci.

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.