[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EESS8ZR2QXMZY1JH2WEXX1":3,"skill-same:01M7EESS8ZR2QXMZY1JH2WEXX1":58},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7EESS8ZR2QXMZY1JH2WEXX1","tdd",null,"Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions \"red-green-refactor\", or wants integration tests.","corynaegle-ai\u002Fagent-skills","corynaegle-ai","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F241187360?v=4","01M7EERCKRBDKXW1R6YN1C82VS","Cory Naegle","01M7EERCMA1R6GF65T61N6T4XB",0,"MIT","https:\u002F\u002Fgithub.com\u002Fcorynaegle-ai\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fengineering\u002Ftdd\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: tdd\ndescription: Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions \"red-green-refactor\", or wants integration tests.\n---\n\n# Test-Driven Development\n\nUse red → green → refactor for behavioral changes where an independent assertion can catch a regression. Match effort to the change; documentation, formatting, and reversible low-impact edits usually need existing checks rather than new tests.\n\nWhen exploring the codebase, read `GLOSSARY.md` (if it exists) so test names and interface vocabulary match the project's domain language, and respect ADRs in the area you're touching.\n\n## What a good test is\n\nTests verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't. A good test reads like a specification: \"user can checkout with valid cart\" tells you exactly what capability exists, and it survives refactors because it doesn't care about internal structure.\n\nSee [tests.md](tests.md) for examples and [mocking.md](mocking.md) for mocking guidelines.\n\n## Seams: where tests go\n\nA **seam** is the public boundary you test at: the interface where you observe behavior without reaching inside. Tests live at seams, never against internals.\n\nReuse boundaries established in the task, spec, and existing suite. Otherwise select the smallest public boundary that catches the requested behavior, state what it catches and misses, and proceed within the authorized task. Ask only when the choice changes product behavior, scope, or a material architectural trade-off.\n\nPreserve explicitly requested approval gates. Existing authorization persists; routine regression tests at an existing boundary do not need another confirmation.\n\nWhen the shape of that interface is itself in question (how deep the module is, where the seam belongs, what the interface should expose), load the installed `codebase-design` skill with the available skill tool or by reading its `SKILL.md` for the vocabulary. It is the shared source of the module, interface, depth, seam, adapter, leverage and locality terms, and it is a reference to consult, not a session to run.\n\n## Anti-patterns\n\n- **Implementation-coupled**: mocks internal collaborators, tests private methods, or verifies through a side channel (querying the database instead of using the interface). The tell: the test breaks when you refactor but behavior hasn't changed.\n- **Tautological**: the assertion recomputes the expected value the way the code does (`expect(add(a, b)).toBe(a + b)`, a snapshot derived by hand the same way, a constant asserted equal to itself), so it passes by construction and can never disagree with the code. Expected values must come from an independent source of truth: a known-good literal, a worked example, the spec.\n- **Horizontal slicing**: writing all tests first, then all implementation. Bulk tests verify _imagined_ behavior: you test the _shape_ of things rather than user-facing behavior, the tests go insensitive to real changes, and you commit to test structure before understanding the implementation. Work in **vertical slices** instead: one test → one implementation → repeat, each test a **tracer bullet** that responds to what the last cycle taught you.\n\n## Check each test before keeping it\n\n`review-tests` audits tests after they're written; hold each new test to the same bar now so there is nothing for it to find. Before keeping a test, answer its three questions:\n\n1. **What real code runs?** The production entrypoint and the decision under test execute; only system boundaries are replaced (see [mocking.md](mocking.md)). A test that mocks the subject, reimplements it, or only imports it verifies nothing.\n2. **What independently establishes correctness?** The expected value comes from the spec, a worked example, or a domain rule, never from the code's own helpers, the current output, or a value the fake supplied.\n3. **What plausible regression would fail it?** Name one. Red-before-green shows this for new behavior. When adding a test for code that already works, temporarily break the relevant decision, watch the test fail on its assertion (not a setup or import error), and restore.\n\nAlso avoid the defects `review-tests` most often finds beyond the anti-patterns above:\n\n- **Weak failure checks**: assert the specific error and that no forbidden side effect happened; pair each rejection with an accepted neighbouring case.\n- **Nondeterminism**: no shared state, order dependence, wall clock, fixed ports, live network, or ambient environment; control time and randomness.\n- **Timing coupling**: no sleeps to wait for ordering; wait on an event or condition with a bound, and surface worker exceptions to the test.\n- **Over-precise assertions**: no source-string searches, giant snapshots, or exact serialization unless that format is the contract.\n\nFor judgment calls, such as when exact call counts, private fault injection, or real elapsed time are legitimate, read the installed `review-tests` skill's `references\u002Freview-cases.md`.\n\n## Rules of the loop\n\n- **Red before green.** Write the failing test first, then only enough code to pass it. Don't anticipate future tests or add speculative features.\n- **One slice at a time.** One seam, one test, one minimal implementation per cycle.\n- **Refactor while green.** Simplify the tested change without changing behavior, then rerun affected checks. Broader architectural work needs its own justification and scope.\n","# Test-Driven Development\n\nUse red → green → refactor for behavioral changes where an independent assertion can catch a regression. Match effort to the change; documentation, formatting, and reversible low-impact edits usually need existing checks rather than new tests.\n\nWhen exploring the codebase, read `GLOSSARY.md` (if it exists) so test names and interface vocabulary match the project's domain language, and respect ADRs in the area you're touching.\n\n## What a good test is\n\nTests verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't. A good test reads like a specification: \"user can checkout with valid cart\" tells you exactly what capability exists, and it survives refactors because it doesn't care about internal structure.\n\nSee [tests.md](tests.md) for examples and [mocking.md](mocking.md) for mocking guidelines.\n\n## Seams: where tests go\n\nA **seam** is the public boundary you test at: the interface where you observe behavior without reaching inside. Tests live at seams, never against internals.\n\nReuse boundaries established in the task, spec, and existing suite. Otherwise select the smallest public boundary that catches the requested behavior, state what it catches and misses, and proceed within the authorized task. Ask only when the choice changes product behavior, scope, or a material architectural trade-off.\n\nPreserve explicitly requested approval gates. Existing authorization persists; routine regression tests at an existing boundary do not need another confirmation.\n\nWhen the shape of that interface is itself in question (how deep the module is, where the seam belongs, what the interface should expose), load the installed `codebase-design` skill with the available skill tool or by reading its `SKILL.md` for the vocabulary. It is the shared source of the module, interface, depth, seam, adapter, leverage and locality terms, and it is a reference to consult, not a session to run.\n\n## Anti-patterns\n\n- **Implementation-coupled**: mocks internal collaborators, tests private methods, or verifies through a side channel (querying the database instead of using the interface). The tell: the test breaks when you refactor but behavior hasn't changed.\n- **Tautological**: the assertion recomputes the expected value the way the code does (`expect(add(a, b)).toBe(a + b)`, a snapshot derived by hand the same way, a constant asserted equal to itself), so it passes by construction and can never disagree with the code. Expected values must come from an independent source of truth: a known-good literal, a worked example, the spec.\n- **Horizontal slicing**: writing all tests first, then all implementation. Bulk tests verify _imagined_ behavior: you test the _shape_ of things rather than user-facing behavior, the tests go insensitive to real changes, and you commit to test structure before understanding the implementation. Work in **vertical slices** instead: one test → one implementation → repeat, each test a **tracer bullet** that responds to what the last cycle taught you.\n\n## Check each test before keeping it\n\n`review-tests` audits tests after they're written; hold each new test to the same bar now so there is nothing for it to find. Before keeping a test, answer its three questions:\n\n1. **What real code runs?** The production entrypoint and the decision under test execute; only system boundaries are replaced (see [mocking.md](mocking.md)). A test that mocks the subject, reimplements it, or only imports it verifies nothing.\n2. **What independently establishes correctness?** The expected value comes from the spec, a worked example, or a domain rule, never from the code's own helpers, the current output, or a value the fake supplied.\n3. **What plausible regression would fail it?** Name one. Red-before-green shows this for new behavior. When adding a test for code that already works, temporarily break the relevant decision, watch the test fail on its assertion (not a setup or import error), and restore.\n\nAlso avoid the defects `review-tests` most often finds beyond the anti-patterns above:\n\n- **Weak failure checks**: assert the specific error and that no forbidden side effect happened; pair each rejection with an accepted neighbouring case.\n- **Nondeterminism**: no shared state, order dependence, wall clock, fixed ports, live network, or ambient environment; control time and randomness.\n- **Timing coupling**: no sleeps to wait for ordering; wait on an event or condition with a bound, and surface worker exceptions to the test.\n- **Over-precise assertions**: no source-string searches, giant snapshots, or exact serialization unless that format is the contract.\n\nFor judgment calls, such as when exact call counts, private fault injection, or real elapsed time are legitimate, read the installed `review-tests` skill's `references\u002Freview-cases.md`.\n\n## Rules of the loop\n\n- **Red before green.** Write the failing test first, then only enough code to pass it. Don't anticipate future tests or add speculative features.\n- **One slice at a time.** One seam, one test, one minimal implementation per cycle.\n- **Refactor while green.** Simplify the tested change without changing behavior, then rerun affected checks. Broader architectural work needs its own justification and scope.\n",{"name":5,"description":7},"main","ea9bf92d4100ca82381fdb7f483970eecca8657e","skills\u002Fengineering\u002Ftdd","https:\u002F\u002Fgithub.com\u002Fcorynaegle-ai\u002Fagent-skills","https:\u002F\u002Fgithub.com\u002Fcorynaegle-ai","2026-10-23 22:36:30",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add corynaegle-ai\u002Fagent-skills --skill tdd",{"tool":36,"command":37},"bunx","bunx skills add corynaegle-ai\u002Fagent-skills --skill tdd",{"tool":39,"command":40},"pnpm","pnpm dlx skills add corynaegle-ai\u002Fagent-skills --skill tdd","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcorynaegle-ai\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fengineering\u002Ftdd\u002FSKILL.md",true,[44,50,54],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"agents\u002Fopenai.yaml","REFERENCE","参考文档",87,"https:\u002F\u002Fgithub.com\u002Fcorynaegle-ai\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fengineering\u002Ftdd\u002Fagents\u002Fopenai.yaml",{"path":51,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":52,"sourceHtmlUrl":53},"mocking.md",1481,"https:\u002F\u002Fgithub.com\u002Fcorynaegle-ai\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fengineering\u002Ftdd\u002Fmocking.md",{"path":55,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":56,"sourceHtmlUrl":57},"tests.md",2323,"https:\u002F\u002Fgithub.com\u002Fcorynaegle-ai\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fengineering\u002Ftdd\u002Ftests.md",[59,66,73,80,87,94],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7EEVKRSDRAF2GDCP7QRMTBZ","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Fcorynaegle-ai\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fproductivity\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7EEVJHX35EZK8GN4NNJDKDT","wait-what","Stop. That last message did not land: re-pitch it.","https:\u002F\u002Fgithub.com\u002Fcorynaegle-ai\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fproductivity\u002Fwait-what\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M7EEVGRDG5WF2N35Q5GPF1GY","to-questionnaire","Turn a decision you can't fully answer into a questionnaire for someone else to fill in.","https:\u002F\u002Fgithub.com\u002Fcorynaegle-ai\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fproductivity\u002Fto-questionnaire\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7EEVDDWC851XESWCXBN1602","teach","Teach the user a new skill or concept, within this workspace.","https:\u002F\u002Fgithub.com\u002Fcorynaegle-ai\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fproductivity\u002Fteach\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M7EEVBQWQXPZZ46BPGVMM060","handoff","Compact the current conversation into a handoff document for another agent to pick up.","https:\u002F\u002Fgithub.com\u002Fcorynaegle-ai\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fproductivity\u002Fhandoff\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M7EEV95V00GEYZ0TE19Y7GHH","grilling","Stress-test a plan or decision through focused questions when the user requests an interview or unresolved choices materially affect the work.","https:\u002F\u002Fgithub.com\u002Fcorynaegle-ai\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fproductivity\u002Fgrilling\u002FSKILL.md",[],[]]