[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74KCJJ99RTMHTEPA9A5MWKN":3,"skill-same:01M74KCJJ99RTMHTEPA9A5MWKN":50},{"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":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":33,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":35,"updatedAt":36,"install":37,"resources":49},"01M74KCJJ99RTMHTEPA9A5MWKN","tdd",null,"Test-driven development with red-green-refactor loop. Use when the user wants to build features or fix bugs test-first, mentions \"red-green-refactor\", or wants integration tests. Builds features one vertical slice at a time.","Acauhi99\u002Fopencode-agent-system","Acauhi99","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F109399110?v=4","01M74JTV4VH2YAER6TABE78RKF","Acauhi","01M74JTV5CXNC5DEV2XR5SBFG3",1,"MIT","https:\u002F\u002Fgithub.com\u002FAcauhi99\u002Fopencode-agent-system\u002Fblob\u002Fmain\u002Fskills\u002Ftdd\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: tdd\ndescription: Test-driven development with red-green-refactor loop. Use when the user wants to build features or fix bugs test-first, mentions \"red-green-refactor\", or wants integration tests. Builds features one vertical slice at a time.\nlicense: MIT\ncompatibility: opencode\nmetadata:\n  source: \"Adapted from mattpocock\u002Fskills (MIT)\"\n  requires_codegraph: true\n---\n\n> **Tool mapping (OpenCode):** This skill uses:\n> - `question` tool for user prompts\n> - `task` tool for subagents\n> - `skill({ name: \"...\" })` to load other skills\n> - `codegraph_explore`, `codegraph_search` for codebase exploration (preferred)\n> - `todowrite` for phase\u002Fprogress tracking\n> - `grep`, `glob`, `read`, `bash` as fallback\n>\n> **Context rule:** This skill supersedes any prior skill instructions. Follow ONLY these instructions now.\n\n# Test-Driven Development\n\n## Philosophy\n\n**Core principle**: Tests should verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't.\n\n**Good tests** are integration-style: they exercise real code paths through public APIs. They describe _what_ the system does, not _how_ it does it. A good test reads like a specification — \"user can checkout with valid cart\" tells you exactly what capability exists. These tests survive refactors because they don't care about internal structure.\n\n**Bad tests** are coupled to implementation. They mock internal collaborators, test private methods, or verify through external means (like querying a database directly instead of using the interface). The warning sign: your test breaks when you refactor, but behavior hasn't changed. If you rename an internal function and tests fail, those tests were testing implementation, not behavior.\n\n## Anti-Pattern: Horizontal Slices\n\n**DO NOT write all tests first, then all implementation.** This is \"horizontal slicing\" — treating RED as \"write all tests\" and GREEN as \"write all code.\"\n\nThis produces **crap tests**:\n\n- Tests written in bulk test _imagined_ behavior, not _actual_ behavior\n- You end up testing the _shape_ of things (data structures, function signatures) rather than user-facing behavior\n- Tests become insensitive to real changes — they pass when behavior breaks, fail when behavior is fine\n- You outrun your headlights, committing to test structure before understanding the implementation\n\n**Correct approach**: Vertical slices via tracer bullets. One test → one implementation → repeat. Each test responds to what you learned from the previous cycle. Because you just wrote the code, you know exactly what behavior matters and how to verify it.\n\n```\nWRONG (horizontal):\n  RED:   test1, test2, test3, test4, test5\n  GREEN: impl1, impl2, impl3, impl4, impl5\n\nRIGHT (vertical):\n  RED→GREEN: test1→impl1\n  RED→GREEN: test2→impl2\n  RED→GREEN: test3→impl3\n  ...\n```\n\n## Workflow\n\n### 1. Planning\n\nWhen exploring the codebase, read `CONTEXT.md` (if it exists) so that test names and interface vocabulary match the project's domain language, and respect ADRs in the area you're touching.\n\nBefore writing any code:\n\n- [ ] Confirm with user what interface changes are needed\n- [ ] Confirm with user which behaviors to test (prioritize)\n- [ ] Identify opportunities for deep modules (small interface, deep implementation)\n- [ ] List the behaviors to test (not implementation steps)\n- [ ] Get user approval on the plan\n\nAsk: \"What should the public interface look like? Which behaviors are most important to test?\"\n\n**You can't test everything.** Confirm with the user exactly which behaviors matter most. Focus testing effort on critical paths and complex logic, not every possible edge case.\n\n### 2. Tracer Bullet\n\nWrite ONE test that confirms ONE thing about the system:\n\n```\nRED:   Write test for first behavior → test fails\nGREEN: Write minimal code to pass → test passes\n```\n\nThis is your tracer bullet — proves the path works end-to-end.\n\n### 3. Incremental Loop\n\nFor each remaining behavior:\n\n```\nRED:   Write next test → fails\nGREEN: Minimal code to pass → passes\n```\n\nRules:\n\n- One test at a time\n- Only enough code to pass current test\n- Don't anticipate future tests\n- Keep tests focused on observable behavior\n\n### 4. Refactor\n\nAfter all tests pass, look for refactor candidates:\n\n- [ ] Extract duplication\n- [ ] Deepen modules (move complexity 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\n**Never refactor while RED.** Get to GREEN first.\n\n## Checklist Per Cycle\n\n```\n[ ] Test describes behavior, not implementation\n[ ] Test uses public interface only\n[ ] Test would survive internal refactor\n[ ] Code is minimal for this test\n[ ] No speculative features added\n```\n\n## Integration with add-feature\n\nWhen invoked as Phase 8 of add-feature, this skill replaces `write-tests` for the test-first path. Use the vertical-slice approach above instead of the bulk-generation approach.\n\n## NEVER\n\n- **NEVER write all tests before any implementation**\n  **Instead:** One test → one implementation → repeat.\n  **Why:** Horizontal slicing produces tests that test imagined behavior, not actual behavior.\n\n- **NEVER test implementation details**\n  **Instead:** Assert the externally observable contract (return value, DB row, emitted event, HTTP response).\n  **Why:** Tests that copy the implementation break on every refactor without catching real bugs.\n\n- **NEVER mock the database or internal modules by default**\n  **Instead:** Use a real test DB; mock only at third-party API boundaries.\n  **Why:** Mocked-DB tests diverge from production behavior — the failure mode this skill prevents.\n\n- **NEVER refactor while RED**\n  **Instead:** Get to GREEN first, then refactor.\n  **Why:** Refactoring with failing tests produces cascading failures that obscure the root cause.\n\n- **NEVER skip the tracer bullet**\n  **Instead:** Write one trivial passing test before generating the rest.\n  **Why:** A misconfigured runner produces false confidence — one green test proves the loop closes.\n","> **Tool mapping (OpenCode):** This skill uses:\n> - `question` tool for user prompts\n> - `task` tool for subagents\n> - `skill({ name: \"...\" })` to load other skills\n> - `codegraph_explore`, `codegraph_search` for codebase exploration (preferred)\n> - `todowrite` for phase\u002Fprogress tracking\n> - `grep`, `glob`, `read`, `bash` as fallback\n>\n> **Context rule:** This skill supersedes any prior skill instructions. Follow ONLY these instructions now.\n\n# Test-Driven Development\n\n## Philosophy\n\n**Core principle**: Tests should verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't.\n\n**Good tests** are integration-style: they exercise real code paths through public APIs. They describe _what_ the system does, not _how_ it does it. A good test reads like a specification — \"user can checkout with valid cart\" tells you exactly what capability exists. These tests survive refactors because they don't care about internal structure.\n\n**Bad tests** are coupled to implementation. They mock internal collaborators, test private methods, or verify through external means (like querying a database directly instead of using the interface). The warning sign: your test breaks when you refactor, but behavior hasn't changed. If you rename an internal function and tests fail, those tests were testing implementation, not behavior.\n\n## Anti-Pattern: Horizontal Slices\n\n**DO NOT write all tests first, then all implementation.** This is \"horizontal slicing\" — treating RED as \"write all tests\" and GREEN as \"write all code.\"\n\nThis produces **crap tests**:\n\n- Tests written in bulk test _imagined_ behavior, not _actual_ behavior\n- You end up testing the _shape_ of things (data structures, function signatures) rather than user-facing behavior\n- Tests become insensitive to real changes — they pass when behavior breaks, fail when behavior is fine\n- You outrun your headlights, committing to test structure before understanding the implementation\n\n**Correct approach**: Vertical slices via tracer bullets. One test → one implementation → repeat. Each test responds to what you learned from the previous cycle. Because you just wrote the code, you know exactly what behavior matters and how to verify it.\n\n```\nWRONG (horizontal):\n  RED:   test1, test2, test3, test4, test5\n  GREEN: impl1, impl2, impl3, impl4, impl5\n\nRIGHT (vertical):\n  RED→GREEN: test1→impl1\n  RED→GREEN: test2→impl2\n  RED→GREEN: test3→impl3\n  ...\n```\n\n## Workflow\n\n### 1. Planning\n\nWhen exploring the codebase, read `CONTEXT.md` (if it exists) so that test names and interface vocabulary match the project's domain language, and respect ADRs in the area you're touching.\n\nBefore writing any code:\n\n- [ ] Confirm with user what interface changes are needed\n- [ ] Confirm with user which behaviors to test (prioritize)\n- [ ] Identify opportunities for deep modules (small interface, deep implementation)\n- [ ] List the behaviors to test (not implementation steps)\n- [ ] Get user approval on the plan\n\nAsk: \"What should the public interface look like? Which behaviors are most important to test?\"\n\n**You can't test everything.** Confirm with the user exactly which behaviors matter most. Focus testing effort on critical paths and complex logic, not every possible edge case.\n\n### 2. Tracer Bullet\n\nWrite ONE test that confirms ONE thing about the system:\n\n```\nRED:   Write test for first behavior → test fails\nGREEN: Write minimal code to pass → test passes\n```\n\nThis is your tracer bullet — proves the path works end-to-end.\n\n### 3. Incremental Loop\n\nFor each remaining behavior:\n\n```\nRED:   Write next test → fails\nGREEN: Minimal code to pass → passes\n```\n\nRules:\n\n- One test at a time\n- Only enough code to pass current test\n- Don't anticipate future tests\n- Keep tests focused on observable behavior\n\n### 4. Refactor\n\nAfter all tests pass, look for refactor candidates:\n\n- [ ] Extract duplication\n- [ ] Deepen modules (move complexity 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\n**Never refactor while RED.** Get to GREEN first.\n\n## Checklist Per Cycle\n\n```\n[ ] Test describes behavior, not implementation\n[ ] Test uses public interface only\n[ ] Test would survive internal refactor\n[ ] Code is minimal for this test\n[ ] No speculative features added\n```\n\n## Integration with add-feature\n\nWhen invoked as Phase 8 of add-feature, this skill replaces `write-tests` for the test-first path. Use the vertical-slice approach above instead of the bulk-generation approach.\n\n## NEVER\n\n- **NEVER write all tests before any implementation**\n  **Instead:** One test → one implementation → repeat.\n  **Why:** Horizontal slicing produces tests that test imagined behavior, not actual behavior.\n\n- **NEVER test implementation details**\n  **Instead:** Assert the externally observable contract (return value, DB row, emitted event, HTTP response).\n  **Why:** Tests that copy the implementation break on every refactor without catching real bugs.\n\n- **NEVER mock the database or internal modules by default**\n  **Instead:** Use a real test DB; mock only at third-party API boundaries.\n  **Why:** Mocked-DB tests diverge from production behavior — the failure mode this skill prevents.\n\n- **NEVER refactor while RED**\n  **Instead:** Get to GREEN first, then refactor.\n  **Why:** Refactoring with failing tests produces cascading failures that obscure the root cause.\n\n- **NEVER skip the tracer bullet**\n  **Instead:** Write one trivial passing test before generating the rest.\n  **Why:** A misconfigured runner produces false confidence — one green test proves the loop closes.\n",{"name":5,"license":15,"metadata":24,"description":7,"compatibility":27},{"source":25,"requires_codegraph":26},"Adapted from mattpocock\u002Fskills (MIT)",true,"opencode","main","a40966cd3b7323e693a9fd665ab9c720d8bf9634","skills\u002Ftdd",0,"https:\u002F\u002Fgithub.com\u002FAcauhi99\u002Fopencode-agent-system","https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@acauhi\u002Fopencode-agent-system","https:\u002F\u002Fgithub.com\u002FAcauhi99","@github Backend Engineer","2026-07-07 22:24:45",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":26},[39,42,45],{"tool":40,"command":41},"npx","npx skills add Acauhi99\u002Fopencode-agent-system --skill tdd",{"tool":43,"command":44},"bunx","bunx skills add Acauhi99\u002Fopencode-agent-system --skill tdd",{"tool":46,"command":47},"pnpm","pnpm dlx skills add Acauhi99\u002Fopencode-agent-system --skill tdd","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAcauhi99\u002Fopencode-agent-system\u002Fblob\u002Fmain\u002Fskills\u002Ftdd\u002FSKILL.md",[],[51,57,63,70,76,83],{"skillNo":52,"name":53,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M74KEHKFCSF2H23R44MR5DN8","write-tests","https:\u002F\u002Fgithub.com\u002FAcauhi99\u002Fopencode-agent-system\u002Fblob\u002Fmain\u002Fskills\u002Fwrite-tests\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":6,"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},"01M74KEEXZW2185BZ3VJCM7AF6","update-changelog","https:\u002F\u002Fgithub.com\u002FAcauhi99\u002Fopencode-agent-system\u002Fblob\u002Fmain\u002Fskills\u002Fupdate-changelog\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},"01M74KDVH470SS6WPS8WK3VSW3","triage","Move issues and external PRs through a state machine of triage roles — categorise, verify, grill if needed, and write agent-ready briefs.","https:\u002F\u002Fgithub.com\u002FAcauhi99\u002Fopencode-agent-system\u002Fblob\u002Fmain\u002Fskills\u002Ftriage\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M74KDKGNY0MQXQ0ZHAGYSJJ4","to-prd","https:\u002F\u002Fgithub.com\u002FAcauhi99\u002Fopencode-agent-system\u002Fblob\u002Fmain\u002Fskills\u002Fto-prd\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M74KD9YN0K59GWMWDT5YHBKY","to-issues","Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices.","https:\u002F\u002Fgithub.com\u002FAcauhi99\u002Fopencode-agent-system\u002Fblob\u002Fmain\u002Fskills\u002Fto-issues\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M74KD14VJAJZ8E4ENN0KP9GV","testing-plan","https:\u002F\u002Fgithub.com\u002FAcauhi99\u002Fopencode-agent-system\u002Fblob\u002Fmain\u002Fskills\u002Ftesting-plan\u002FSKILL.md",[],[]]