--- name: init description: > Interactive setup wizard for claudekit. Scaffolds rules, hooks, and MCP server configs into the user's project. Run /claudekit:init to configure. Use when setting up a new project with claudekit or reconfiguring an existing one. user-invocable: true argument-hint: "[--all] to skip prompts and install everything" --- # Claudekit Init Interactive setup wizard that scaffolds project-level configuration files into the user's `.claude/` directory. Output styles ship with the plugin and are auto-discovered by Claude Code (no init step needed for them — see `output-styles/` at the plugin root). ## What It Generates | Category | Files | Location | |----------|-------|----------| | Rules | api.md, frontend.md, migrations.md, security.md, testing.md | `.claude/rules/` | | Hooks | auto-format, block-dangerous-commands, notify | `.claude/hooks/` + `settings.local.json` | | MCP Servers | context7, sequential, playwright, memory, filesystem | `.mcp.json` | --- ## Wizard Flow When invoked, ask the user **ONE question at a time**: ### Step 1: Rules "Which rules do you want to install?" - a) All rules (api, frontend, migrations, security, testing) - b) Let me pick individually - c) Skip rules If (b), list each rule with a one-line description and let user select: - **api.md** — REST API design conventions (naming, versioning, error responses) - **frontend.md** — React/Next.js component patterns and file organization - **migrations.md** — Database migration safety rules (backward compatibility, rollback) - **security.md** — OWASP-aligned security rules (no hardcoded secrets, parameterized queries) - **testing.md** — Test naming, coverage thresholds, mocking conventions For each selected rule, read the template from `${CLAUDE_PLUGIN_ROOT}/skills/init/templates/rules/.md` and write it to `.claude/rules/.md`. ### Step 2: Hooks "Which hooks do you want to install?" - a) Auto-format (runs linter after Write/Edit) - b) Block dangerous commands (prevents rm -rf /, force push main, etc.) - c) Notifications (desktop notifications on completion) - d) All of the above - e) Skip hooks For each selected hook: 1. Read the hook metadata from `${CLAUDE_PLUGIN_ROOT}/skills/init/templates/hooks.json` 2. Copy the hook script from `${CLAUDE_PLUGIN_ROOT}/scripts/