agentleFS
nuttakulsvnuttakulsv/think-like/skills/beck/SKILL.md

beck

Skill2 starsChanged 41 days agoMITView on GitHub

Kent Beck's test-driven, small-steps way of building: write a failing test, make it pass in the simplest way, then clean up; make it work, then make it right, then make it fast; tidy before you change. Use when implementing a feature or fixing a bug where behavior matters, when changes feel risky, or when the agent is about to write a large change in one go. Triggers: "think like Kent Beck", "TDD", "test first", "small steps", "tidy first", "red green refactor", "คิดแบบเคนต์ เบ็ก", "เขียนเทสต์ก่อน", "ทำทีละนิด".

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:

    Not affiliated with or endorsed by Kent Beck.

    line 22
  2. Distinctive:

    Red: write one failing test for it.

    line 33
  3. Distinctive:

    Tidy first: when the code is hard to change: make small structural changes (rename, extract, reorder) in a separate step before the …

    line 37
  4. Distinctive:

    Keep each diff small enough to review in a minute.

    line 45

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

Think like Kent Beck

Creator of Extreme Programming and test-driven development, co-author of the Agile Manifesto. His method trades big confident leaps for a rhythm of tiny, verified steps, so you always know the last thing that worked.

Not affiliated with or endorsed by Kent Beck. Built from his books and writing listed below.

When to use

  • Any change to behavior that users or other code depend on
  • A bug fix (write the test that reproduces it first)
  • The planned change is large, or the code is hard to change safely

Method

  1. List the behaviors you need as a short test list. Pick the simplest one.
  2. Red: write one failing test for it. Run it and see it fail for the right reason.
  3. Green: make it pass with the simplest code that could work, even if it's obviously temporary.
  4. Refactor: with tests green, remove duplication and make the intent clear. Apply the simple design rules in priority order: passes the tests, reveals intention, no duplication, fewest elements.
  5. Repeat with the next item on the list. Add new cases to the list as you discover them instead of chasing them immediately.
  6. Tidy first when the code is hard to change: make small structural changes (rename, extract, reorder) in a separate step before the behavior change, so each diff does one kind of thing.
  7. Order of concerns: make it work, make it right, then make it fast, and only if measurement says it is slow.

Output

  • Test list: the behaviors, with the current one marked
  • For each step: Red (test + failure message), Green (minimal change), Refactor (what was cleaned)
  • Tidyings: structural changes kept separate from behavior changes
  • Keep each diff small enough to review in a minute. Write in the user's language.

Anti-patterns

  • Writing all the tests up front, or all the code before any test
  • A test that never failed (it may not test anything)
  • Mixing a refactor and a behavior change in one commit
  • Optimizing before the behavior is correct and covered

Example (illustration)

User: Add VAT calculation to invoices: 7%, rounded to satang, some items exempt.

Test list: single item → exempt item → mixed cart → rounding at 0.005 → empty invoice.

Red: vatFor([{ price: 100 }]) expected 7, got undefined.

Green: return 7 (yes, really). Next test (price: 200 → 14) forces price * 0.07.

Refactor: move rate to a named constant; compute in satang integers to avoid float error found by the rounding test.

Tidyings: first commit renames calc() to lineTotal() with no behavior change; second commit adds VAT.

Sources

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.