tdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Apply vertical slice architecture to organize code by feature instead of by technical layer. Use when adding a new feature, endpoint, command, query, or use case. Use when deciding whether to create new files or edit existing ones. Use when implementing CQRS, mediator pattern, plugin architecture, event-driven patterns, or auto-discovery registration. Use when the user asks about additive architecture, feature folders, or minimizing edit surface. Also trigger when you notice yourself about to add a new method to an existing controller or service — that is the moment this skill is most needed.
Use when the user wants a hands-free loop where grabbing UI elements in the browser with React Grab feeds tasks to the agent automatically, with no copy-paste or manual handoff. Triggers: "watch react grab", "monitor my grabs", "auto-process react grab", "watch my clipboard for grabs". Not for a one-off paste of a single grab; this is the continuous, always-on loop.
Deploy the Hebrew Codenames co-pilot to its HF Space (shmulc/hebrew-codenames-copilot) by uploading changed files from hf_space/, and report the build stage. Use when asked to "deploy", "push to HF", "ship the Space", or "release the co-pilot".
Pull and summarize user feedback (👍/👎 on clues) for the Hebrew Codenames co-pilot from the private HF dataset shmulc/codenames-feedback. Use when asked to "check feedback", "any new feedback", "grab feedback", review clue thumbs-up/down, or see what users complained about.
QA the Hebrew Codenames engine — run the clue-legality regression, the clue-quality benchmark against the feedback set, and optionally verify the live HF Space. Use before committing engine changes, after tuning scoring or legality, or when asked to "run QA", "run the tests", "run the benchmark", or "check the engine still works".
Use this skill for playing, teaching, or moderating the Hebrew version of Codenames (שם-קוד). Triggers include requests to explain rules, generate clues, validate guesses, simulate games, or clarify legal/illegal actions. Especially for generating high-quality Spymaster clues that avoid opponent and assassin words.
| name | tdd |
| description | Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests. |
TDD 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. Every section applies on every cycle — consult them before and during the loop, not after.
When exploring the codebase, read CONTEXT.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.
Tests 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 survives refactors because it doesn't care about internal structure.
See tests.md for examples and mocking.md for mocking guidelines.
A seam is the public boundary you test at: the interface where you observe behavior without reaching inside. Tests live at seams, never against internals.
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 — agreeing the seams up front is how testing effort lands on the critical paths and complex logic instead of every edge case.
Ask: "What's the public interface, and which seams should we test?"
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.code-review skill), not the red → green implementation cycle.