con un clic
init
Initialize a Megazord project with configuration and planning structure
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Initialize a Megazord project with configuration and planning structure
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Systematic four-phase debugging (reproduce, isolate, root-cause, fix)
Socratic brainstorming to explore approaches before implementation
Execute the current phase plan (subagent or Agent Teams mode)
Show all available Megazord skills with descriptions and usage examples
Complete milestone lifecycle -- audit, archive, deferred items, and next version preparation
Plan a phase into executable tasks with dependencies and waves
| name | init |
| description | Initialize a Megazord project with configuration and planning structure |
| disable-model-invocation | false |
Initialize a new Megazord project or migrate an existing GSD project. This skill guides you through project setup with presets, model selection, workflow preferences, and deep context gathering.
Reference @skills/init/design-system.md for all visual output formatting.
Reference @skills/shared/interview-language.md for language detection and session-wide persistence rules.
Reference @skills/shared/interview-options.md for option format, ordering, and explanation standards.
Reference @skills/shared/terminology.md for official term definitions.
Run the banner script to display the colored Megazord logo (Power Rangers palette, auto-adapts to terminal width):
bash "${CLAUDE_PLUGIN_ROOT}/scripts/banner.sh"
The script reads the version from package.json automatically. If CLAUDE_PLUGIN_ROOT is not set, use the plugin's install path (~/.claude/megazord/scripts/banner.sh).
Detect the user's language following the rules in @skills/shared/interview-language.md.
The user's first natural-language message determines the session language. If the user's first interaction is just the /mz:init command with no additional text, wait until they provide a natural-language response (e.g., answering the first question) and detect from that.
Once detected, apply the language to ALL subsequent output in this session:
question textKeep in English regardless of detected language:
Runs ONCE, immediately after banner display and language detection, BEFORE any questions are asked. This step is SILENT -- no output is shown to the user. Results feed into Steps 2, 7a, and the COME block as pre-filled defaults.
Scan the project for existing documentation and dependencies:
package.json -- extract: name, dependencies, devDependencies, scripts, engines, type (ESM vs CJS)tsconfig.json, *.config.{ts,js,json,mjs}, Cargo.toml, go.mod, pyproject.toml, requirements.txtREADME.md, CLAUDE.md, doc folders (docs/, documentation/).github/workflows/*, Dockerfile, docker-compose.yml.planning/, REQUIREMENTS.md, TODO.md**/*.{ts,tsx,js,jsx,py,rs,go} to determine language distribution**/*.test.*, **/*.spec.*git log --oneline -10, git log --format='%an' | sort -uStore scan results internally with source annotations. Each detected value is tagged with its origin for later use. Examples:
{ value: "typescript", source: "tsconfig.json" }{ value: "vitest", source: "package.json devDependencies" }{ value: "bun", source: "package.json engines" }Scan results flow into:
Check the current project directory for existing planning structure.
Detection order:
Already initialized (Megazord): If .planning/megazord.config.json exists, this project is already set up. Display the current config summary in an action box and ask the user:
/mz:settings to modify settings instead?"/mz:settings to modify configuration."GSD project detected: If .planning/config.json exists WITHOUT a version field, this is a GSD project. Reference @skills/init/migration.md and follow the GSD migration flow:
PROJECT.md contentUnknown .planning/ directory: If .planning/ exists but contains neither megazord.config.json nor a GSD-format config.json, ask the user:
Fresh init: No .planning/ directory exists. Proceed to Step 3.
Check if the user invoked /mz:init --quick or /mz:init quick (look for "quick" flag in the conversation context).
If quick mode:
PROJECT.md with just the project name and a note: "Run /mz:init without --quick for full project context gathering."If not quick mode: Continue to Step 4.
Reference @skills/init/presets.md for the full toggle values of each preset.
Reference @skills/shared/interview-options.md for option format and explanation standards.
Use AskUserQuestion:
Translate all option labels and descriptions to the detected session language per @skills/shared/interview-language.md. The examples above are in English for illustration; adapt to the session language. For example, in Italian: "Strict (Consigliato)" with description "Pro: massima qualità, test prima del codice, review automatiche. Contro: più token, esecuzione più lunga."
This is a personal preference question -- do NOT add "fai tu" / "AI decides" to this step.
Record the selected preset. Its toggle values will be used as defaults for all quality and workflow settings.
Collect model and workflow preferences one at a time.
All selection questions in this step follow the option format from @skills/shared/interview-options.md:
5a. Model profile: Use AskUserQuestion:
Note: model profile is a technical/opinionated question -- "fai tu" IS appropriate. Translate all labels and descriptions to the session language. The examples above are in English for illustration.
5b. Execution mode: Use AskUserQuestion:
Note: execution mode is an opinionated technical choice -- "fai tu" IS appropriate. Translate all labels and descriptions to the session language.
5c. Planning depth: Use AskUserQuestion:
Note: planning depth is an opinionated technical choice -- "fai tu" IS appropriate. Translate all labels and descriptions to the session language.
5d. Git tracking: Use AskUserQuestion:
Note: Git tracking is a binary operational preference -- do NOT add "fai tu" to this question. Translate labels and descriptions to the session language.
Ask the user whether they want to customize individual quality settings or use the selected preset's defaults.
Use AskUserQuestion:
If "Use defaults": Skip to Step 7.
If "Customize": Show AskUserQuestion for each quality toggle. Only present toggles that the selected preset enables/disables -- show the current preset value as context.
After all overrides are collected, merge them with the preset values.
Reference @skills/init/questioning.md for the full COSA/COME questioning methodology.
The deep scan from Step 1c already collected all available project signals. Now present those findings to the user for validation.
If Step 1c found existing code or documentation:
Present detected context in the session language with source annotations:
╔═══════════════════════════════════════════════════════╗
║ Auto-Detected Project Context ║
╠═══════════════════════════════════════════════════════╣
║ Language: {detected language} (source) ║
║ Runtime: {detected runtime} (source) ║
║ Testing: {detected framework} (source) ║
║ Linting: {detected linter} (source) ║
║ Building: {detected build tool}(source) ║
╚═══════════════════════════════════════════════════════╝
Example in Italian: "Ho rilevato da package.json: progetto TypeScript, runtime Bun, testing Vitest..."
Ask for confirmation/corrections in the session language: "Does this look correct? Anything to add or correct?"
If the project name was not set yet, use the name from package.json (source: package.json) as the default and confirm with the user.
If Step 1c found no existing code (greenfield): Skip this sub-step. Proceed directly to 7b.
Conduct the COSA questioning in the detected session language. This block establishes what the project does BEFORE any technical choices.
Core COSA areas:
COSA behavior rules:
After the COSA block completes, show a mini-summary of all gathered functional requirements in the session language:
--- Functional requirements gathered ---
[bullet list of captured WHAT items: identity, core value, requirements, constraints]
---
Ora parliamo di come costruirlo. (translated to session language)
Then transition explicitly to the COME block.
Gather technical implementation decisions. This block uses AskUserQuestion with the option standards from @skills/shared/interview-options.md.
Core COME areas:
COME behavior rules:
@skills/shared/interview-options.md standards (pro/contra, fai tu placement, modern-first ordering).Build the PROJECT.md content from gathered context using the fixed section structure:
After both COSA (7b) and COME (7d) blocks complete, run a single completeness check before writing any files. This step verifies that all mandatory PROJECT.md sections have sufficient content. It does NOT re-ask questions already answered -- it only identifies sections that are empty or placeholder-only.
Mandatory sections (gap definition):
A gap is any of the following sections that would be written WITHOUT meaningful content:
An empty section or a section with only placeholder text ("TBD", "None yet") counts as a gap.
If gaps are found:
Present them in the session language using this format:
--- Verifica completezza ---
Ho trovato {N} sezione/i senza contenuto sufficiente:
1. [Section name] -- [brief description of what is missing]
2. [Section name] -- [brief description of what is missing]
Posso farti qualche domanda mirata per colmare questi gap, oppure possiamo procedere segnandoli come TBD.
(Translate entirely to the detected session language. The example above is Italian for illustration.)
Gap resolution flow:
Skip entire completeness check:
If the user wants to skip the check entirely, mark ALL gap sections as "TBD" in the PROJECT.md draft and add this note:
> Some sections marked TBD -- run `/mz:init` to fill them in later or update PROJECT.md manually.
Planning proceeds with the reduced context available. The planner will work with what is there.
No gaps found:
If all mandatory sections have content, display a brief confirmation in the session language:
"Tutte le sezioni del PROJECT.md sono complete." (translated to session language)
Then proceed directly to Step 8 without any additional interaction.
Create all project initialization files.
.planning/
Ensure the .planning/ directory exists (create if needed).
Write .planning/megazord.config.json with all collected settings. Use the config schema from src/lib/config.ts as the canonical structure. Format with 2-space indentation.
Auto-detect the Megazord plugin directory before writing:
~/.claude/plugins/mz/bin/megazord.mjs exist? (run ls ~/.claude/plugins/mz/bin/megazord.mjs 2>/dev/null)
plugin_path to the expanded absolute path of ~/.claude/plugins/mz (e.g., /Users/username/.claude/plugins/mz)--plugin-dir): Ask the user for the plugin directory path using AskUserQuestion:
plugin_path in the config JSON.{
"version": 1,
"project_name": "{collected project name}",
"plugin_path": "{detected or user-provided plugin path}",
"mode": "{yolo|interactive}",
"depth": "{comprehensive|standard|quick}",
"parallelization": true,
"commit_docs": {true|false},
"model_profile": "{quality|balanced|budget}",
"quality": {
"tdd": {true|false},
"review": "{auto|manual|off}",
"brainstorming": {true|false},
"cortex": {true|false},
"debug": "{systematic|quick}"
},
"workflow": {
"research": {true|false},
"plan_check": {true|false},
"verifier": {true|false}
}
}
Write .planning/PROJECT.md with the gathered context. Use the fixed section structure:
# {Project Name}
## What This Is
{One-paragraph description of the project}
## Core Value
{The single most important thing this project must do well}
## Requirements
### Validated
(None yet -- ship to validate)
### Active
{Bullet list of requirements gathered during init}
### Out of Scope
{Bullet list of explicitly excluded items}
## Context
{Technical context, ecosystem, prior art, etc.}
## Constraints
{Stack, timeline, team, performance, compliance constraints}
## Key Decisions
| Decision | Rationale | Outcome |
|----------|-----------|---------|
{Decisions captured during init}
---
*Last updated: {date} after initialization*
For quick mode, create a minimal version with just the project name and placeholder sections.
Write .planning/STATE.md with initial project state:
# Project State
## Project Reference
See: .planning/PROJECT.md (updated {date})
**Core value:** {core value from PROJECT.md}
**Current focus:** Initialized -- ready for planning
## Current Position
Phase: 0 (Initialized)
Plan: None
Status: Ready
Last activity: {date} -- Project initialized with /mz:init
Progress: [░░░░░░░░░░] 0%
## Accumulated Context
### Decisions
None yet.
### Pending Todos
None yet.
### Blockers/Concerns
None.
## Session Continuity
Last session: {date}
Stopped at: Project initialized
Resume file: .planning/PROJECT.md
Display a summary of what was created using an action box from the design system:
╔═══════════════════════════════════════════════════════╗
║ Project Initialized ║
╠═══════════════════════════════════════════════════════╣
║ ✓ .planning/megazord.config.json ║
║ ✓ .planning/PROJECT.md ║
║ ✓ .planning/STATE.md ║
╚═══════════════════════════════════════════════════════╝
Show config summary:
╔═══════════════════════════════════════════════════════╗
║ Configuration Summary ║
╠═══════════════════════════════════════════════════════╣
║ ▸ Profile: {preset name} ║
║ ▸ Model: {model profile} ║
║ ▸ Mode: {yolo|interactive} ║
║ ▸ Depth: {comprehensive|standard|quick} ║
║ ▸ Quality ║
║ TDD: {✓/✗} Review: {auto/manual/off} ║
║ Brainstorm: {✓/✗} CORTEX: {✓/✗} ║
║ Debug: {systematic/quick} ║
╚═══════════════════════════════════════════════════════╝
Suggest adding to the project's CLAUDE.md:
Tip: Consider adding to your CLAUDE.md:
"This project uses Megazord. Run /mz:status for current state."
End with the next-up block (per presentation-standards.md Section 8):
## Next Up
**Create Your Roadmap** — plan your project phases and milestones
`/mz:plan`
<sub>/clear — start fresh context for the next step</sub>
For greenfield projects (no existing code detected), offer to auto-advance: "Would you like to start roadmap creation now?"