agentleFS
TheAstroByteTheAstroByte/astrobyte-agent-skills/skills/astrobyte-tdd/SKILL.md

astrobyte-tdd

Skill1 starsChanged 14 days agoMITView on GitHub

Use a pragmatic red-green-refactor loop for behavior changes and bug fixes when a trustworthy test seam is clear and affordable. Use when the user asks for TDD, a regression test, red-green-refactor, or implementation through tests.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 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.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write one test for the requested behavior.

    line 16
  2. Distinctive:

    Run it and observe the expected failure.

    line 17
  3. Distinctive:

    Run the focused test.

    line 25
  4. Distinctive:

    Run affected regression coverage after it passes.

    line 26

≈ “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

Astrobyte TDD

Choose the seam

Describe one observable behavior and choose the cheapest test that fails for the right reason.

Use TDD when the seam is deterministic and the loop is tight. For expensive training, hardware-specific runtimes, broad end-to-end systems, or unclear failures, first build a smaller reproduction, contract test, smoke check, or measurement harness. State why a red unit test is not trustworthy before using another proof.

Red

  1. Write one test for the requested behavior. Assert public behavior.
  2. Run it and observe the expected failure.
  3. Fix the test or seam if it fails for setup, syntax, or an unrelated cause.

Red is complete when the failure specifically demonstrates the missing behavior or bug.

Green

  1. Implement the smallest change that can satisfy the test.
  2. Run the focused test.
  3. Run affected regression coverage after it passes.

Green is complete when the new test and affected tests pass without skips or weakened assertions.

Refactor

Improve names, duplication, boundaries, and data shapes while keeping the loop green. Stop when the code is direct and the abstraction level matches existing needs.

For empirical ML quality, keep code tests separate from experiment acceptance. A green training test proves the pipeline works; evaluation data proves the model improved.

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.