| name | genesis |
| description | Bootstrap a new Claude Code project with full infrastructure. Use this when the user wants to create a new project, scaffold a project, or says "new project", "create", "bootstrap", or "build me". |
| user-invocable | true |
Genesis: Project Bootstrapper
You are executing the Genesis bootstrap workflow. Follow these phases strictly.
Phase 1: Interview
Read the user's request carefully. Extract everything you can before asking questions.
Before interviewing: Read personalisation.md and environment.md from the Genesis root. These provide user preferences and platform details. If either file is missing, trigger first-time setup (see CLAUDE.md) before proceeding. If environment.md exists but lacks a ## Claude Plan section, prompt the user for their Claude plan tier and append the section before continuing (see CLAUDE.md migration check).
Required information:
- Project name (kebab-case)
- Purpose (one sentence)
- Tech stack (language, framework, runtime)
- Key integrations (databases, APIs, auth, external services)
Hosting environment and project base path are already captured in environment.md. Do not re-ask. Confirm the project path with the user: "This project will be created at <project-base>/<name>/." Allow per-project overrides if the user specifies a custom location.
Rules:
- If the user provided 3+ of these, ask only what's missing (1-2 questions max)
- If the user was vague, ask up to 4 targeted questions
- Never re-ask what was already stated
- Use AskUserQuestion for a clean interview experience
Phase 2: Plan
Read the scaffold profile from environment.md > Claude Plan. Factor the profile into agent and skill selection (lean = fewer agents/skills, standard = moderate, full = comprehensive). Consult agent-catalogue.md profile tags.
Once you have all information, produce this plan and present it:
Project: <name>
Path: <project-base>/<name>/
Stack: <language, framework, key dependencies>
Agents (domain):
- <agent-name> -- <one-line purpose>
Agents (workflow):
- test-runner -- run and analyse test results
- code-reviewer -- review code quality and correctness
- doc-writer -- generate and update documentation
Skills (base):
- /test -- run the test suite
- /lint -- run linters and formatters
- /review -- trigger code review
- /commit -- stage and commit changes
Skills (dynamic):
- /<skill-name> -- <one-line purpose>
MCP Servers:
- <server-name> (or "None" if no integrations)
Context Profile: <lean | standard | full> (<context_window> tokens)
Estimated infrastructure: ~<N>k tokens (<P>% of context)
Folder Structure:
<tree of top-level directories>
For lean profiles, add a note: "Scaffold sized for Pro plan (200k context). Use /compact if you notice slowdowns in long sessions."
Wait for user confirmation. If they request changes, adjust and re-present.
Phase 3: Generate
After confirmation, create the project.
Prerequisite check: Before generating, verify the user has the required tools installed by running which or command -v checks for: claude, git, node. Also check for stack-specific tools (e.g. python, go, cargo, ruby, java). If any required tools are missing, list them with installation instructions for the user's hosting environment and wait for confirmation before proceeding.
Read the templates and references before generating:
- Read
.claude/skills/genesis/templates/ for all template files
- Read
.claude/skills/genesis/references/stack-profiles.md for stack-specific conventions
- Read
.claude/skills/genesis/references/agent-catalogue.md for agent definitions
Generation order:
3.1 Directory structure
mkdir -p <resolved-path>/.claude/agents
mkdir -p <resolved-path>/.claude/skills/<skill-name> (for each skill)
mkdir -p <resolved-path>/docs
mkdir -p <resolved-path>/<stack-specific-dirs>
3.2 CLAUDE.md
Read the scaffold profile from environment.md. If lean, use templates/CLAUDE.md.lean.tmpl. Otherwise, use templates/CLAUDE.md.tmpl. Fill all placeholders with project-specific content. Ensure every section from the Global Rules in Genesis's CLAUDE.md is present (the lean template merges these into a compact format). This is the most important file -- it governs the entire project.
3.3 .claude/settings.json
Use templates/settings.json.tmpl as skeleton. Configure:
- Permissions appropriate to the stack (consult stack-profiles.md)
- PreToolUse hooks: if the risk-evaluator agent is included, resolve
{{PRETOOLUSE_HOOKS}} to a Bash matcher with a prompt hook that screens commands for risk (destructive operations, state mutations, external writes, permission escalation, severity 1-5). If risk-evaluator is not included, resolve to empty.
- PostToolUse hooks for the stack's formatter and linter
- Stop hook for test/commit reminders
Write valid JSON, not a template. Replace all placeholders with actual values.
3.4 Agents
For each agent in the plan:
- Use
templates/agent.md.tmpl as skeleton
- Fill with role-specific instructions from agent-catalogue.md
- Write to
<resolved-path>/.claude/agents/<agent-name>.md
- For the risk-evaluator agent: include the full severity rubric (1-5 scale) in the Guidelines section. Include the project's specific integrations so the rubric can be context-sensitive. Instruct the agent to read CLAUDE.md for additional project context.
3.5 Skills
For each skill in the plan:
- Use
templates/skill.md.tmpl as skeleton
- Write a clear description that tells Claude when to invoke it
- Include the specific commands or workflow for the stack
- Write to
<resolved-path>/.claude/skills/<skill-name>/SKILL.md
- When the risk-evaluator agent is included, also generate a
/risk skill that accepts a command or operation description and invokes the risk-evaluator agent to score it
3.6 .mcp.json (if needed)
Use templates/mcp.json.tmpl as skeleton. Only include servers for integrations mentioned in the plan. Write valid JSON.
3.7 Memory files
Create the memory directory. Derive the path by expanding the project target to an absolute path, slugifying it (replace / with -, strip leading -), then prepend ~/.claude/projects/ and append /memory/. For example, a project at ~/claude/foo/ for user xeeva becomes ~/.claude/projects/-home-xeeva-claude-foo/memory/.
If the scaffold profile is lean, write a single consolidated MEMORY.md that includes user profile and project context inline (no separate files). This reduces the number of files loaded at session start.
Otherwise, write three files:
user-profile.md from templates/memory-user.md.tmpl (copy verbatim)
project-context.md from templates/memory-project.md.tmpl (fill placeholders)
MEMORY.md index file pointing to both
3.8 Application boilerplate
Consult stack-profiles.md for the appropriate structure. Generate:
- Entry point file(s)
- Package/project config (package.json, pyproject.toml, go.mod, Cargo.toml, etc.)
- Test configuration and a sample test
.gitignore appropriate to the stack
docs/README.md with project name, purpose, setup instructions, and usage
docs/architecture.md with high-level architecture description
- Any stack-specific config files (tsconfig.json, ruff.toml, .golangci.yml, etc.)
Phase 4: Finalise
- Initialise git and create the first commit:
cd <resolved-path> && git init && git add -A && git commit -m "Initial scaffold from Genesis"
-
Update the project registry. Read the current registry from Genesis memory, append the new project entry, and write it back.
-
Print a summary:
Project created: <resolved-path>/
Stack: <stack>
Agents: <count> (<names>)
Skills: <count> (<names>)
MCP: <servers or "none">
Context profile: <lean | standard | full> (~<N>k tokens, <P>% of <context_window>)
Next steps:
cd <resolved-path>/
claude
For lean profiles, append: "Tip: Your Pro plan has 200k context. This scaffold uses ~k tokens. Use /compact if you notice slowdowns in long sessions."
Important Notes
- All generated content must use Australian English
- Never use em dashes in any generated file
- If the target directory already exists, refuse and explain
- Write valid, parseable JSON for settings.json and .mcp.json
- Write valid YAML frontmatter for all skill files
- Every generated CLAUDE.md must include all Global Rules from Genesis's CLAUDE.md