Index of every page on this site: llms.txt
All skills
sylphai-inc avatar

/simple-tdd

@9010d9a
by AdaLsylphai-inc/atskills87 stars
6
Run it yourself

Test-driven development methodology — write the failing test first, then the minimum code to pass it

  • 1 file
  • 2.1 KB
  • Updated 4 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/sylphai-inc/atskills/simple-tdd

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈29 tokens for metadata: the name and description. ≈497 when used: this file.

Description uses 1.4% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈113 characters, or 1.4%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Simple TDD Workflow

Follow test-driven development strictly for the task at hand. Do not write implementation code before a failing test exists for it.

Steps

  1. Understand the requirement. Restate what behavior is being added or fixed, in one or two sentences, before touching any file.

  2. Write a failing test first.

    • Add a test that exercises the new/changed behavior.
    • Run the test suite and confirm the new test fails (and fails for the expected reason — a wrong assertion or a crash from unimplemented code, not an unrelated error).
    • If it doesn't fail, the test isn't testing anything new — fix the test before proceeding.
  3. Write the minimum code to make it pass.

    • Implement just enough to make the failing test green. Resist the urge to add extra functionality, generalization, or "while I'm here" cleanup at this stage.
    • Run the full test suite. All tests — the new one and every existing one — must pass.
  4. Refactor only when green.

    • With all tests passing, look for duplication, unclear naming, or structural issues introduced by the minimal implementation.
    • Refactor in small steps, re-running the test suite after each change to confirm nothing broke.
    • Do not add new behavior during this step — refactoring changes structure, not behavior.
  5. Repeat. For the next requirement or edge case, go back to step 2.

Rules

  • Never write production code without a failing test that requires it.
  • Never write more test code than is sufficient to fail.
  • Never write more production code than is sufficient to pass the currently failing test.
  • If you find yourself writing several tests before making any of them pass, stop — return to one test at a time.

When to Deviate

For pure exploration/spike work (throwaway prototyping to understand a problem), it's acceptable to skip strict TDD — but say so explicitly, and any code from the spike should be rewritten test-first before it ships.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 9010d9a. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 4 months ago
author
sylphai-inc
version
1.0.0
tags
[
  "testing",
  "methodology"
]

README badge

README badge for sylphai-inc/atskills/simple-tdd