tdd
Test-Driven Development
Philosophy
Core principle: Tests should verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't.
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.
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.
Read references/tests.md for test naming rules and examples when writing tests. Read references/mocking.md for when and how to mock. Read references/test-tiers.md for organizing unit vs component tests. Read references/component-testing.md for UI component testing patterns.
Task Analysis
Two legitimate TDD styles. Pick one per feature; don't mix mid-feature. Actively classify the task before writing any tests.
Step 1 — Check for explicit request
More from maxmurr/skills
index-knowledge
Generate hierarchical AGENTS.md knowledge base for a codebase (root + complexity-scored subdirs), then align CLAUDE.md symlinks so Cursor/Claude see the same content. Use when user runs /index-knowledge, asks to regenerate AGENTS.md hierarchy, or refresh codebase knowledge docs.
8prompt-caching
Implements LLM prompt caching (KV caching) for Anthropic, OpenAI, and Google Gemini APIs. Use when optimizing LLM API costs with cached prompts, reducing time-to-first-token latency, adding cache_control breakpoints, debugging cached vs uncached token usage, or structuring prompts for maximum cache hit rates. Do not use for HTTP response caching, CDN or browser caching, Redis or in-memory application caching, LLM fine-tuning, embedding caching, or general API integration without caching concerns.
2prompt-master
Generates effective, well-structured prompts for LLMs using the Anthropic Prompt Template technique. Use when the user wants to create a new LLM prompt, restructure an existing prompt, or improve prompt quality. Do not use for general text writing, non-LLM content generation, prompt debugging, prompt evaluation, or running/testing prompts.
2prd-to-issues
Break a PRD into independently-grabbable Linear issues using tracer-bullet vertical slices. Use when user wants to convert a PRD to issues, create implementation tickets, or break down a PRD into work items.
1write-a-prd
Create a PRD through user interview, codebase exploration, and module design, then submit as a Linear issue. Use when user wants to write a PRD, create a product requirements document, or plan a new feature.
1writing-evals
Write evaluation suites using evalite. Generates .eval.ts files, scorers, and test data from code inspection. Use when creating evals, writing scorers, benchmarking AI capabilities, or setting up evalite in a package.
1