一键导入
assistant-diagrams
Create Mermaid architecture, sequence, ER, flow, class, or state diagrams. Use for explicit diagram or system-flow visualization requests.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create Mermaid architecture, sequence, ER, flow, class, or state diagrams. Use for explicit diagram or system-flow visualization requests.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Clarify ambiguous or multi-intent requests. Use when the user asks to untangle, structure, or restate what they mean.
Manage durable memory safely. Use for explicit remember, recall, forget, or memory-health requests and stable corrections or preferences.
Review code and re-review fixes until clean. Use for explicit code review or the workflow Review phase; QA runs only when required.
Create or update V1 skills and contracts. Use for skill scaffolding, contract design, or contract-compliance validation.
Run proportional development phases. Use to plan, build, implement, fix, migrate, or refactor project artifacts.
Generate and rank options. Use light mode for quick improvement scans and deep mode for explicit brainstorming or broad exploration.
| name | assistant-diagrams |
| description | Create Mermaid architecture, sequence, ER, flow, class, or state diagrams. Use for explicit diagram or system-flow visualization requests. |
| effort | medium |
| triggers | [{"pattern":"diagram|draw|visualize|show me the flow|architecture diagram|sequence diagram|er diagram|data model|class diagram|state diagram|flow chart","priority":65,"min_words":3,"reminder":"This request matches assistant-diagrams. Consider invoking the Skill tool with skill='assistant-diagrams' for visual documentation."}] |
| File | Purpose |
|---|---|
contracts/input.yaml | diagram_type, scope, source_files[], format |
contracts/output.yaml | diagram_code, diagram_type, description |
diagram_type and scope are required; format defaults to mermaiddiagram_code must be valid syntax parseable by the target rendererdiagram_type is echoed back in output to confirm what was generatedCreates accurate Mermaid diagrams from code analysis. Covers the developer's visual documentation weakness.
Core principle: Diagrams should be generated from code, not drawn from memory.
Generate diagrams that make real code structure or behavior easier to understand without inventing components.
| Type | File | Best for |
|---|---|---|
| Architecture | arch-diagram.md | System overview, component relationships |
| Sequence | sequence-diagram.md | Request flows, interaction patterns |
| Entity-Relationship | er-diagram.md | Data models, database schema |
| Flow | flow-diagram.md | Business logic, decision trees, algorithms |
| Component | component-diagram.md | Module boundaries, dependencies |
| Class | class-diagram.md | Type hierarchies, interfaces, relationships |
| State | state-diagram.md | State machines, lifecycle transitions |
Input arrives
│
├─ "architecture" / "system overview" → arch-diagram.md
├─ "flow" / "how does X work" → sequence-diagram.md or flow-diagram.md
├─ "data model" / "entities" / "schema" → er-diagram.md
├─ "dependencies" / "modules" → component-diagram.md
├─ "class hierarchy" / "types" → class-diagram.md
├─ "state" / "lifecycle" / "transitions" → state-diagram.md
└─ ambiguous → ask user or pick best fit
Prefer picking the best fit when the user's intent and code context point clearly to one type. Ask only when the choice would materially change what gets inspected or drawn.
For all diagram types:
| Project Size | Guideline |
|---|---|
| Small (< 10 files) | Single diagram can show everything |
| Medium (10-50 files) | One overview + detail diagrams per area |
| Large (50+ files) | Layered: L0 overview → L1 component → L2 detail |
Return:
```mermaid
[diagram content]
```
assistant-docs): embed in the docdocs/architecture.mddocs/diagrams/[name].mdsubgraph