跳到正文
cccskills
免费在 GitHub 公开

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.

中文简介正在准备中。当前显示原文说明。

toy-crane/claude-code-playbook-template星标 77(GitHub 77 + cccskills 0)

实测评分 未实测

查看安装方法

包含的文件(2)

  • SKILL.md2.5 KB
  • agents/openai.yaml162 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Test-Driven Development

Apply these test-quality rules during each red → green cycle.

Read GLOSSARY.md, then use docs/decisions/README.md to load only the decision subjects relevant to the behavior under test. If code, spec, and a decision contract conflict at the decision level, surface the conflict instead of silently choosing one. Use current terms in test names and public interfaces.

Good tests

Test behavior through public interfaces so internal refactoring does not break tests. Use specification-style names that state the capability under test.

Mock only at system boundaries such as external APIs, time, and randomness; prefer a real test database over a mocked one.

Seams

A seam is the public boundary where a test observes behavior without reaching into internals.

Reuse an existing seam before creating one. Create a seam only for a stable use case or domain concept, not an implementation helper whose name may change.

Select test seams from the agreed behavior and existing public interfaces, prioritizing critical paths and complex logic. Briefly state the chosen seam and the behavior it will verify, then proceed with the first test.

Resolve technical uncertainty through repository evidence. Ask the user only when the expected behavior remains unclear or proceeding would change the agreed product contract.

Anti-patterns

  • Implementation-coupled: mocks internal collaborators, tests private methods, or verifies through a side channel. It breaks when implementation changes but behavior does not.
  • Tautological: derives the expected value using the same logic as the code, so the assertion passes by construction. Use an independent source such as a known literal, worked example, or spec.
  • Horizontal slicing: writes many tests before any implementation. Implement one failing test and its minimal code before choosing the next test.

Loop rules

  • Red before green. Write the failing test first, then only enough code to pass it. Do not anticipate future tests or add speculative features.
  • One slice at a time. Use one seam, one test, and one minimal implementation per cycle.
  • Refactor after green. Keep the tests green through the refactor. This loop opens no review of its own: reviewing the finished diff belongs to whatever workflow owns it, or to a review the user runs.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Audit and establish current agent context for the technologies that define a project's stack. Use when setting up a project for agent work, after selecting or adding a framework, library, developer tool, or hosted service, or when entering an existing project whose agent context has not been audited.

中文简介正在准备中。当前显示原文说明。

toy-crane/claude-code-playbook-template772026年10月21日 更新

Revise active `docs/specs/SLUG/` specs so they match what has shipped since they were written. Use when earlier work has landed and queued specs may now rest on stale assumptions, acceptance criteria, constraints, terms, or prototypes, or when implementation reports a spec as stale before changing source. Takes one or more spec folders, or every folder under `docs/specs/` when none is named. Do not use to shape a new spec from a problem and direction, which belongs to `shape-idea`, or to reconcile durable project context and retire shipped folders, which belongs to `maintain-project-context`.

中文简介正在准备中。当前显示原文说明。

toy-crane/claude-code-playbook-template772026年10月21日 更新

Build a complete dummy-data HTML prototype or a temporary comparison of up to three alternatives for a specific user situation. Use to settle a screen-based product before implementation or resolve a visual or interaction decision during shaping or prototype review. Do not use for production implementation or CLI, terminal, or voice interfaces.

中文简介正在准备中。当前显示原文说明。

toy-crane/claude-code-playbook-template772026年10月21日 更新

commit

免费

Create Git commits for the current request's in-scope changes as logical Conventional Commits. Always use this skill for an actual Git commit operation, including requests to commit or amend changes, save work in repository history, stage and record selected files, or group staged or unstaged changes into commits. Use it even when the request describes recording changes without saying "commit"; it performs the commit rather than only suggesting a message, and it does not push.

中文简介正在准备中。当前显示原文说明。

toy-crane/claude-code-playbook-template772026年10月21日 更新

Interview the user to define or revise the app's overall product direction, then preserve the confirmed meaning in root PRODUCT.md. Always use for a new app direction or any app-wide change to users, usage situations, problem, promised change, core loop, durable boundaries, experience principles, success signals, assumptions, or unknowns, even when PRODUCT.md is not named. Start from an existing definition or a rough app direction. Do not use for blank-page idea discovery, architecture, or shaping or specifying one feature or work unit.

中文简介正在准备中。当前显示原文说明。

toy-crane/claude-code-playbook-template772026年10月21日 更新

Render an explanation as a diagram, comparison, trace with real values, or annotated code. Use when the user asks to have a concept, decision, flow, or code explained, or says they do not follow.

中文简介正在准备中。当前显示原文说明。

toy-crane/claude-code-playbook-template772026年10月21日 更新

查看 toy-crane 的全部技能

报告此技能的问题