develop-test-first
Skill0 starsChanged 4 months agoMITView on GitHub
Implements a known behavior change through a focused failing test, the smallest passing production change, and a verified refactor. Use when the user requests test-driven development, a known-cause regression-first bug fix, or new testable domain logic; do not use for unknown-cause diagnosis, behavior-preserving legacy characterization or refactoring, documentation-only work, generated artifacts, exploratory spikes, or UI polish whose value cannot be expressed as stable behavior.
In this repository72 other files it gives its agents.
- AGENTS.mdAGENTS.md
- templates/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- agents-md-initSkill
- analytical-frameworksSkill
- appkit-accessibility-auditorSkill
- assess-security-controlsSkill
- audit-accessibilitySkill
- automated-security-reviewSkill
- changelogSkill
- check-ai-onboard-updatesSkill
- agents-sdkSkill
- cloudflare-email-serviceSkill
- cloudflare-oneSkill
- durable-objectsSkill
- sandbox-sdkSkill
- turnstile-spinSkill
- workers-best-practicesSkill
- wranglerSkill
- cobra-commandSkill
- competitive-intelSkill
- component-scaffoldSkill
- conduct-open-source-investigationSkill
- conduct-user-researchSkill
- conventional-commitSkill
- coordinate-data-viewsSkill
- core-data-expertSkill
- data-storytellingSkill
- datavizSkill
- debug-systematicallySkill
- define-brand-foundationSkill
- dependency-vuln-scanSkill
- design-and-build-websiteSkill
- design-product-contentSkill
- design-product-interfaceSkill
- develop-apple-platform-appSkill
- evolve-design-systemSkill
- gh-issueSkill
- gh-prSkill
- gh-releaseSkill
- identity-managementSkill
- input-sanitizationSkill
- manage-vulnerability-riskSkill
- map-attack-surfaceSkill
- market-researchSkill
- measure-product-experimentsSkill
- obsidianSkill
- pr-descriptionSkill
- preserve-web-evidenceSkill
- prisma-migrateSkill
- retrieve-technical-docsSkill
- secret-managementSkill
- secret-scanSkill
- secure-codingSkill
- security-auditSkill
- shape-product-opportunitySkill
- simplify-code-safelySkill
- swift-api-design-guidelinesSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use a red-green-refactor loop to clarify behavior and protect the change, not to maximize test count.
- Distinctive: line 13
Follow the repository's existing test framework, naming, fixture, and placement conventions.
- Very specific: line 18
Run the nearest existing tests before editing.
- Distinctive: line 25
Run it and confirm it fails for the intended product reason, not syntax, setup, or fixture failure.
- Distinctive: line 27
Run the focused test and relevant neighboring tests.
- Distinctive: line 36
If the work requires a discovery spike, keep it disposable and translate the learned contract into a test before shipping production code.
- Distinctive: line 42
Run the focused test, relevant suite, and any required typecheck, lint, build, or integration checks.
- Very specific: line 45
Use debug-systematically first when the cause is unknown, then return here only after the intended correction is supported.
- Distinctive: line 47
Use an independent reviewer and verifier after implementation when available.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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.
Files
Develop test first
Use a red-green-refactor loop to clarify behavior and protect the change, not to maximize test count.
Define the behavior
State the observable outcome, boundary, representative input, expected result, and meaningful failure case. Follow the repository's existing test framework, naming, fixture, and placement conventions. Use a platform-specific testing skill when it provides more precise guidance.
Establish the baseline
Run the nearest existing tests before editing. Confirm whether the requested behavior is absent, broken, or
already covered. If the request is only to characterize and preserve existing legacy behavior, route to
simplify-code-safely; a passing characterization test is not the Red step for a new behavior.
Run the loop
- Red — add the smallest test that expresses one missing behavior.
- Run it and confirm it fails for the intended product reason, not syntax, setup, or fixture failure.
- Green — make the smallest coherent production change that satisfies the behavior.
- Run the focused test and relevant neighboring tests.
- Refactor — simplify names, duplication, control flow, and test setup while all tests stay green.
- Repeat for the next independently valuable behavior.
Assert public outcomes, state transitions, outputs, or boundary interactions. Avoid tests coupled to private method order, incidental DOM structure, arbitrary timing, or excessive mocks.
Handle exceptions honestly
If the work requires a discovery spike, keep it disposable and translate the learned contract into a test before shipping production code. If a reliable automated test is impractical, explain why and define the strongest repeatable manual or integration evidence instead of pretending the loop occurred.
Finish with evidence
Run the focused test, relevant suite, and any required typecheck, lint, build, or integration checks. Report the initial failing behavior, production change, refactor, and final commands.
Use debug-systematically first when the cause is unknown, then return here only after the intended
correction is supported. Use simplify-code-safely for characterization and behavior-preserving cleanup.
Use an independent reviewer and verifier after implementation when available.
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
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.

