/bee:tdd-practicesfrom bee
Guides the TDD cycle (red-green-refactor), outside-in double-loop architecture, test isolation, and test naming. Useful for writing test plans and reviewing test quality.
Ships in bee. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The fundamental TDD cycle:
Each cycle should take minutes, not hours. Small cycles build confidence and momentum.
For architectures with clear layer boundaries:
Outer loop: Integration test at the boundary (HTTP request in, response out). Stays RED until all inner layers are wired.
Inner loop: Unit tests for each layer, working inward:
Key insight: the mocks you write in domain tests define the contracts. Those contracts become port interfaces. Architecture emerges from the tests.
Test behavior, not implementation. A good test survives a refactor. If you rename a private method and a test breaks, the test was testing implementation.
Good test: "When a user submits a valid order, the total reflects the discount." Bad test: "The calculateDiscount private method returns 0.15 for orders over $100."
Each test should have one reason to fail. If a test can fail for three different reasons, it's three tests pretending to be one.
Test names describe the scenario:
rejects_expired_discount_codesapplies_bulk_pricing_for_orders_over_ten_itemsreturns_404_when_product_not_foundUnit tests should not depend on:
Use test doubles (mocks, stubs, fakes) to isolate the unit under test. But don't mock what you don't own — wrap external dependencies in your own adapter and mock that.
Unit tests: Fast, isolated, test one behavior. Run hundreds per second. Use for business logic, validation, data transformation.
Integration tests: Slower, test real connections. Use for database queries, API calls, file I/O, end-to-end user journeys.
The split: Most of your tests should be unit tests. Integration tests confirm the wiring works. A typical ratio: 80% unit, 20% integration.
When to go integration-first: If the feature is primarily about connecting things (CRUD endpoint, data pipeline, API gateway), start with an integration test. If the feature has complex business rules, start with unit tests for the rules.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
tdd, test-isolation, outside-in, test-naming, red-green-refactor
npx claudepluginhub incubyte/ai-plugins --plugin bee21 skills in this plugin
/ai-ergonomicsThis skill should be used when evaluating how well code supports LLM-assisted development. Contains context window friendliness, explicitness, module boundaries, test-as-spec, and naming criteria./ai-workflowThis skill should be used when explaining why Bee follows spec-first TDD workflows, or when teaching mode is on. Contains the reasoning behind spec → plan → test → code ordering./architecture-patternsThis skill should be used when evaluating architecture options, checking dependency direction, or deciding between onion, MVC, and simple patterns. Contains YAGNI-based decision criteria./bee-stateThis skill should be used when updating workflow state in bee-state.local.md. Contains the full command reference for update-bee-state.sh including init, set, get, clear, all flags, and multi-line field syntax./boundary-generationThis skill should be used after discovery completes on a greenfield project when the discovery document contains a Module Structure section. Contains the full procedure for parsing module boundaries, generating BOUNDARIES.md, and optionally linking it from CLAUDE.md./brainstormingThis skill should be used when the user wants to brainstorm, explore ideas, think through options, says 'let's brainstorm', 'what are our options', 'how might we', 'what if we', 'help me think through', 'explore approaches', or presents an open-ended problem without a clear solution. Covers cross-domain thinking where changing one dimension (product, tech, UX) can simplify another.Other plugins' skills for the same job