一键导入
create-magicdoc
Use when adding a new Magic Doc for a subsystem or area of the codebase, after the magicdocs system has been set up with /setup-magicdocs
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when adding a new Magic Doc for a subsystem or area of the codebase, after the magicdocs system has been set up with /setup-magicdocs
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when bootstrapping a MagicDocs system in a repository, setting up auto-maintained architectural documentation, or when the user asks to install magicdocs
Use when the user asks to remember, save, store, or persist information — or when you learn something that should outlive the current session. Classifies into the correct persistence mechanism.
| name | create-magicdoc |
| description | Use when adding a new Magic Doc for a subsystem or area of the codebase, after the magicdocs system has been set up with /setup-magicdocs |
Create a single new Magic Doc for a subsystem or area of the codebase.
The title follows the command: /create-magicdoc Authentication
Before proceeding, verify the magicdocs system is set up: check that docs/magic/ exists and CLAUDE.md mentions Magic Docs. If not, tell the user to run /setup-magicdocs first and stop.
Check for duplicates. Glob docs/magic/*.md and grep for ^# MAGIC DOC: repo-wide. If a doc with a similar title or covering the same subsystem exists, tell the user and stop.
Explore the subsystem. Read entry points and key files — not exhaustively. Focus on architecture: how components connect, what's non-obvious, where to start reading. Stop exploring once you understand the shape of the subsystem.
Write the doc to docs/magic/<slug>.md using this exact format:
# MAGIC DOC: <Title>
*<one-line description>*
## Overview
<2-3 sentences: what this subsystem is, why it exists>
## Key Entry Points
<where to start reading, key files>
## Non-Obvious Patterns
<gotchas, conventions, things that would surprise a newcomer>
Add ## Dependencies only if external dependencies are non-obvious.
BE TERSE. Maximum 500 words. This is the hardest part — resist the urge to document everything you found.
Document:
Do NOT document:
The code IS the detail. The Magic Doc is the map.
Section count: Use only the standard sections (Overview, Key Entry Points, Non-Obvious Patterns, optionally Dependencies). Do NOT add extra sections for specific technical concerns — if something is important, it fits in Non-Obvious Patterns.