agentleFS
davidoladejidavidoladeji/auto-agent/.claude/skills/build-with-tests/SKILL.md

build-with-tests

Skill0 starsChanged 5 months agoMITView on GitHub

The Auto-Agent build standard. Every builder follows it when writing or editing source. Short on purpose.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    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:

    Start from the brief + researcher findings + the repo's own CLAUDE.md (stack, conventions).

    line 9
  2. Distinctive:

    If similar code exists, read it and copy the pattern — matching what's there is the fastest path to consistency.

    line 10
  3. Distinctive:

    Every public function: one happy-path test + one failure-path test.

    line 14
  4. Very specific:

    Run the project's gate (the GATE_* commands from factory.config) and don't pass the ticket on until it's green.

    line 33

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

Build with tests — the Auto-Agent standard

1. Read before you write

Start from the brief + researcher findings + the repo's own CLAUDE.md (stack, conventions). If similar code exists, read it and copy the pattern — matching what's there is the fastest path to consistency.

2. Tests live next to code

Every public function: one happy-path test + one failure-path test. A refactor/perf change still needs a regression test that pins the behavior you must not change. The headless loop can't always run a UI — prove logic with unit/integration tests; that's how the gate verifies behavior.

3. Defend the boundaries

Validate inputs; derive the user/tenant from the session, never the request body. Treat persisted/external data as untrusted at the load boundary. Never expose raw exceptions.

4. Migrations are special

A schema change MUST ship with its generated migration file (e.g. prisma migrate dev, alembic revision) committed in the same PR — otherwise it won't reach prod via migrate deploy-style deploys. No destructive migration without a backfill.

5. Smallest correct diff

Touch only what the ticket needs. Reuse before adding. No new dependency unless the ticket needs it (note it in the PR). Follow the repo's icon/style/lint conventions.

6. Gate before you hand off

Run the project's gate (the GATE_* commands from factory.config) and don't pass the ticket on until it's green. End with the §F6 sign-off stating the gate result.

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.