ワンクリックで
magic-dev-init
Initialize Magic Spec development environment with junctions and symlinks.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Initialize Magic Spec development environment with junctions and symlinks.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Workflow for simulating and validating Magic SDD engine logic.
Project Sync & Hygiene — synchronizes versions, documentation, and engine metadata
Session resume briefing — current position, progress, blockers, and the one next command
Workflow for executing tasks from the project plan.
Workflow for orchestrating tasks and generating the implementation plan.
Specification Knowledge Graph — builds, analyzes, and visualizes the SDD artifact graph
| name | magic-dev-init |
| description | Initialize Magic Spec development environment with junctions and symlinks. |
Set up junctions, hardlinks, and symlinks so agent-facing directories mirror the canonical engine sources.
Triggers: "Init dev env", "Setup agent links", "Rebuild junctions"
/magic-dev-init [agents...]
| Mode | Effect |
|---|---|
/magic-dev-init | Infrastructure only — no agents, only .agents/ structure |
/magic-dev-init claude | Targeted — only CLAUDE.md + .claude/ |
/magic-dev-init claude qwen | Targeted — only the named agents |
Valid agent names: claude, gemini, qwen, codex
.agents/workflows/,.agents/skills/, and.agents/rules/are always initialized — agent directories depend on them.
| Agent | Instruction File | Directory | Workflow Subdir |
|---|---|---|---|
claude | CLAUDE.md | .claude/ | commands/ |
gemini | GEMINI.md | .gemini/ | commands/ |
qwen | QWEN.md | .qwen/ | commands/ |
codex | CODEX.md | .codex/ | prompts/ |
Windows → PowerShell script. Unix/macOS → Bash script.
Must run from the repository root.
Windows:
pwsh -NoProfile -File .agents/skills/magic-dev-init/scripts/setup_windows.ps1 [agents...]
Unix:
bash .agents/skills/magic-dev-init/scripts/setup_unix.sh [agents...]
Phases executed by the script:
node .magic/scripts/sync-skills.js (if present)git rm --cached --ignore-unmatch on all managed paths.agents/{workflows,skills,rules}/workflows/*.md → .agents/workflows/ (hardlinks on Windows, symlinks on Unix)skills/* → .agents/skills/ (junctions on Windows, symlinks on Unix).{agent}/{subdir,skills,rules} → .agents/ (junctions on Windows, symlinks on Unix)rules/* → .agents/rules/ (hardlinks on Windows, symlinks on Unix){AGENT}.md → AGENTS.md (hardlinks on Windows, symlinks on Unix)The script prints link targets and runs a per-platform integrity check:
fsutil hardlink list AGENTS.md (expect 1 + number of active agents)ls -l {AGENT}.md for each active agent (symlink target should be AGENTS.md)When managing Windows junctions (mklink /J) and git index, follow this strict order to prevent data loss:
git rm -r --cached <path> on Windows follows junctions and physically deletes files in the junction target, even with --cached. Example: git rm -r --cached .claude/commands where .claude/commands is a junction to workflows/ will delete all files in workflows/ from disk.
Always run git rm --cached before creating junctions, while the paths are empty or nonexistent:
git rm --cached ← first, while no junctions exist yetmklink /J ... ← then create junctionsWhen removing from git index, list specific file paths rather than directories:
# Safe — specific files only
git rm --cached --ignore-unmatch workflows/magic.analyze.md
# Dangerous — git will traverse the junction into parent/source directories
git rm -r --cached .claude/commands