Skip to content
cccskills
FreePublished on 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.

The English summary is being prepared. Showing the original description.

toy-crane/claude-code-playbook-template77 stars(GitHub 77 + cccskills 0)

Run score Not tested

See how to install

Files included (2)

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

SKILL.md (original)

Review the instructions the agent will receive before you install.

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.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

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.

The English summary is being prepared. Showing the original description.

toy-crane/claude-code-playbook-template77Updated Oct 21, 2026

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`.

The English summary is being prepared. Showing the original description.

toy-crane/claude-code-playbook-template77Updated Oct 21, 2026

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.

The English summary is being prepared. Showing the original description.

toy-crane/claude-code-playbook-template77Updated Oct 21, 2026

commit

Free

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.

The English summary is being prepared. Showing the original description.

toy-crane/claude-code-playbook-template77Updated Oct 21, 2026

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.

The English summary is being prepared. Showing the original description.

toy-crane/claude-code-playbook-template77Updated Oct 21, 2026

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.

The English summary is being prepared. Showing the original description.

toy-crane/claude-code-playbook-template77Updated Oct 21, 2026

See all skills by toy-crane

Report a problem with this skill