# /backend-scaffold [Handbook](../../README.md) · [Skill index](README.md) · [Runtime source](../../../.claude/skills/backend-scaffold/SKILL.md) ## Purpose Generate or extend the smallest usable backend API/worker slice from actual confirmed structure, model-source and validation choices. ## When to use You need a new backend skeleton or a meaningful extension that establishes backend boundaries, API/worker contracts and persistence behavior. ## When not to use Do not use it for unrelated UI work, a tiny fix in an established implementation, or empty ornamental layers without a usable slice. ## Invocation ```text /backend-scaffold Create the first booking API slice. ``` Autocomplete hint: ` [stack] [model source] [validation]`. Required information can be supplied in context; this is not a shell command or a CLI parser. Use plain-language arguments. See [argument conventions](../../skill-usage.md) for notation and permission boundaries. **Minimal example:** ```text /backend-scaffold Create the first booking API slice. ``` **With optional context:** ```text /backend-scaffold Create the booking API slice with ASP.NET Core, layered modules, dummy entities and request/domain validation; confirm unresolved choices first. ``` ## Inputs | Input | Requirement | If omitted | |---|---|---| | backend slice | Required | Reuse request/brief; otherwise ask. | | stack and design choices | Required before generation | Inspect confirmed design.json; use design-interview for missing choices. | | model source and validation | Required before generation | Ask rather than silently choose dummy entities or validation mode. | | schema artifact | Required if schema mode | Inspect/pin the local artifact; block dependent entities if unavailable. | **No arguments:** Inspect project/design records; ask for the backend slice and any missing material choices. Optional inputs are discovered where reliable; recommendations do not become confirmed choices. Conditional requirements must be resolved before their dependent action. Required information is enforced by skill instructions, not by native autocomplete. The detailed procedure is [linked directly from SKILL.md](../../../.claude/skills/backend-scaffold/references/workflow.md). ## What it does 1. Inspect existing code and ownership; use onboarding if needed. 2. Invoke design-interview for missing/changed choices, preserving settled answers. 3. Use architecture-design to justify boundaries/ADRs. Read only relevant backend guidance plus data/messaging guidance when needed. 4. Generate models according to the chosen mode: fictional dummy, real requirements, supplied schema, existing models, or none. Preserve chosen no-persistence behavior. 5. Implement the chosen first slice, actual error/contract behavior and selected validation/tests. Add CQRS/event/saga mechanisms only if required by the agreed design. 6. Inspect diffs, run authorized actual checks, request independent review and update setup/state/roadmap. ## Outputs and ownership Actual scoped backend files and selected tests/configuration in the chosen application layout; schema mapping evidence, omitted coverage and setup/check commands. Backend-only profiles do not silently generate a frontend. ## Questions and decisions Backend, layering/domain model, CQRS/events/sagas, persistence/model source, validation, API/auth and tests are resolved through the interview. Missing schema or contradictory choices blocks dependent generation. Explicit no-validation/no-model/test-defer selections remain explicit. ## Permissions and side effects Main conversation permissions; no granted Bash/package/model powers. Supplying a schema does not authorize database connections, SQL execution or destructive migrations. Package installs and external services need approval even after choices are confirmed. ## Validation and completion A design check is a prerequisite, not application proof. Inspect actual generated files and run installed build/tests where authorized. Schema hashes do not establish ORM/dialect compatibility. If tests were deferred, report NOT_IMPLEMENTED. Significant work gets read-only independent review. ## Failure and recovery Do not invent tables, validators, packages or APIs to fill missing evidence. Preserve existing models where chosen; ask about mismatched schema/provider contracts. Use bounded retry after a reasoned fix; then record actual blocker/next action rather than claiming success. ## Example ```text /backend-scaffold Implement the first booking API slice from our saved design choices. Use the supplied pinned schema, preserve its keys and nullability, and report actual build/tests plus any missing dependencies. ``` This is a usage example, not evidence that a live model completed the task. ## Related components [design-interview](design-interview.md) · [architecture-design](architecture-design.md) · [implement-change](implement-change.md) · [codebase-onboarding](codebase-onboarding.md) See [helper commands](../helpers.md), [configuration](../configuration.md), [workflow selection](../../when-to-use-what.md) and [known qualification limits](../../../reports/DOCUMENTATION-VALIDATION.md).