backend-architecture
Decide, record and apply the backend stack and architecture pattern. Use when backend work starts with no recorded stack, or a framework/DB/pattern must be…
от crewforth★ 26 звёзд на GitHub
Установить backend-architecture в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Backend Architecture (stack resolution + pattern)
Trigger phrases: "tech stack", "which framework", "choose a database", "backend pattern", "project structure", "new api", "new handler", "write a command", "add a query", "validator", "which stack should", "set up the project structure", "language or framework", "layered or", "vertical slice", "hexagonal", "clean architecture"
The "how" behind crew-backend-expert, and the stack step crew-planner and crew-database-expert rely on.
Model discipline, not a gate: no hook checks that the stack was resolved before code was written.
When
- A backend task starts and
CLAUDE.md ## Stackis empty or silent on the part the task needs. - Someone asks which language, framework, database or pattern to use.
- A new service, API, module or handler is being shaped and the pattern is not obvious from neighbouring code.
1 · Stack resolution — in this order, stop at the first answer
The request says it. "Add a Go service…" is an answer. Use it; record it if the section was empty.
CLAUDE.md ## Stacksays it. The project's own section (below Crewforth's@.claude/DISCIPLINE.mdimport), notDISCIPLINE.md. A filled section is a decision: follow it.The repo says it. Look for manifests at the root and one level down (
backend/,server/,src/,apps/*):Manifest Runtime package.jsonNode (TypeScript if tsconfig.json)go.modGo pyproject.toml/requirements.txtPython *.csproj/*.sln.NET pom.xml/build.gradle*JVM (Java/Kotlin) Cargo.tomlRust composer.jsonPHP GemfileRuby The framework and database usually follow from the same manifest's dependencies and from config files (
docker-compose*.yml, connection-string env names, migration folders). Two backends in one repo is a monorepo, not an ambiguity: record each with its path.Still open (a greenfield repo) → ask, once. Use
AskUserQuestionwith at most four questions, only for what is still unknown: runtime/language · web framework · database · architecture pattern. Every question has exactly one option whose label ends with(Recommended)(its description gives the one-line reason) and exactly one option labelledDecide for me, verbatim — the user's way to hand the choice back to you. NoAskUserQuestionin this session (headless, or the tool is off)? Write the same questions as text, with the same two labels on every question, and stop there.
Record it. Write the answer into the ## Stack section of the project's CLAUDE.md (Runtime · Web framework ·
Database + migration tool · Architecture pattern), then record the choice with the adr skill (and board.sh decide
when the team board is in use). If "Decide for me" was picked, the ADR says so: chosen by the agent at the user's
request, with the reason for each pick.
Never ask twice. A recorded stack is followed, not re-litigated. It changes only when the user explicitly asks; then update the section and supersede the ADR. Headless / non-interactive and nobody to ask → stop and report the open question; do not guess a stack and start writing code.
2 · Pattern menu — default to the simplest one that fits (YAGNI)
| Pattern | Fits | Too much when |
|---|---|---|
| Layered (controller → service → repository) | CRUD-heavy services, small teams, most first versions | rules sprawl across services and every change touches every layer |
| Clean / hexagonal (domain core, ports, adapters) | rich domain rules, several delivery channels or swappable infrastructure | the "domain" is mostly forms over tables |
| Vertical slice (one folder per feature, request → handler → response) | many independent features, teams owning features end to end | features share most of their logic |
| CQRS (separate command and query paths) | reads and writes that differ sharply in shape, load or consistency | reads and writes look the same — it doubles the code for no gain |
Existing code wins over this table: a repo already on a pattern keeps it, even where the table would pick another. A change of pattern is an architecture decision → design summary + ADR, never a side effect of a feature.
3 · Rules that hold in any language
- One error contract. Every endpoint returns failures in the same envelope (e.g. RFC 9457 problem details or the project's own shape) with the correct status: 400 invalid input · 401 unauthenticated · 403 forbidden · 404 not found (also for another tenant's resource — do not leak existence) · 409 conflict · 422 rule violated · 5xx only for the server's own fault. No raw exceptions or stack traces in responses.
- Validate at the edge. Parse and validate input where it enters (request DTO + schema/validator), so the core only sees
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл backend-architecture?
Decide, record and apply the backend stack and architecture pattern. Use when backend work starts with no recorded stack, or a framework/DB/pattern must be chosen.
Как установить скилл backend-architecture?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл backend-architecture запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…