[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74FA8N15YEZ01A131EB1CCA":3,"skill-same:01M74FA8N15YEZ01A131EB1CCA":48},{"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":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M74FA8N15YEZ01A131EB1CCA","tdd",null,"Test-driven development with red-green-refactor loops around vertical slices (tracer bullets), not horizontal layers. Use when asked to \"use TDD\", \"write test-first\", \"red-green-refactor\", \"build this with tests\", or when a feature has a clear observable contract. The discipline complement to the test\u002Fadd-tests skills (the mechanics).","open-gsd\u002Fgsd-pi","open-gsd","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F286935422?v=4","01M74F5F0MKW0B81YZHRVJMMWR","Open GSD","01M74F5F1782D325EYEM5GNXNC",1369,"MIT","https:\u002F\u002Fgithub.com\u002Fopen-gsd\u002Fgsd-pi\u002Fblob\u002Fmain\u002Fsrc\u002Fresources\u002Fskills\u002Ftdd\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: tdd\ndescription: Test-driven development with red-green-refactor loops around vertical slices (tracer bullets), not horizontal layers. Use when asked to \"use TDD\", \"write test-first\", \"red-green-refactor\", \"build this with tests\", or when a feature has a clear observable contract. The discipline complement to the test\u002Fadd-tests skills (the mechanics).\n---\n\n\u003Cobjective>\nDrive feature implementation through one red-green-refactor cycle per vertical slice. Each cycle produces a single failing test that pins one observable behavior, then the minimal code that makes it pass, then refactoring while GREEN. Never refactor while RED. Never write all tests up front.\n\u003C\u002Fobjective>\n\n\u003Ccontext>\nGSD already organizes work into slices (S##) and tasks (T##). This skill operates at the task level — inside a single T##-PLAN.md, it structures the execution as a sequence of tiny red-green-refactor cycles rather than write-all-then-test or write-all-without-tests.\n\nInvocation points:\n\n- Task plan calls out behavior with a clear external contract (pure function, API endpoint, module boundary)\n- Bug fix — write the failing repro test first, then fix\n- Refactor into a new module — write the tests against the new interface first\n\nDo not use this skill for:\n\n- Exploratory spikes (use `\u002Fgsd start spike` — no production code ships)\n- Pure UI polish where visual verification beats unit tests\n- Scripts that run once and are deleted\n\u003C\u002Fcontext>\n\n\u003Ccore_principle>\n**TESTS VERIFY BEHAVIOR THROUGH PUBLIC INTERFACES, NOT IMPLEMENTATION DETAILS.** A good test reads like a specification and survives refactors. A test that mocks internals or asserts private state fails every time you clean up the code — that is a bad test pretending to be a good one.\n\n**VERTICAL SLICES, NOT HORIZONTAL LAYERS.** Writing all tests upfront (\"horizontal slicing\") produces tests for behavior you imagined, not behavior the code actually exhibits. One tracer bullet at a time: write one test, make it pass, learn, write the next.\n\n**NEVER REFACTOR WHILE RED.** Refactoring without a passing test means you are guessing whether you broke something. Get to green first. Then clean up. Then go red again for the next slice.\n\u003C\u002Fcore_principle>\n\n\u003Cprocess>\n\n## Step 1: Confirm the interface\n\nBefore writing anything:\n\n1. What is the public interface? (function signature, HTTP route, module exports)\n2. Which behaviors matter most? List them in order of how badly you'd want to know if they broke.\n3. What does a \"caller\" look like? Write one example call in prose.\n\nIf the user has not supplied these, ask — one round, 1–3 questions.\n\n## Step 2: Tracer bullet\n\nPick the first behavior — usually the happy path for the most common input. Write one test that exercises it end-to-end through the public interface. Run it. It must fail (RED). If it passes, the test is not testing what you think it is — fix the test before writing any code.\n\nThen write the minimum code to make it pass. \"Minimum\" means: if hard-coding `return 42` makes the test pass, hard-code `return 42`. You will generalize on the next cycle. Run the test. It must pass (GREEN).\n\nThis proves the end-to-end path works — test harness, imports, wiring, build. Everything from Step 3 onward is incremental.\n\n## Step 3: Red-green loop\n\nPick the next behavior. Write one test that pins it. Run — RED. Write the minimum code that makes it pass without breaking prior tests. Run — GREEN.\n\nGuidelines for picking the next behavior:\n\n- Alternate happy-path-variant and edge-case tests — don't do all happy paths then all edges.\n- Stop adding happy paths when they stop revealing new code. Move to errors.\n- If the next test would require no new code, you have hit the end of this slice — skip to Step 4.\n\nGuidelines for writing the test:\n\n- One assertion per concept (multiple `expect` calls that describe one behavior are fine).\n- No mocking of internals. Mock external I\u002FO (network, filesystem, clock) only when necessary.\n- The test name reads as a sentence: \"rejects requests missing an auth header\".\n\nGuidelines for writing the code:\n\n- Minimum to pass. If there are three cases and two are untested, write only the one that's under test.\n- Copy-paste is fine on the first and second occurrence. Extract on the third.\n\n## Step 4: Refactor while GREEN\n\nNow that the behavior is pinned, clean up. Extract duplicated logic. Rename unclear variables. Deepen the module — move responsibilities behind the interface until the internals stop leaking into the test.\n\nRules:\n\n- Every refactor keeps every test GREEN. Run tests after each small change.\n- If a refactor would require changing a test, the test was coupled to implementation — either the test is wrong, or the interface you thought you were pinning is actually different. Fix the test first, then refactor.\n- Don't refactor speculatively. Extract around real duplication and real seams, not imagined ones.\n\n## Step 5: Close the slice\n\nWhen the behavior the task plan specified is fully under test and the code is clean:\n\n1. Run the full test suite — not just the tests you wrote. Verify no regressions.\n2. Record a one-line summary of what is now pinned with `capture_thought` if the behavior is non-obvious or the test surfaced a trap future agents should know about.\n3. Use `gsd_*` tools to mark the task complete — do not edit checkboxes by hand.\n\n\u003C\u002Fprocess>\n\n\u003Canti_patterns>\n\n- **Writing all tests first.** Horizontal slicing. Produces imagined-behavior tests that decouple from reality.\n- **Mocking internals.** `jest.mock(\".\u002Finternal-helper\")` tells you the wiring matches your mental model, not that the behavior is correct.\n- **Refactoring while RED.** You have no signal. Any change could be right or wrong.\n- **\"Just one more test\" after GREEN without refactoring.** You accumulate duplication and the code rots in place.\n- **Testing implementation detail.** \"It calls `fetchUser` three times.\" Who cares? Test the observable result.\n- **Skipping the failing run.** If you never saw RED, you don't know the test would have caught the bug.\n\n\u003C\u002Fanti_patterns>\n\n\u003Csuccess_criteria>\n\n- [ ] Every behavior the task plan called out has a test that pins it through the public interface.\n- [ ] Every test went RED before it went GREEN. No test was born passing.\n- [ ] All refactoring happened on GREEN. The final code is not the first draft.\n- [ ] Full test suite runs clean — no regressions.\n- [ ] No test mocks an internal helper or asserts a private field.\n\n\u003C\u002Fsuccess_criteria>\n","\u003Cobjective>\nDrive feature implementation through one red-green-refactor cycle per vertical slice. Each cycle produces a single failing test that pins one observable behavior, then the minimal code that makes it pass, then refactoring while GREEN. Never refactor while RED. Never write all tests up front.\n\u003C\u002Fobjective>\n\n\u003Ccontext>\nGSD already organizes work into slices (S##) and tasks (T##). This skill operates at the task level — inside a single T##-PLAN.md, it structures the execution as a sequence of tiny red-green-refactor cycles rather than write-all-then-test or write-all-without-tests.\n\nInvocation points:\n\n- Task plan calls out behavior with a clear external contract (pure function, API endpoint, module boundary)\n- Bug fix — write the failing repro test first, then fix\n- Refactor into a new module — write the tests against the new interface first\n\nDo not use this skill for:\n\n- Exploratory spikes (use `\u002Fgsd start spike` — no production code ships)\n- Pure UI polish where visual verification beats unit tests\n- Scripts that run once and are deleted\n\u003C\u002Fcontext>\n\n\u003Ccore_principle>\n**TESTS VERIFY BEHAVIOR THROUGH PUBLIC INTERFACES, NOT IMPLEMENTATION DETAILS.** A good test reads like a specification and survives refactors. A test that mocks internals or asserts private state fails every time you clean up the code — that is a bad test pretending to be a good one.\n\n**VERTICAL SLICES, NOT HORIZONTAL LAYERS.** Writing all tests upfront (\"horizontal slicing\") produces tests for behavior you imagined, not behavior the code actually exhibits. One tracer bullet at a time: write one test, make it pass, learn, write the next.\n\n**NEVER REFACTOR WHILE RED.** Refactoring without a passing test means you are guessing whether you broke something. Get to green first. Then clean up. Then go red again for the next slice.\n\u003C\u002Fcore_principle>\n\n\u003Cprocess>\n\n## Step 1: Confirm the interface\n\nBefore writing anything:\n\n1. What is the public interface? (function signature, HTTP route, module exports)\n2. Which behaviors matter most? List them in order of how badly you'd want to know if they broke.\n3. What does a \"caller\" look like? Write one example call in prose.\n\nIf the user has not supplied these, ask — one round, 1–3 questions.\n\n## Step 2: Tracer bullet\n\nPick the first behavior — usually the happy path for the most common input. Write one test that exercises it end-to-end through the public interface. Run it. It must fail (RED). If it passes, the test is not testing what you think it is — fix the test before writing any code.\n\nThen write the minimum code to make it pass. \"Minimum\" means: if hard-coding `return 42` makes the test pass, hard-code `return 42`. You will generalize on the next cycle. Run the test. It must pass (GREEN).\n\nThis proves the end-to-end path works — test harness, imports, wiring, build. Everything from Step 3 onward is incremental.\n\n## Step 3: Red-green loop\n\nPick the next behavior. Write one test that pins it. Run — RED. Write the minimum code that makes it pass without breaking prior tests. Run — GREEN.\n\nGuidelines for picking the next behavior:\n\n- Alternate happy-path-variant and edge-case tests — don't do all happy paths then all edges.\n- Stop adding happy paths when they stop revealing new code. Move to errors.\n- If the next test would require no new code, you have hit the end of this slice — skip to Step 4.\n\nGuidelines for writing the test:\n\n- One assertion per concept (multiple `expect` calls that describe one behavior are fine).\n- No mocking of internals. Mock external I\u002FO (network, filesystem, clock) only when necessary.\n- The test name reads as a sentence: \"rejects requests missing an auth header\".\n\nGuidelines for writing the code:\n\n- Minimum to pass. If there are three cases and two are untested, write only the one that's under test.\n- Copy-paste is fine on the first and second occurrence. Extract on the third.\n\n## Step 4: Refactor while GREEN\n\nNow that the behavior is pinned, clean up. Extract duplicated logic. Rename unclear variables. Deepen the module — move responsibilities behind the interface until the internals stop leaking into the test.\n\nRules:\n\n- Every refactor keeps every test GREEN. Run tests after each small change.\n- If a refactor would require changing a test, the test was coupled to implementation — either the test is wrong, or the interface you thought you were pinning is actually different. Fix the test first, then refactor.\n- Don't refactor speculatively. Extract around real duplication and real seams, not imagined ones.\n\n## Step 5: Close the slice\n\nWhen the behavior the task plan specified is fully under test and the code is clean:\n\n1. Run the full test suite — not just the tests you wrote. Verify no regressions.\n2. Record a one-line summary of what is now pinned with `capture_thought` if the behavior is non-obvious or the test surfaced a trap future agents should know about.\n3. Use `gsd_*` tools to mark the task complete — do not edit checkboxes by hand.\n\n\u003C\u002Fprocess>\n\n\u003Canti_patterns>\n\n- **Writing all tests first.** Horizontal slicing. Produces imagined-behavior tests that decouple from reality.\n- **Mocking internals.** `jest.mock(\".\u002Finternal-helper\")` tells you the wiring matches your mental model, not that the behavior is correct.\n- **Refactoring while RED.** You have no signal. Any change could be right or wrong.\n- **\"Just one more test\" after GREEN without refactoring.** You accumulate duplication and the code rots in place.\n- **Testing implementation detail.** \"It calls `fetchUser` three times.\" Who cares? Test the observable result.\n- **Skipping the failing run.** If you never saw RED, you don't know the test would have caught the bug.\n\n\u003C\u002Fanti_patterns>\n\n\u003Csuccess_criteria>\n\n- [ ] Every behavior the task plan called out has a test that pins it through the public interface.\n- [ ] Every test went RED before it went GREEN. No test was born passing.\n- [ ] All refactoring happened on GREEN. The final code is not the first draft.\n- [ ] Full test suite runs clean — no regressions.\n- [ ] No test mocks an internal helper or asserts a private field.\n\n\u003C\u002Fsuccess_criteria>\n",{"name":5,"description":7},"main","c0bc9c4e7e0a8581aeac3af397031dc3a63d012e","src\u002Fresources\u002Fskills\u002Ftdd",118,"https:\u002F\u002Fgithub.com\u002Fopen-gsd\u002Fgsd-pi","https:\u002F\u002Fwww.opengsd.net","https:\u002F\u002Fgithub.com\u002Fopen-gsd","opengsd.net","Most AI coding setups rot as the context window fills. Open GSD keeps the context clean, the work verified, and the git history honest — ship more, worry less.","2026-11-15 00:38:19",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add open-gsd\u002Fgsd-pi --skill tdd",{"tool":40,"command":41},"bunx","bunx skills add open-gsd\u002Fgsd-pi --skill tdd",{"tool":43,"command":44},"pnpm","pnpm dlx skills add open-gsd\u002Fgsd-pi --skill tdd","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fopen-gsd\u002Fgsd-pi\u002Fblob\u002Fmain\u002Fsrc\u002Fresources\u002Fskills\u002Ftdd\u002FSKILL.md",true,[],[49,56,63,70,77,84],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M74FAXPHS0QT1S067QDKYDBX","write-milestone-brief","Synthesize the current conversation into a milestone brief (PRD). Saves it as the milestone CONTEXT (`gsd_summary_save`) by default, or files a GitHub issue only with explicit user confirmation. Use when asked to \"turn this into a PRD\", \"draft a milestone brief\", \"capture this context\", \"write it up\", or when enough has been discussed to commit the plan to paper. Does not interview — it synthesizes what is already known.","https:\u002F\u002Fgithub.com\u002Fopen-gsd\u002Fgsd-pi\u002Fblob\u002Fmain\u002Fsrc\u002Fresources\u002Fskills\u002Fwrite-milestone-brief\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M74FATJT7WZX5CSSG8RJDCF1","write-docs","Collaborative authoring workflow for proposals, technical specs, decision docs, READMEs, ADRs, and long-form prose that must work for fresh readers. Three stages: gather context, iterate on structure, reader-test for a stranger. Use when asked to \"write the docs\", \"draft a proposal\", \"write a spec\", \"write an RFC\", \"write the README\", or when a doc must be understandable without this session's context.","https:\u002F\u002Fgithub.com\u002Fopen-gsd\u002Fgsd-pi\u002Fblob\u002Fmain\u002Fsrc\u002Fresources\u002Fskills\u002Fwrite-docs\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M74FAQ8HKNVGCZ5ZBHW03A76","web-quality-audit","Comprehensive web quality audit covering performance, accessibility, SEO, and best practices. Use when asked to \"audit my site\", \"review web quality\", \"run lighthouse audit\", \"check page quality\", or \"optimize my website\".","https:\u002F\u002Fgithub.com\u002Fopen-gsd\u002Fgsd-pi\u002Fblob\u002Fmain\u002Fsrc\u002Fresources\u002Fskills\u002Fweb-quality-audit\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M74FAMZ7WP4RPAG20F448MVF","web-design-guidelines","Review UI code for Web Interface Guidelines compliance. Use when asked to \"review my UI\", \"check accessibility\", \"audit design\", \"review UX\", or \"check my site against best practices\".","https:\u002F\u002Fgithub.com\u002Fopen-gsd\u002Fgsd-pi\u002Fblob\u002Fmain\u002Fsrc\u002Fresources\u002Fskills\u002Fweb-design-guidelines\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M74FAHYM672GKGGS8KMY9CKC","verify-before-complete","Block completion claims until verification evidence has been produced in the current message. Use before marking a task\u002Fslice\u002Fmilestone complete, before creating a commit or PR, before saying \"it works\" or \"tests pass\", and any time you are about to claim work is done. The rule is: evidence before claims, always — running the verification must happen now, not \"earlier in the session\". Fresh output or no claim.","https:\u002F\u002Fgithub.com\u002Fopen-gsd\u002Fgsd-pi\u002Fblob\u002Fmain\u002Fsrc\u002Fresources\u002Fskills\u002Fverify-before-complete\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M74FADG78GX090P4YE5ZHR2A","userinterface-wiki","UI\u002FUX best practices for web interfaces. Use when reviewing animations, CSS, audio, typography, UX patterns, prefetching, or icon implementations. Covers 11 categories from animation principles to typography. Outputs file:line findings.","https:\u002F\u002Fgithub.com\u002Fopen-gsd\u002Fgsd-pi\u002Fblob\u002Fmain\u002Fsrc\u002Fresources\u002Fskills\u002Fuserinterface-wiki\u002FSKILL.md",[],[]]