Pra engines sem skill loading (Cursor, Codex sem MCP): leia este file inteiro e siga as instrucoes como se fossem suas. Voce nao precisa "invocar" — apenas obedeca. Cursor e Codex que tem
xp-stackinstalado via npm leem este SKILL.md em.cursor/rules/ou.codex/skills/.
Voce eh o Bootstrap. Sua missao eh provisionar o stack XP/Akita neste projeto sem sobrescrever nada que ja exista. Trabalhe sempre com cp -n (no-clobber), pergunte antes de tocar arquivos pre-existentes, e reporte exatamente o que foi criado vs preservado.
XP Stack Bootstrap
Scaffold a project with the XP stack. Never overwrites existing files silently.
Environment detection (preprocessed)
Current directory: !pwd
CLAUDE.md status: !test -f "$(pwd)/CLAUDE.md" && echo "EXISTS" || echo "ABSENT"
Existing structure:
!ls -la "$(pwd)/.claude" 2>/dev/null || echo "No .claude directory"
!ls -la "$(pwd)/docs" 2>/dev/null || echo "No docs directory"
Your task as the agent running this skill
Follow these steps IN ORDER. Don't skip ahead.
Step 1: Collect project info
Use AskUserQuestion with these 3 questions (in one batched call):
Question: "What is the project name?" (the user will likely answer via Other with a kebab-case name)
- header: "Name"
- options: "my-api", "acme-web", "data-pipeline" — plus the automatic Other
- multiSelect: false
Question: "What is the primary tech stack?"
- header: "Stack"
- options: "React + TypeScript + Vite", "Python + FastAPI", "Node.js + Express", "Go" — plus Other
- multiSelect: false
Question: "Describe the project in one sentence."
- header: "Description"
- options: "General-purpose web app", "API service", "CLI tool", "Library/SDK" — plus Other for custom text
- multiSelect: false
Store the answers as $project_name, $project_stack, $project_description (conceptually — use the values in the bash call below).
Step 2: Handle existing CLAUDE.md
Look at the CLAUDE.md status from the environment detection above.
If ABSENT: set $claude_md_action = "create" and skip to Step 3.
If EXISTS: Ask via AskUserQuestion:
- Question: "A CLAUDE.md already exists in this directory. What should we do?"
- header: "Existing"
- options:
- "Keep existing and skip CLAUDE.md creation (Recommended)" ->
skip - "Rename existing to CLAUDE.md.bak and create new" ->
backup - "Abort the bootstrap entirely" ->
abort
- "Keep existing and skip CLAUDE.md creation (Recommended)" ->
- multiSelect: false
Store the chosen action as $claude_md_action.
Step 3: Run the scaffold script
Call via Bash tool (replace the variables with the collected values):
bash ${CLAUDE_SKILL_DIR}/scripts/scaffold.sh "$(pwd)" "PROJECT_NAME_HERE" "PROJECT_STACK_HERE" "PROJECT_DESCRIPTION_HERE" "CLAUDE_MD_ACTION_HERE"
The script handles the 4 CLAUDE.md actions (create, skip, backup, abort), copies all templates with cp -n (never overwrites existing), and prints a summary of what was done.
Step 4: Report to the user
Summarize what was created / skipped. Tell them:
- Read the new
CLAUDE.md— it's the canonical source of truth for the project. AGENTS.mdis a symlink toCLAUDE.md(so Antigravity/Codex/Cursor read the same file). Don't editAGENTS.mddirectly — editCLAUDE.mdand the symlink propagates..gitignoregot 3 reserved entries (local/,.claude/wave-runs/,scripts/orchestrate/) used by the optional skillspaperclip-orchestratorandlocal-waves— pre-existing entries are preserved.- Fill in the stack-specific sections (tech stack details, env vars, directory structure, lessons learned).
- Start their first task with the
task-decompositionskill.
If they want multi-agent dispatch later, mention the optional skills /xp-stack:paperclip-setup (remote async, droplet, GitHub-driven auto-merge gate) and /xp-stack:local-waves-setup (local sync, worktrees + claude -p headless).
What the scaffold script does
- Creates
CLAUDE.mdfrom the template, substituting{{PROJECT_NAME}},{{PROJECT_STACK}},{{PROJECT_DESCRIPTION}}with the collected values - Copies
templates/docs-tasks-template/todocs/tasks/_template/(recursive, no-clobber) - Copies
templates/docs-pesquisas-template/todocs/pesquisas/_template/(recursive, no-clobber) - Creates
.claude/settings.jsonfrom the template (no-clobber) - Creates
AGENTS.md -> CLAUDE.mdsymlink (andAGENTS.local.md -> CLAUDE.local.mdifCLAUDE.local.mdexists). Skipped when 6th arg passed as"no-symlink". - Appends
local/,.claude/wave-runs/,scripts/orchestrate/to.gitignoreif not already present (idempotent, preserves existing rules). - Uses
cp -n/cp -rnthroughout — never overwrites existing files
Idempotency guarantee
Running this skill multiple times in the same directory does not modify files created in previous runs. The script always uses no-clobber copies. If the user wants to reset, they delete the files manually first.
Limits
- Only writes under
$(pwd)— never touches~/.claude/global, never touches other repos. - Never modifies
$(pwd)/.git— the scaffold only creates source files, git is untouched. - Never installs dependencies — if the stack needs
npm installor equivalent, the user runs it after.
Source: RNobre1/xp-stack — distributed by TomeVault.