[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7C300SF6F7Y993C3Q1M32HF":3,"skill-same:01M7C300SF6F7Y993C3Q1M32HF":58},{"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":15,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":13,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7C300SF6F7Y993C3Q1M32HF","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.","PhmnPh\u002Fclaude-config","PhmnPh","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F206572176?v=4","01M7C2Y3QW8QEWQYD46EM0WMSV","01M7C2Y3RG0T6ZRNN1QWMMVMXQ",0,"MIT","https:\u002F\u002Fgithub.com\u002FPhmnPh\u002Fclaude-config\u002Fblob\u002Fmain\u002Fclaude\u002Fskills\u002Ftdd\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FPhmnPh\u002Fclaude-config\u002Fblob\u002Fmain\u002Fclaude\u002Fskills\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\nTDD is the red → green loop. This skill is the reference that makes that loop produce tests worth keeping: what a good test is, where tests go, the anti-patterns, and the rules of the loop. Read the supporting examples only when needed to choose or assess a test.\n\nUse existing project terminology. Read domain docs or ADRs when the behavior under test depends on them.\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\nChoose the observable boundary from existing interfaces and acceptance criteria.\nHonor already agreed boundaries. Explain consequential choices, but do not ask\nfor approval of routine test placement or require the user to know the term\n\"seam\". Ask only when expected behavior or a material architectural tradeoff is\nunresolved. Call the Skill tool with \"codebase-design\" when an interface itself needs design work.\n\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## 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 with evidence.** Once green, make an in-scope simplification when it helps, then rerun affected tests. Do not expand into unrelated redesign.\n- **Proportionate verification.** Run relevant checks and repository-required gates. Broaden after failures or evidence of wider impact. Do not repeat unchanged checks or create artificial tests for prose-only edits.\n- **Completion.** Show that the regression test failed for the intended behavior and passed after the change. Distinguish code verification from any unverified remote outcome.\n","# Test-Driven Development\n\nTDD is the red → green loop. This skill is the reference that makes that loop produce tests worth keeping: what a good test is, where tests go, the anti-patterns, and the rules of the loop. Read the supporting examples only when needed to choose or assess a test.\n\nUse existing project terminology. Read domain docs or ADRs when the behavior under test depends on them.\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\nChoose the observable boundary from existing interfaces and acceptance criteria.\nHonor already agreed boundaries. Explain consequential choices, but do not ask\nfor approval of routine test placement or require the user to know the term\n\"seam\". Ask only when expected behavior or a material architectural tradeoff is\nunresolved. Call the Skill tool with \"codebase-design\" when an interface itself needs design work.\n\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## 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 with evidence.** Once green, make an in-scope simplification when it helps, then rerun affected tests. Do not expand into unrelated redesign.\n- **Proportionate verification.** Run relevant checks and repository-required gates. Broaden after failures or evidence of wider impact. Do not repeat unchanged checks or create artificial tests for prose-only edits.\n- **Completion.** Show that the regression test failed for the intended behavior and passed after the change. Distinguish code verification from any unverified remote outcome.\n",{"name":5,"description":7},"main","2e487cdaeb989b9f77052c38e05a9a32a21d9f12","claude\u002Fskills\u002Ftdd","https:\u002F\u002Fgithub.com\u002FPhmnPh\u002Fclaude-config","https:\u002F\u002Fgithub.com\u002FPhmnPh","2026-09-16 22:26:04",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add PhmnPh\u002Fclaude-config --skill tdd",{"tool":36,"command":37},"bunx","bunx skills add PhmnPh\u002Fclaude-config --skill tdd",{"tool":39,"command":40},"pnpm","pnpm dlx skills add PhmnPh\u002Fclaude-config --skill tdd","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FPhmnPh\u002Fclaude-config\u002Fblob\u002Fmain\u002Fclaude\u002Fskills\u002Ftdd\u002FSKILL.md",true,[44,48,54],{"path":45,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":47,"sourceHtmlUrl":15},"LICENSE","许可证",1068,{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"mocking.md","REFERENCE","参考文档",1481,"https:\u002F\u002Fgithub.com\u002FPhmnPh\u002Fclaude-config\u002Fblob\u002Fmain\u002Fclaude\u002Fskills\u002Ftdd\u002Fmocking.md",{"path":55,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":56,"sourceHtmlUrl":57},"tests.md",2214,"https:\u002F\u002Fgithub.com\u002FPhmnPh\u002Fclaude-config\u002Fblob\u002Fmain\u002Fclaude\u002Fskills\u002Ftdd\u002Ftests.md",[59,67,75,83,89,97],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":63,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7C33F4HEPNCDR2RNG62YZX4","wayfinder","Map unresolved decisions for a large initiative and work through their dependencies until a plan is actionable.","https:\u002F\u002Fgithub.com\u002FPhmnPh\u002Fclaude-config\u002Fblob\u002Fmain\u002Fcodex\u002Fskills\u002Fwayfinder\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FPhmnPh\u002Fclaude-config\u002Fblob\u002Fmain\u002Fcodex\u002Fskills\u002Fwayfinder\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":71,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7C338XN7376BKCGTKFBQ583","to-tickets","Break a plan, spec, or the current conversation into a set of tracer-bullet tickets, each declaring its blocking edges, published to the configured tracker (edges as text in one file per ticket locally, or native blocking links on a real tracker).","https:\u002F\u002Fgithub.com\u002FPhmnPh\u002Fclaude-config\u002Fblob\u002Fmain\u002Fcodex\u002Fskills\u002Fto-tickets\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FPhmnPh\u002Fclaude-config\u002Fblob\u002Fmain\u002Fcodex\u002Fskills\u002Fto-tickets\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":79,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7C336B4KYZGGMKPNKEFPV00","to-spec","Turn an agreed feature or plan into a proportionate, testable specification at the requested destination.","https:\u002F\u002Fgithub.com\u002FPhmnPh\u002Fclaude-config\u002Fblob\u002Fmain\u002Fcodex\u002Fskills\u002Fto-spec\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FPhmnPh\u002Fclaude-config\u002Fblob\u002Fmain\u002Fcodex\u002Fskills\u002Fto-spec\u002FSKILL.md",[],[],{"skillNo":84,"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":85,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7C32Y5F6M2SQ675YK6679E9","https:\u002F\u002Fgithub.com\u002FPhmnPh\u002Fclaude-config\u002Fblob\u002Fmain\u002Fcodex\u002Fskills\u002Ftdd\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FPhmnPh\u002Fclaude-config\u002Fblob\u002Fmain\u002Fcodex\u002Fskills\u002Ftdd\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":93,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M7C32TNN391FBBA7NQHDX3MQ","setup-matt-pocock-skills","Configure missing tracker and domain-document conventions for the Matt Pocock workflows in a repository.","https:\u002F\u002Fgithub.com\u002FPhmnPh\u002Fclaude-config\u002Fblob\u002Fmain\u002Fcodex\u002Fskills\u002Fsetup-matt-pocock-skills\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FPhmnPh\u002Fclaude-config\u002Fblob\u002Fmain\u002Fcodex\u002Fskills\u002Fsetup-matt-pocock-skills\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":101,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M7C32R800TF424Y0SHWGR9BB","research","Investigate a specific technical question using primary sources and save a cited research note.","https:\u002F\u002Fgithub.com\u002FPhmnPh\u002Fclaude-config\u002Fblob\u002Fmain\u002Fcodex\u002Fskills\u002Fresearch\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FPhmnPh\u002Fclaude-config\u002Fblob\u002Fmain\u002Fcodex\u002Fskills\u002Fresearch\u002FSKILL.md",[],[]]