Create business use cases with TDD

create-use-caseskillsetup L2381
majiayu000/claude-skill-registry
What it does

Generate TDD test-first business logic

Best for

Rapid business logic generation following TDD red-green-refactor cycle with enforced PHP architecture patterns.

Inputs
  • · Business context (bc): e.g. Admin
  • · Entity name: e.g. Article
  • · Action: e.g. Rename
  • · Field list: e.g. ["name"]
Outputs
  • · Request interface (ActionEntityRequest.php)
  • · UseCase readonly class with execute() method
  • · Unit test file with DataBuilder mocks
  • · Passing tests after RED-GREEN-REFACTOR cycle
Requires
  • · Bash
  • · Read
  • · Glob
Preconditions
  • · TDD workflow skill enabled
  • · PHP project structure with BC, Entity, UseCase directories
  • · Maker command available or manual file creation
Failure modes
  • · Incorrect Repository vs Finder choice breaks CRUD semantics
  • · Test fails if mock expectations are set to wrong cardinality
Trust signals
  • · Test-first workflow with TDD phases documented
  • · Multi-phase deterministic workflow