Test driven development
Skill bensonmaxai/minis-coding-success-skills/skills/test-driven-development
Coding-success skills for Minis on iOS: review risk, plan, isolate, trace, test, verify, optimize, finish, release, deploy, triage incidents, plan rollback, write postmortems, and use observability more effectively.
npx -y skills add bensonmaxai/minis-coding-success-skills --skill test-driven-developmentAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 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
Use when implementing a feature, fixing a bug, or refactoring code where correctness matters. Optimizes for higher coding success on Minis on iOS by requiring reproducibility first, identifying the test framework, writing the smallest failing test possible, making the minimum fix, rerunning targeted tests, and only then broadening validation. Useful for Python, JavaScript, web apps, scripts, and small tools.
SKILL.md
5.5 KB, as published. Nobody here has run it
Test-Driven Development
Use this skill when code changes should be driven by reproducible behavior rather than guesswork.
Goal
Increase implementation success rate by forcing this order:
- understand current behavior
- reproduce the problem or desired behavior
- write the smallest failing test
- make the smallest fix
- rerun the smallest relevant test set
- broaden validation only after the targeted test passes
Core Rules
1. Reproduce before changing code
Do not start by editing implementation unless the expected behavior is already clear.
First determine:
- what is broken or missing
- how to reproduce it
- what file/function/module is likely involved
- what test mechanism already exists
If no reproduction is possible yet, create one first.
2. Find the existing test entrypoint
Inspect the project and identify:
- test framework
- test command
- test file layout
- package manager or runner
- whether there are targeted test commands already available
Prefer the project’s existing testing conventions.
3. Start with the smallest failing test
Write or update the narrowest test that captures the bug or desired feature.
Prefer:
- one function-level test
- one regression test
- one route/component test
- one CLI invocation test
- one minimal repro script when no framework exists
Avoid starting with the whole suite unless the project is tiny.
4. Make the minimum implementation change
Fix only what the failing test requires first.
Avoid:
- unrelated cleanup
- broad refactors before the failing case passes
- changing multiple subsystems at once
- speculative fixes not backed by the repro
5. Validate in widening circles
After the smallest test passes, widen validation in this order:
- closest related tests
- relevant module/package tests
- full suite if feasible
- runtime/manual verification if needed
6. Keep evidence visible
When reporting progress, include:
- how the bug/feature was reproduced
- what failing test was added or updated
- what minimal change was made
- what tests were rerun and their outcomes
Minis-Specific Workflow
Shell-first for testing
Use shell commands to:
- inspect project structure
- find test files
- run targeted tests
- run linters or build steps when relevant
- create small repro scripts when no test framework exists
Browser for web verification
For web apps or HTML tools:
- use browser automation to confirm visible behavior
- pair browser verification with code-level tests when possible
- do not rely on visual inspection alone if a real automated test can be added
If there is no test framework
Create the smallest reproducible harness available, for example:
- a minimal Python script with assertions
- a minimal Node script
- a shell script that checks exit code/output
- a tiny HTML/JS repro page
If you must work without a formal test framework, still preserve the TDD order: reproduce -> capture expected behavior -> change code -> rerun repro
Bugfix Pattern
For bugs, follow this sequence:
- restate the bug clearly
- reproduce it
- locate the narrowest failing test surface
- write a regression test
- confirm the test fails for the right reason
- patch the implementation minimally
- rerun the regression test
- rerun nearby tests
- summarize root cause and fix
Feature Pattern
For features, follow this sequence:
- restate the expected behavior
- identify existing patterns in the codebase
- write a test that describes the new behavior
- confirm the test fails
- implement the smallest code needed
- rerun targeted tests
- broaden validation if needed
Refactor Pattern
For refactors:
- identify current behavior first
- ensure behavior is covered by tests
- add missing characterization tests if needed
- refactor in small steps
- rerun tests after each meaningful step
Heuristics
Prefer:
- failing test before fix
- narrow test before broad suite
- regression tests for bugs
- characterization tests before risky refactors
- one hypothesis at a time
- one patch that matches one failing behavior
Be cautious when:
- the bug is not yet reproducible
- multiple failures appear at once
- the codebase has no tests
- the app behavior depends on browser/UI state
- the project’s test command is slow or flaky
Completion Checklist
Before calling the task done, check:
- Is there a reproducible test or repro?
- Did it fail before the fix?
- Does it pass after the fix?
- Were nearby tests rerun?
- Was the fix kept minimal?
- Was any manual/browser verification also needed?
- Is the explanation tied to evidence, not guesswork?
Response Template
- Task type: bugfix / feature / refactor
- Reproduction:
- Smallest failing test:
- Minimal change:
- Validation run:
- Current status:
- Suggested next step:
Example Triggers
- "Implement this feature with TDD."
- "Fix this bug, but write a regression test first."
- "Before changing code, reproduce the issue and add the smallest failing test."
- "Refactor this safely with characterization tests first."
- "Help me raise the success rate of this coding task."
Gives 2 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 testin 302 of 439, across 218 files
- write a failing test firsthere, and in 176 of 439, across 112 files
- refactor code only after tests passin 171 of 439, across 101 files
- watch the test fail before writing codein 142 of 439, across 93 files
- test one behavior per testin 106 of 439, across 44 files
- refactor code while keeping tests greenin 99 of 439, across 86 files
- delete code written before testsin 98 of 439, across 54 files
- run tests after each refactor stepin 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 reasonhere, and in 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
- reproduce the problem before changing code
- broaden validation after the targeted test passes
- create a reproducible harness if no framework exists
- refactor in small steps
- keep evidence visible when reporting progress
- restate the task clearly before starting
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once.