From dev-core
Set up local dev environment — stack.yml, CLAUDE.md Critical Rules, docs scaffolding, VS Code MDX, LSP. Triggered by /init or standalone. Triggers: "env setup" | "setup environment" | "configure stack" | "scaffold rules".
npx claudepluginhub roxabi/roxabi-plugins --plugin dev-coreThis skill is limited to using the following tools:
Let:
Bootstraps .claude/ dotclaude config from template if missing, then customizes all files to match project's tech stack, conventions, and patterns. Interactive via user confirmations.
Generates Claude Code project setups including CLAUDE.md, hooks, permissions, commands, and agents. Analyzes stack (TypeScript, JavaScript, Python, Go, Rust, etc.) to create minimal/standard/full configs.
Bootstraps Claude Code projects: generates CLAUDE.md with progressive docs, auto-format hooks, test infrastructure; scaffolds empty dirs via stack tooling; audits/syncs docs. Supports monorepos/multi-repo.
Share bugs, ideas, or general feedback.
Let:
I_TS := ${CLAUDE_PLUGIN_ROOT}/skills/init/init.ts
Φ := CLAUDE_PLUGIN_ROOT
F := --force flag present in $ARGUMENTS
σ := .claude/stack.yml
D(label, result) := Display: {label} {result}
D✅(label) := D(label, "✅ Created")
D⏭(label) := D(label, "⏭ Skipped")
ensureGitignore(entry) := grep -q '{entry}' .gitignore 2>/dev/null || echo '{entry}' >> .gitignore
Configure local developer environment: stack config, governance rules, docs stubs, editor settings, LSP.
Runs standalone (/env-setup) or called by /init as part of full project initialization.
Set up σ early — later phases read runtime, package manager, commands, deploy platform, hooks tool, docs format.
test -f .claude/stack.yml && echo exists || echo missingcp "${Φ}/stack.yml.example" .claude/stack.ymlruntime+package_manager | Backend path (e.g. apps/api, blank=none) | Frontend path (e.g. apps/web, blank=none) | Test command → commands.testhead -1 CLAUDE.md → ¬@.claude/stack.yml → prepend @.claude/stack.yml\n. D✅("@import")..claude/stack.yml). D✅(".gitignore")..claude/stack.yml.example → cp "${Φ}/stack.yml.example" .claude/stack.yml.example. D("stack.yml.example", "✅ Created (commit this file)").Inject plugin-managed always-on behavioral patterns (decision protocol, agent discipline, context discipline, dev process, worktree, parallel execution, git) into the project via a gitignored file loaded by CLAUDE.md.
cp "${Φ}/../shared/references/global-patterns.md" .claude/dev-core.md. D✅("global-patterns").grep -q '@.claude/dev-core.md' CLAUDE.md 2>/dev/null → ∃ → D("@.claude/dev-core.md", "✅ Already present"), skip.
¬∃ → prepend @.claude/dev-core.md\n to CLAUDE.md (after @.claude/stack.yml line if present, otherwise at top). D✅("@.claude/dev-core.md")..claude/dev-core.md). D✅(".gitignore entry").Re-run (--force): always overwrite .claude/dev-core.md with latest plugin version.
Generate governance rules (dev process, decision protocol, git conventions, etc.) from σ values. Sections vary by project type.
σ ∄ → D("Critical Rules", "⏭ Skipped — requires stack.yml"), skip to Phase 3.
bun $I_TS scaffold-rules --stack-path .claude/stack.yml --claude-md CLAUDE.mdprojectType, sections, markdown, existing.Project type: {projectType}
Sections to scaffold: {sections.length} ({section ids joined by ", "})
existing.sectionIds:
## Critical Rules block with markdown. Preserve content before and after.docs.path + docs.format from σ (defaults: docs, md).{docs.path}/standards/ ∃ → D("Docs scaffolding", "✅ Already present"), skip.bun "${CLAUDE_PLUGIN_ROOT}/skills/init/init.ts" scaffold-docs --format <docs.format> --path <docs.path>
Run only if docs.framework: fumadocs in σ.
apps/docs/ Next.js + docs/ content — Mermaid, Shiki, Tailwind v4) | Skipbun "${CLAUDE_PLUGIN_ROOT}/skills/init/init.ts" scaffold-fumadocs --root <cwd> --docs-path <docs.path>
D("Fumadocs scaffold", "✅ Created {filesCreated.length} files in apps/docs/ and {docs.path}/"). List files grouped by dir. ∃ warnings → display each with ⚠️.bun install in apps/docs/, then bun dev for docs server on port 3002.Run only if find . -name "*.mdx" -not -path "*/node_modules/*" | head -1 returns result ∨ docs.format: mdx in σ.
.vscode/settings.json for "*.mdx": "markdown" in files.associations.{"files.associations": {"*.mdx": "markdown"}} | ∃ file → merge key. D✅("VS Code MDX preview").Enable ENABLE_LSP_TOOL for richer code intelligence in Claude Code sessions.
Read lsp.enabled from σ. false → D⏭("LSP — Disabled in stack.yml"), skip. true ∨ absent → continue.
grep -q '^ENABLE_LSP_TOOL=' .env 2>/dev/null && echo "set" || echo "missing". set → D("ENABLE_LSP_TOOL", "✅ Already configured"), skip to step 6.
Ask: Enable LSP (ENABLE_LSP_TOOL=1 + language server) | Skip.
yes:
a. Add to .env and .env.example:
echo 'ENABLE_LSP_TOOL=1' >> .env
grep -q '^ENABLE_LSP_TOOL=' .env.example 2>/dev/null || echo 'ENABLE_LSP_TOOL=1' >> .env.example
b. Detect LSP server from lsp.server or runtime:
| runtime | server | install | binary |
|---|---|---|---|
bun/node/deno | typescript-language-server | bun: bun add -d typescript-language-server typescript / pnpm: pnpm add -D ... / npm: npm install --save-dev ... / yarn: yarn add --dev ... | typescript-language-server |
python | pyright | uv tool install pyright or pip install pyright | pyright |
rust | rust-analyzer | rustup component add rust-analyzer | rust-analyzer |
go | gopls | go install golang.org/x/tools/gopls@latest | gopls |
c. which <binary> 2>/dev/null. missing → run install → re-check. still-missing → ⚠️ "not in PATH — restart shell".
d. Claude Code LSP plugin — detect from runtime:
| runtime | claude plugin name |
|---|---|
bun/node/deno | typescript-lsp |
python | pyright-lsp |
rust/go | (none — skip) |
claude plugin list 2>/dev/null | grep -q '<plugin-name>' → installed → skip.
¬installed → Ask: Global (recommended for solo) | Project (commits to .claude/settings.json) | Skip.
claude plugin install <plugin-name>claude plugin install <plugin-name> --scope project
e. D("LSP", "✅ ENABLE_LSP_TOOL=1 set, installed, plugin active").Skip → D⏭("LSP").
Already set ∧ binary ∃ → check Claude Code plugin (step 4d). D("LSP", "✅ Already configured ([, plugin missing → run fix])").
Env Setup Complete
==================
stack.yml ✅ Configured / ✅ Already exists / ⏭ Skipped
Critical Rules ✅ Scaffolded (N sections) / ✅ Already complete / ⏭ Skipped
Docs scaffolding ✅ Created N files / ✅ Already present / ⏭ Skipped
Fumadocs app ✅ Created / ⏭ Skipped / ⏭ Not configured
VS Code MDX ✅ Added / ✅ Already configured / ⏭ Skipped
LSP ✅ Configured / ✅ Already set / ⏭ Disabled / ⏭ Skipped
Next: run /seed-docs to populate docs stubs, or /github-setup to connect GitHub Project.
.claude/stack.yml values without F or explicit confirmation.claude/stack.yml — only .claude/stack.yml.example$ARGUMENTS