[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7E91TBN26XM0MGPD7K36DRF":3,"skill-same:01M7E91TBN26XM0MGPD7K36DRF":47},{"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":29,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7E91TBN26XM0MGPD7K36DRF","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.","caudra\u002Fcaudra","caudra","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F323451438?v=4","01M7E8TXZKWCW4S2EPW520718N","Caudra","01M7E8TY09J7AVFRE6S2179890",11,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fcaudra\u002Fcaudra\u002Fblob\u002Fmain\u002Fcaudra-mattpocock\u002Ftranslated\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 → refactor 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. Every section applies on every cycle: consult them before and during the loop, not after.\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\nIn Plan mode, read the existing session `plan` first. Only the main agent merges proposed seams and test slices into it, preserving existing scope and decisions; tasks return drafts. Writing tests or implementation requires Build mode (the user switches with Tab). Once the seams and scope are agreed, continue red → green → refactor without asking for approval each slice.\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\n**Test only at pre-agreed seams.** Before writing any test, write down the seams under test and confirm them with the user. No test is written at an unconfirmed seam. You can't test everything, so agreeing the seams up front is how testing effort lands on the critical paths and complex logic instead of every edge case.\n\nWhen available, use `source_code_context` to locate relevant behavior, `file_index` before focused reads, and `source_code_refs` to inspect callers and existing tests at candidate seams; otherwise use `file_glob`, `file_grep`, and `file_read`. Counts are lower bounds: missing dynamic calls or tests are not proof of absence.\n\nAsk with the `question` tool: \"What's the public interface, and which seams should we test?\" Give each proposed seam a one-line note on what it catches and what it misses. If the tool or its answer channel is unavailable, present the question in plain text and say which decision is needed to continue. Unanswered, deferred, skipped, or dismissed questions do not authorize dependent work. Reuse seams already agreed for this scope; ask again only when the seam or scope changes.\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 `mattpocock\u002Fcodebase-design` with the `skill` tool 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## 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- **Observe both results.** Shell admission or a running-job receipt is not a test result. Wait for terminal completion and verify red fails for the intended behavior and green passes. Use `tool_output` for truncated evidence only when a retained output handle is provided; otherwise report the missing evidence, never invent a handle. Report blocked or pending checks rather than claiming success.\n- **One slice at a time.** One seam, one test, one minimal implementation per cycle.\n- **Refactor on green.** Once a slice passes, tidy what it touched (names, duplication, the code behind the seam) with every test staying green, then start the next red. Keep it to that slice: restructuring across modules belongs to review (`mattpocock\u002Fcode-review`), not the loop.\n","# Test-Driven Development\n\nTDD is the red → green → refactor 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. Every section applies on every cycle: consult them before and during the loop, not after.\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\nIn Plan mode, read the existing session `plan` first. Only the main agent merges proposed seams and test slices into it, preserving existing scope and decisions; tasks return drafts. Writing tests or implementation requires Build mode (the user switches with Tab). Once the seams and scope are agreed, continue red → green → refactor without asking for approval each slice.\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\n**Test only at pre-agreed seams.** Before writing any test, write down the seams under test and confirm them with the user. No test is written at an unconfirmed seam. You can't test everything, so agreeing the seams up front is how testing effort lands on the critical paths and complex logic instead of every edge case.\n\nWhen available, use `source_code_context` to locate relevant behavior, `file_index` before focused reads, and `source_code_refs` to inspect callers and existing tests at candidate seams; otherwise use `file_glob`, `file_grep`, and `file_read`. Counts are lower bounds: missing dynamic calls or tests are not proof of absence.\n\nAsk with the `question` tool: \"What's the public interface, and which seams should we test?\" Give each proposed seam a one-line note on what it catches and what it misses. If the tool or its answer channel is unavailable, present the question in plain text and say which decision is needed to continue. Unanswered, deferred, skipped, or dismissed questions do not authorize dependent work. Reuse seams already agreed for this scope; ask again only when the seam or scope changes.\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 `mattpocock\u002Fcodebase-design` with the `skill` tool 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## 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- **Observe both results.** Shell admission or a running-job receipt is not a test result. Wait for terminal completion and verify red fails for the intended behavior and green passes. Use `tool_output` for truncated evidence only when a retained output handle is provided; otherwise report the missing evidence, never invent a handle. Report blocked or pending checks rather than claiming success.\n- **One slice at a time.** One seam, one test, one minimal implementation per cycle.\n- **Refactor on green.** Once a slice passes, tidy what it touched (names, duplication, the code behind the seam) with every test staying green, then start the next red. Keep it to that slice: restructuring across modules belongs to review (`mattpocock\u002Fcode-review`), not the loop.\n",{"name":5,"description":7},"main","0f03370f86af943c19c2069f7e1d5d43e73ffbd2","caudra-mattpocock\u002Ftranslated\u002Fskills\u002Ftdd",1,"https:\u002F\u002Fgithub.com\u002Fcaudra\u002Fcaudra","https:\u002F\u002Fcaudra.ai","https:\u002F\u002Fgithub.com\u002Fcaudra","The complete coding agent for your terminal.","2026-11-04 22:18:53",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add caudra\u002Fcaudra --skill tdd",{"tool":39,"command":40},"bunx","bunx skills add caudra\u002Fcaudra --skill tdd",{"tool":42,"command":43},"pnpm","pnpm dlx skills add caudra\u002Fcaudra --skill tdd","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcaudra\u002Fcaudra\u002Fblob\u002Fmain\u002Fcaudra-mattpocock\u002Ftranslated\u002Fskills\u002Ftdd\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7E9CBRVDFYTA5GBY8F1XQQE","caudra-workflow-dev","Write, validate, run, and debug Caudra workflows. A workflow is a durable Rhai script that fans work out to subagents in phases, checks what comes back, and keeps a journal so it can resume. Load this before writing a workflow file, before calling the workflow tool, or when a repeatable multi-agent plan would serve the user better than doing the steps by hand.","https:\u002F\u002Fgithub.com\u002Fcaudra\u002Fcaudra\u002Fblob\u002Fmain\u002Fcaudra-workflow\u002Fskill\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M7E9C6YC8R09DS8DP8XZ23YN","why","Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds. Discovers available MCPs and queries each evidence category (source control, issue tracker, long-form docs, real-time chat, infrastructure observability, error tracking, product analytics warehouse) in parallel, then returns a cited read on decisions and tradeoffs. Use how for runtime behavior.","https:\u002F\u002Fgithub.com\u002Fcaudra\u002Fcaudra\u002Fblob\u002Fmain\u002Fcaudra-pstack\u002Fupstream\u002Fpstack\u002Fskills\u002Fwhy\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7E9C5KHAJY5TY81E04XMJBN","unslop","Cut AI tells from any writing.","https:\u002F\u002Fgithub.com\u002Fcaudra\u002Fcaudra\u002Fblob\u002Fmain\u002Fcaudra-pstack\u002Fupstream\u002Fpstack\u002Fskills\u002Funslop\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"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},"01M7E9C3TZ3KJS5HE7PQPQ70DF","typescript-best-practices","TypeScript best practices. Use when reading or editing any .ts or .tsx file.","https:\u002F\u002Fgithub.com\u002Fcaudra\u002Fcaudra\u002Fblob\u002Fmain\u002Fcaudra-pstack\u002Fupstream\u002Fpstack\u002Fskills\u002Ftypescript-best-practices\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},"01M7E9C0FK9PPRYWRM7451053P","technical-writing","Layered technical-writing standard: Diátaxis structure, Google developer style sentences, STE instruction rules, Global English syntax. Use for \u002Ftechnical-writing or when writing or reviewing docs, RFCs, readmes, PR descriptions, or commit messages.","https:\u002F\u002Fgithub.com\u002Fcaudra\u002Fcaudra\u002Fblob\u002Fmain\u002Fcaudra-pstack\u002Fupstream\u002Fpstack\u002Fskills\u002Ftechnical-writing\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7E9BWAVMA3BD4B63QV635RQ","teach","Explain a body of work plainly so a person actually understands it. Runs the `how` and `why` skills and weaves what they find into one clear explanation. Use for 'teach me this', 'help me really understand X', 'explain this change or subsystem to me'.","https:\u002F\u002Fgithub.com\u002Fcaudra\u002Fcaudra\u002Fblob\u002Fmain\u002Fcaudra-pstack\u002Fupstream\u002Fpstack\u002Fskills\u002Fteach\u002FSKILL.md",[],[]]