Bootstrap a new local-first, zero-cost dev project (server app, CLI/TUI or library) - DDD with lint-enforced layers, a ubiquitous-language glossary, Docker Compose, SQLite/PostgreSQL and generated OpenAPI for server apps, GitHub CI, and standing instructions. Use when the user wants to start, scaffold or bootstrap a new project or repository.
Ships in brain. 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.
Use this skill when the user wants to start, scaffold, or bootstrap a new software project or repository. It covers the bootstrap only: from choosing the stack to the first commits and the project's standing instructions. The way of working afterwards lives in the process skills: write-tests, review-changes, commit-changes and document-changes. Follow them during the bootstrap too.
Before following a step, check the project's CLAUDE.md and AGENTS.md, and the files they link to, for rules on the same step. Where they conflict with this skill, follow the project. Where they add to it, do both.
These rules apply to every project, whatever the stack:
down or rollback methods. A mistake is fixed with a new migration. Local resets rebuild the schema from scratch (e.g. migrate:fresh), which needs no down methods..github/ templates and the gh CLI when it is available. GitHub is not used to deploy anything.compose.yaml plus a project Dockerfile), served by a real web/app server. Never use framework-specific Docker wrappers (e.g. Laravel Sail) or framework dev servers. A CLI or TUI that drives the host (tmux, the shell, the user's files) runs natively, with no Docker: a container would drive the wrong machine.CLAUDE.md names every concept once, with its user-facing word and its code identifiers (see Step 10). A new concept gets an entry before it gets code. Once the user-facing words are released (config keys, CLI, UI text), code that disagrees with them is renamed, never the reverse.write-tests, the end-of-change question by review-changes, commits by commit-changes, docs by document-changes.A project stays in its early phase until the user explicitly says it is moving on (e.g. to hosting or pilot clients). Until then:
concurrency with cancel-in-progress: true, cache dependencies, and keep the workflow to the jobs listed in Step 9. Do not use paid runners or features (larger runners, Codespaces, paid Packages storage).vX.Y.Z tag after the tests pass, with the stack's release tool.If the user asks for something that breaks these rules during an early phase, point that out in one line and ask whether the project is moving out of the early phase.
Apply these to all generated code, including the example slice, and write them into the project's CLAUDE.md:
Email, Money, OrderId). They are immutable, validated on construction, and compared by value.Money::of(100, Currency::EUR), Order::place(...)), intention-revealing method names, immutable with...() methods that return new instances, and chaining where it reads like a sentence. Do not chain for its own sake, and do not use static helper grab-bags.final, properties are readonly where the language allows, types are strict, and domain errors are specific exception classes with named constructors (InsufficientFunds::forAccount($id)).Everything specific to a language or framework lives in its stack skill. Once the stack is chosen in Step 1, load it and follow it alongside the steps below:
laravel-stack: Laravel (PHP)symfony-stack: Symfony (PHP)typescript-stack: TypeScript / Nodepython-stack: Pythongo-stack: Go, including CLIs and TUIsFor a stack with no stack skill, apply the same principles with that stack's usual tools, and offer to write its stack skill when the bootstrap is done.
Before creating any files, ask with AskUserQuestion, or in plain text if that tool is unavailable. Combine the questions into as few rounds as possible:
Billing or Catalog. Offer to start with one.gh repo create (public only if the user asks), use an existing remote, or stay local only.Do not ask about the local environment (Docker Compose for server apps, native for CLIs and TUIs), the OpenAPI approach (always generated), or hosting (none in the early phases).
For a CLI, TUI or library, skip the questions about Docker and OpenAPI, and the steps and Step 3 rows they cover.
If the user has already answered some of these, do not ask them again. If no one is available to answer, choose sensible defaults (latest stable language version, PostgreSQL for server apps, SQLite for CLIs and prototypes, private repo), list them at the top of your reply, and continue.
composer create-project laravel/laravel, nest new, or uv init. Change nothing yet: not the database settings, not the framework's Docker wrapper, not the default migrations.git init -b main if the installer did not, then make sure the scaffold's .gitignore is present.chore: bootstrap <framework> <version>. This commit skips the review-changes question, since it contains no hand-written code.Each step below is one change and one commit, in roughly this order. Skip a step if it does not apply. End each step as review-changes says.
| Step | Example commit |
|---|---|
Editor and repo hygiene (.editorconfig, .gitattributes, .dockerignore) | chore: add editorconfig, gitattributes and dockerignore |
| Pin the language version in every location (Step 4) | build: pin php 8.4 across the project |
| Docker Compose environment, server apps only (removing the framework's Docker wrapper and dev server usage if present) | build: add docker compose environment |
| Database configuration (and Compose service if PostgreSQL) | build: configure postgresql / build: configure sqlite |
Forward-only migrations (strip down from existing migrations and stubs) | build: make migrations forward-only |
| Code style / formatter | build: add pint |
| Static analysis | build: add phpstan at max level |
| Automated refactoring (if chosen) | build: add rector |
| Test framework and config | test: set up pest |
| DDD directory structure and autoloading | refactor: introduce domain-driven structure |
| Architecture tests or linter allow-lists enforcing layer boundaries | test: add architecture tests / build: allow-list what domain and app may import |
| Example vertical slice | feat(<context>): add <use case> |
| OpenAPI generation, export command, and committed spec | docs: add generated openapi documentation |
| GitHub Actions CI | ci: add github actions workflow |
| GitHub templates and Dependabot | chore: add github templates and dependabot |
| README, docs skeleton and agent instructions with the glossary | docs: add readme and agent instructions |
Before every commit, and at the end of each iteration of work, run the formatter, static analysis and every test suite, and make sure they pass. Never commit a red build.
Choose the language version once, e.g. PHP 8.4, and use exactly that value in every place it appears. Where a tool can read the version from a file, point it at that file rather than repeating the number. The stack skill lists the places for its language. The PostgreSQL major version is the same in compose.yaml and in the CI service container.
When the version changes later, change every location in the same commit. The reviewer checks this.
Server apps only.
Dockerfile for local development, based on the official language image, with the version taken from a build ARG set to the pinned value. Install only the extensions and tools the project needs. Do not add a production stage during the early phases.compose.yaml (not docker-compose.yml, and no top-level version: key) with:
app: built from the Dockerfile, with the source bind-mounted, running as a non-root user whose UID/GID matches the host.postgres when PostgreSQL is used (see Step 7), with depends_on and condition: service_healthy.127.0.0.1 so nothing is exposed beyond the developer's machine..env. Commit .env.example with local-only values and no third-party keys. Never commit .env.Makefile with only the targets that are used: up, stop, shell, test, check, docs, and seed once seeders exist.Organize by bounded context first, then by layer:
src/
<Context>/
Domain/ # Entities, value objects, domain events, repository interfaces, domain services. Pure language, no framework.
Application/ # Use cases / command & query handlers, DTOs, ports. No framework.
Infrastructure/ # Framework- and vendor-specific adapters: ORM repositories, mail, queues, fake external services.
Shared/ # Shared kernel, created only when something is genuinely shared.
The stack skill gives the language's own spelling of this layout.
The framework's own HTTP layer (controllers, requests, resources, routes) stays thin. It maps HTTP to application commands or queries and maps results back. This layer is also where the OpenAPI generator reads from, so it must be well typed (see Step 8).
Dependency rule: Domain depends on nothing. Application depends only on Domain. Infrastructure and the framework layer depend inward. Enforce this with the tool the stack skill names.
Ports go where their concept lives. Ports about domain concepts (repositories, external systems the domain drives) live in Domain. Ports for talking to the user (forms, confirmation prompts, an editor, pickers) live in Application. Every adapter, UI screens included, lives in Infrastructure. Screens and forms hold no logic: they only collect answers, which domain constructors check, or a choice, which a use case carries out.
Create one small example vertical slice in the first context: a value object, an entity with real behaviour, a repository interface, a use case, an in-memory repository, meaningful unit tests, and one endpoint that appears in the generated OpenAPI spec. It should show the design principles in practice. Keep it small, and do not add empty folders or placeholder classes.
Persistence is an infrastructure concern:
postgres service to compose.yaml using the official postgres image at the pinned major version, with a named volume and a pg_isready healthcheck.<app>_test, so running tests never wipes development data. An init script mounted into /docker-entrypoint-initdb.d/ can create it..env.example contains the full set of connection variables with local defaults, using DB_HOST=postgres (the Compose service name).postgres service container at the same major version, with a health check, and point the test environment at it.uuid columns) are fine in Infrastructure and migrations, but must not leak into Domain.database/database.sqlite (or the stack's equivalent) and gitignore it. It lives on the bind-mounted source, so it persists across container restarts. Create it on setup with a script or package-manager hook.PRAGMA foreign_keys = ON) and WAL mode for app usage.:memory: for speed.app service and the web server. CI needs no service container.postgres for development. Local tests default to SQLite :memory:.docs/openapi.json (OpenAPI 3.1 where the generator supports it), e.g. make docs. Commit the exported file so API changes show up in PR diffs.openapi job that regenerates the spec, fails if git diff --exit-code docs/openapi.json shows changes (the committed spec is stale), and lints it with npx @redocly/cli lint docs/openapi.json..github/workflows/ci.yml runs on push and pull_request to main, with concurrency set to cancel superseded runs, and jobs for:
Every job takes the language version from the pinned value (Step 4). Run the quality jobs natively with the language setup actions, which is faster and uses fewer free minutes than running them inside Compose. Cache dependencies. No deploy or release jobs.
.github/pull_request_template.md with a short checklist:
.github/dependabot.yml for the package ecosystem, for GitHub Actions, and for Docker if used, on a weekly schedule to limit CI runs.
The backlog lives in GitHub Issues, not in a file in the repo. Write the gh conventions the agent should follow into docs/agents/issue-tracker.md.
If the user chose to create the remote: gh repo create <name> --private --source=. --push (or --public if asked). Otherwise, push only when asked.
Write a CLAUDE.md (and an identical AGENTS.md if the user wants one for other tools) at the repo root so these rules apply to all future work, not just the bootstrap. It holds what is specific to this project; the process skills hold how work is done, and this file overrides them where it says so.
# Project rules
## Phase
- Early phase: local-only and zero-cost. No hosting, deployment, paid services or API keys, and no pilot clients or real users. External services are faked behind domain ports or replaced by local containers (e.g. Mailpit). Ask before changing this.
## Design
- SOLID and DDD: src/<Context>/{Domain,Application,Infrastructure}. Domain and Application never import the framework; <architecture tests | depguard allow-lists> enforce this.
- Ports about domain concepts live in Domain; ports for talking to the user live in Application; every adapter lives in Infrastructure. Screens and forms hold no logic.
- Rich domain model, immutable value objects, expressive named constructors, fluent intention-revealing APIs. Final classes, readonly properties and strict types by default.
- Minimalism: add only what is needed now. No speculative abstractions, unused dependencies or placeholder files.
## Ubiquitous language
Code, configs, CLI, UI text, docs and commits use these words, and only these. Once the user-facing words are released, code that disagrees is renamed. A new concept gets an entry here before it gets code.
| Term | Meaning | Config / CLI / UI | Code |
| --- | --- | --- | --- |
| <term> | <one sentence; say what it is not, e.g. "Not 'stop'"> | <key, flag or screen> | <types and methods> |
## Environment
- <Docker Compose only, no framework Docker wrapper or dev server. Run commands through the Makefile or `docker compose exec app ...`. | No Docker: <the tool> drives the host's real <tmux, shell, files>.>
- <Language> version is <X.Y> everywhere (<the places from the stack skill>). Change all of them together, or none.
- Storage: <PostgreSQL | SQLite | PostgreSQL main, SQLite for fast tests | plain YAML files under <dir>, with a JSON Schema kept in step and checked by a test>. Persistence lives in Infrastructure only. Fake data only, from factories and seeders.
- Migrations are forward-only: never write `down` methods and never edit a merged migration. Fix mistakes with a new migration.
## API docs
- OpenAPI docs are auto-generated. **After any change to an endpoint, request validation, response resource, status code, or auth requirement, run `make docs` and commit the updated docs/openapi.json in the same commit.** CI fails if it is stale. Never hand-edit it; fix the code it is generated from.
## Processes
- Tests follow `write-tests`, reviews `review-changes`, commits `commit-changes`, and docs `document-changes`. Rules added below override them for this project.
- At the end of each iteration of work, run every test suite and every lint, and fix what fails before going on.
- Docs: <list which doc owns what>.
- Review checklist additions: OpenAPI regenerated for API changes, migrations forward-only, language version consistent everywhere, nothing that needs hosting or money.
Fill the glossary with the example slice's concepts. Put the actual commands (build, run, test, lint, docs; up and stop for Compose) in docs/development.md and point this file at it, so they live in one place. Also add one short Mermaid diagram of the layers and bounded contexts to docs/development.md; GitHub renders it.
Keep this file to rules and the glossary. How-tos the agent needs for specific jobs (driving the terminal tests, the issue tracker, recording a demo) go in docs/agents/<topic>.md, linked from here.
When the bootstrap is done, show the user:
git log --oneline of the bootstrap commitsThen suggest the next step: model the first real use case in the chosen bounded context.
What SKILL.md sets; muted values are Claude Code's defaults
/brain:start-projectfrom brain
npx claudepluginhub medilies/brain --plugin brain10 skills in this plugin
/commit-changesCommit with Conventional Commits v1.0.0, one logical change per commit, under the user's own git identity and with no AI attribution. Use whenever making a commit or writing a PR description./document-changesKeep docs true in the same commit as the code they describe - one home per fact, docs laid out by reader, ADRs as records, diagrams over walls of text. Use whenever a change touches behaviour, names, commands, config or architecture, and when writing or reorganizing docs./go-stackGo project preferences (versions, layer boundaries, database, OpenAPI, tools, CLIs and TUIs). Use whenever working in or bootstrapping a Go project.Other plugins' skills for the same job