agentsclimarketplace

Tdd

Skill arndvs/ctrlshft/skills/tdd

The system your AI agents are missing — synced instructions, workflow skills, hardened secrets, and autonomous loops across every machine.

Install
npx -y skills add arndvs/ctrlshft --skill tdd

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Red-green refactor workflow for test-driven development. Use when asked to 'write tests first', 'TDD', 'red-green refactor', 'test-driven', or 'failing test first'. Backend-only — do not use for frontend components.

SKILL.md

2.2 KB, as published. Nobody here has run it

TDD (Red-Green Refactor)

If running interactively (human present), output "Read TDD skill." to acknowledge. If running with --dangerously-skip-permissions (AFK/unattended), skip acknowledgement and proceed directly.

Scope

Backend code only — API routes, services, utilities, data transformations. Frontend components change too fluidly for TDD. If the task involves UI, use /do-work instead.

Workflow

For each vertical slice, repeat this cycle:

1. Red — Write a failing test

Write ONE test that describes the expected behavior. Run it. It MUST fail. If it passes, the test is not testing anything new — rewrite it.

2. Green — Write minimum code to pass

Implement the minimum code required to make the test pass. No more. Run the test. It MUST pass.

3. Refactor — Clean up while green

Improve the implementation without changing behavior. Run the test after every change — it must stay green. Extract helpers, rename variables, simplify logic.

4. Commit

Once the test is green and the code is clean, commit. One test + its implementation = one commit.

Rules

  • ONE test at a time. Do not write a test suite upfront — that's horizontal coding.
  • Run the test after EVERY step (red, green, refactor). Never skip a run.
  • If combining with tracer bullets: one test per vertical slice, one slice at a time.
  • Auto-detect the test runner from the workspace (package.json scripts, pytest, phpunit, etc.).
  • If no test runner exists, tell the user and ask how to run tests.

Strictness

  • Source after red — always. For behavior with a clear contract, the failing test comes FIRST. Writing the source fix first and adding a test afterward is regression coverage, not TDD — do not relabel it as TDD.
  • Spike exception (the only one): if you genuinely need to explore before you can describe the contract, declare the spike up front, keep the scratch work isolated, discard it, then TDD the real implementation from red. An undeclared spike is just skipping TDD.

Gives 4 of the 12 instructions most tdd skills give

Counted across 439 of the 443 authors here whose files we hold, read 2026-08-06

  • write minimal code to pass the testhere, and in 302 of 439, across 218 files
  • write a failing test firstin 176 of 439, across 112 files
  • refactor code only after tests passin 171 of 439, across 101 files
  • watch the test fail before writing codehere, and in 142 of 439, across 93 files
  • test one behavior per testin 106 of 439, across 44 files
  • refactor code while keeping tests greenhere, and in 99 of 439, across 86 files
  • delete code written before testsin 98 of 439, across 54 files
  • run tests after each refactor stephere, and in 85 of 439, across 54 files
  • Use real code instead of mocks unless unavoidablein 64 of 439, across 21 files
  • confirm the test fails for the right reasonin 64 of 439, across 60 files
  • reproduce bugs with a test before fixingin 53 of 439, across 36 files
  • write tests before implementationin 48 of 439, across 39 files

Said here and by no other author read

  • detect the test runner from the workspace
  • ask the user how to run tests if no runner exists
  • declare any exploratory spike before doing it

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.