[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6R60C32XW0927BVFJMGKR4M":3,"skill-same:01M6R60C32XW0927BVFJMGKR4M":81},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":34,"linkOnly":35,"markdownContent":36,"markdownBody":37,"frontMatter":38,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":13,"repositoryHtmlUrl":42,"repositoryHomepageUrl":6,"ownerHtmlUrl":43,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M6R60C32XW0927BVFJMGKR4M","tdd",null,"Run red-green-refactor with one failing test, one implementation, then cleanup. Use when building features or fixes test-first.","r3dlex\u002Fskills","r3dlex","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F291373160?v=4","01M6PEFNGGBVB7SHAPWXFFX933","01M6R5SDWFHT94734KJFMYE1SX",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fr3dlex\u002Fskills\u002Fblob\u002Fmain\u002F03-configure-generate\u002Ftdd\u002FSKILL.md",[],[5,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33],"implementation","failing","when","test-first","features","fixes","with","red","green","red-green-refactor","use","first","refactor","run","cleanup","test","2026-11-10 10:12:30",false,"---\nname: tdd\ndescription: 'Run red-green-refactor with one failing test, one implementation, then cleanup. Use when building features or fixes test-first.'\n---\n\n# Test-Driven Development\n\n## Quick Start\n\nUse one vertical slice at a time: one behavior test, minimal implementation, refactor only after green. Read `vertical-slices.md` when you need philosophy, anti-pattern examples, or the per-cycle checklist.\n\n## Planning\n\nBefore writing code:\n\n- [ ] Use the project's domain glossary for test names and interface vocabulary.\n- [ ] Respect ADRs in the area you are touching.\n- [ ] Confirm the public interface shape with the user when it is not already specified.\n- [ ] Prioritize the behaviors worth testing.\n- [ ] Call the Skill tool with `codebase-design` for module, interface, depth, seam, adapter,\n      leverage and locality vocabulary — including deep modules and designing for\n      testability. It is a reference to consult, not a session to run.\n\nAsk: \"What should the public interface look like? Which behaviors are most important to test?\"\n\n## Seams: where tests go\n\nA **seam** is the public boundary you test at: the interface where you observe behavior\nwithout reaching inside. Tests live at seams, never against internals.\n\n**Test only at pre-agreed seams.** Write down the seams under test and confirm them with\nthe user before writing any test; no test is written at an unconfirmed seam. You cannot\ntest everything — agreeing seams up front is how effort lands on critical paths and\ncomplex logic instead of every edge case.\n\n## Legacy-safe mode\n\nUse legacy-safe TDD automatically when relevant unit-test coverage is under 30%. Use it at\nany coverage level when the specific change has high coupling, weak seams, or a\nhigh observed blast radius; record the reason rather than relying on a silent\nconfidence judgment. Characterize only the change seam, then use a Sprout Method,\nSprout Class, or equivalent module to keep new behavior isolated. Read\n[legacy-systems.md](legacy-systems.md) before editing legacy production code.\n\n## Red-Green Loop\n\n### 1. Tracer bullet\n\nWrite one test that confirms one externally visible behavior:\n\n```text\nRED:   Write test for first behavior → test fails\nGREEN: Write minimal code to pass → test passes\n```\n\nThis proves the path works end-to-end.\n\n### 2. Incremental cycles\n\nFor each remaining behavior:\n\n1. Write the next behavior-focused test.\n2. Watch it fail for the expected reason.\n3. Write only enough code to pass.\n4. Run the relevant test set.\n5. Commit or checkpoint when the slice is coherent.\n\nRules: one test at a time; do not anticipate future tests; keep edge cases tied to\nuser-visible behavior. Testing public behavior rather than internals is covered by Seams.\n\n## Anti-patterns\n\n- **Implementation-coupled** — mocks internal collaborators, tests private methods,\n  or verifies through a side channel (querying the database instead of using the\n  interface). The tell: the test breaks when you refactor but behavior has not changed.\n- **Tautological** — the assertion recomputes the expected value the way the code does\n  (`expect(add(a, b)).toBe(a + b)`, a hand-derived snapshot, a constant asserted equal to\n  itself), so it passes by construction and can never disagree with the code. Expected\n  values must come from an independent source of truth — a known-good literal, a worked\n  example, the spec.\n- **Horizontal slicing** — all tests first, then all implementation. Bulk tests verify\n  *imagined* behavior, go insensitive to real changes, and commit you to a test structure\n  before you understand the implementation. Work in vertical slices instead.\n\n## Refactor\n\nRefactor only after green. Read [refactoring.md](refactoring.md) when choosing refactor candidates.\n\nCheck:\n\n- [ ] Extract duplication.\n- [ ] Deepen modules behind simple interfaces.\n- [ ] Apply SOLID principles where natural.\n- [ ] Consider what new code reveals about existing code.\n- [ ] Run tests after each refactor step.\n\nNever refactor while red.\n\n## References\n\n- [tests.md](tests.md) — examples of behavior-focused tests.\n- [mocking.md](mocking.md) — when mocks help or harm.\n- [legacy-systems.md](legacy-systems.md) — low-coverage and high-risk change strategy.\n- The `codebase-design` skill — deep modules, seams, and designing for testability.\n","# Test-Driven Development\n\n## Quick Start\n\nUse one vertical slice at a time: one behavior test, minimal implementation, refactor only after green. Read `vertical-slices.md` when you need philosophy, anti-pattern examples, or the per-cycle checklist.\n\n## Planning\n\nBefore writing code:\n\n- [ ] Use the project's domain glossary for test names and interface vocabulary.\n- [ ] Respect ADRs in the area you are touching.\n- [ ] Confirm the public interface shape with the user when it is not already specified.\n- [ ] Prioritize the behaviors worth testing.\n- [ ] Call the Skill tool with `codebase-design` for module, interface, depth, seam, adapter,\n      leverage and locality vocabulary — including deep modules and designing for\n      testability. It is a reference to consult, not a session to run.\n\nAsk: \"What should the public interface look like? Which behaviors are most important to test?\"\n\n## Seams: where tests go\n\nA **seam** is the public boundary you test at: the interface where you observe behavior\nwithout reaching inside. Tests live at seams, never against internals.\n\n**Test only at pre-agreed seams.** Write down the seams under test and confirm them with\nthe user before writing any test; no test is written at an unconfirmed seam. You cannot\ntest everything — agreeing seams up front is how effort lands on critical paths and\ncomplex logic instead of every edge case.\n\n## Legacy-safe mode\n\nUse legacy-safe TDD automatically when relevant unit-test coverage is under 30%. Use it at\nany coverage level when the specific change has high coupling, weak seams, or a\nhigh observed blast radius; record the reason rather than relying on a silent\nconfidence judgment. Characterize only the change seam, then use a Sprout Method,\nSprout Class, or equivalent module to keep new behavior isolated. Read\n[legacy-systems.md](legacy-systems.md) before editing legacy production code.\n\n## Red-Green Loop\n\n### 1. Tracer bullet\n\nWrite one test that confirms one externally visible behavior:\n\n```text\nRED:   Write test for first behavior → test fails\nGREEN: Write minimal code to pass → test passes\n```\n\nThis proves the path works end-to-end.\n\n### 2. Incremental cycles\n\nFor each remaining behavior:\n\n1. Write the next behavior-focused test.\n2. Watch it fail for the expected reason.\n3. Write only enough code to pass.\n4. Run the relevant test set.\n5. Commit or checkpoint when the slice is coherent.\n\nRules: one test at a time; do not anticipate future tests; keep edge cases tied to\nuser-visible behavior. Testing public behavior rather than internals is covered by Seams.\n\n## Anti-patterns\n\n- **Implementation-coupled** — mocks internal collaborators, tests private methods,\n  or verifies through a side channel (querying the database instead of using the\n  interface). The tell: the test breaks when you refactor but behavior has not changed.\n- **Tautological** — the assertion recomputes the expected value the way the code does\n  (`expect(add(a, b)).toBe(a + b)`, a hand-derived snapshot, a constant asserted equal to\n  itself), so it passes by construction and can never disagree with the code. Expected\n  values must come from an independent source of truth — a known-good literal, a worked\n  example, the spec.\n- **Horizontal slicing** — all tests first, then all implementation. Bulk tests verify\n  *imagined* behavior, go insensitive to real changes, and commit you to a test structure\n  before you understand the implementation. Work in vertical slices instead.\n\n## Refactor\n\nRefactor only after green. Read [refactoring.md](refactoring.md) when choosing refactor candidates.\n\nCheck:\n\n- [ ] Extract duplication.\n- [ ] Deepen modules behind simple interfaces.\n- [ ] Apply SOLID principles where natural.\n- [ ] Consider what new code reveals about existing code.\n- [ ] Run tests after each refactor step.\n\nNever refactor while red.\n\n## References\n\n- [tests.md](tests.md) — examples of behavior-focused tests.\n- [mocking.md](mocking.md) — when mocks help or harm.\n- [legacy-systems.md](legacy-systems.md) — low-coverage and high-risk change strategy.\n- The `codebase-design` skill — deep modules, seams, and designing for testability.\n",{"name":5,"description":7},"main","037fe34299eb9c4a30b51f1a6bd101eae1c469b1","03-configure-generate\u002Ftdd","https:\u002F\u002Fgithub.com\u002Fr3dlex\u002Fskills","https:\u002F\u002Fgithub.com\u002Fr3dlex","2026-10-29 16:22:54",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add r3dlex\u002Fskills --skill tdd",{"tool":51,"command":52},"bunx","bunx skills add r3dlex\u002Fskills --skill tdd",{"tool":54,"command":55},"pnpm","pnpm dlx skills add r3dlex\u002Fskills --skill tdd","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fr3dlex\u002Fskills\u002Fblob\u002Fmain\u002F03-configure-generate\u002Ftdd\u002FSKILL.md",true,[59,65,69,73,77],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"legacy-systems.md","REFERENCE","参考文档",2065,"https:\u002F\u002Fgithub.com\u002Fr3dlex\u002Fskills\u002Fblob\u002Fmain\u002F03-configure-generate\u002Ftdd\u002Flegacy-systems.md",{"path":66,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":67,"sourceHtmlUrl":68},"mocking.md",2249,"https:\u002F\u002Fgithub.com\u002Fr3dlex\u002Fskills\u002Fblob\u002Fmain\u002F03-configure-generate\u002Ftdd\u002Fmocking.md",{"path":70,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":71,"sourceHtmlUrl":72},"refactoring.md",387,"https:\u002F\u002Fgithub.com\u002Fr3dlex\u002Fskills\u002Fblob\u002Fmain\u002F03-configure-generate\u002Ftdd\u002Frefactoring.md",{"path":74,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":75,"sourceHtmlUrl":76},"tests.md",1640,"https:\u002F\u002Fgithub.com\u002Fr3dlex\u002Fskills\u002Fblob\u002Fmain\u002F03-configure-generate\u002Ftdd\u002Ftests.md",{"path":78,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":79,"sourceHtmlUrl":80},"vertical-slices.md",1093,"https:\u002F\u002Fgithub.com\u002Fr3dlex\u002Fskills\u002Fblob\u002Fmain\u002F03-configure-generate\u002Ftdd\u002Fvertical-slices.md",[82,90,98,106,115,138],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":34},"01M6R652E42RZT7M2V3RWW991Z","skill","Fixture.","https:\u002F\u002Fgithub.com\u002Fr3dlex\u002Fskills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fcatalog-malformed\u002Fskill\u002FSKILL.md",[],[89],"fixture",{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":34},"01M6R64MTPF0FGWHFS4DWP40GR","stable-skill","Fixture stable-skill.","https:\u002F\u002Fgithub.com\u002Fr3dlex\u002Fskills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fcatalog-lifecycle\u002Fstable-skill\u002FSKILL.md",[],[97,89],"stable skill",{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":34},"01M6R64HD4QVAYM2R0JSYNVDJW","experimental-skill","Fixture experimental-skill.","https:\u002F\u002Fgithub.com\u002Fr3dlex\u002Fskills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fcatalog-lifecycle\u002Fexperimental-skill\u002FSKILL.md",[],[105,89],"experimental skill",{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":34},"01M6R64FZH05TEJQW75QX1E5XD","deprecated-skill","Fixture deprecated-skill.","https:\u002F\u002Fgithub.com\u002Fr3dlex\u002Fskills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fcatalog-lifecycle\u002Fdeprecated-skill\u002FSKILL.md",[],[113,114,89],"deprecated skill","deprecated",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":34},"01M6R64D13X5DC980GREWFSSFQ","karpathy-guidelines","Apply think-before-coding, simplicity, surgical-change, and goal-driven engineering rules. Use when planning, implementing, or reviewing code.","https:\u002F\u002Fgithub.com\u002Fr3dlex\u002Fskills\u002Fblob\u002Fmain\u002Freference\u002Fgolden-skills\u002F.agents\u002Fskills\u002Fkarpathy-guidelines\u002FSKILL.md",[],[122,123,124,125,28,126,127,128,129,130,131,132,20,133,134,135,136,137],"karpathy guidelines","karpathy","guidelines","Rules","simplicity","goal","think","driven","reviewing code","implementing","apply","coding","change","code","planning","engineering",{"skillNo":139,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":34},"01M6R640ZS60BRV9P49FT46ZJX","https:\u002F\u002Fgithub.com\u002Fr3dlex\u002Fskills\u002Fblob\u002Fmain\u002Freference\u002Fgolden-root\u002F.agents\u002Fskills\u002Fkarpathy-guidelines\u002FSKILL.md",[],[124,122,123,134,129,135,136,137,133,125,28,126,127,128,130,131,132,20]]