一键导入
mermaid-diagrams
Create Mermaid diagrams. ONLY use when user explicitly says "Mermaid". NOT for general diagrams, schemas, ASCII art, or wireframes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create Mermaid diagrams. ONLY use when user explicitly says "Mermaid". NOT for general diagrams, schemas, ASCII art, or wireframes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Invoke OpenAI Codex CLI for cross-model collaboration
Claude Code only. Use when the user explicitly invokes /agents-bridge:codex-orchestrate (or /codex-orchestrate) in Claude Code or asks Claude to orchestrate a large multi-slice plan by delegating implementation to the Codex CLI through agents-bridge. In native Codex, use $slice-runner instead.
Critical second opinion from Codex (OpenAI) on a proposal Claude just made — confirms what is sound, challenges what is genuinely weak, and suggests a better path with clear reasoning when one exists. Constructive, not contrarian. Use to cross-check a Claude design, refactor, API, or fix with a non-Claude model before acting on it.
Start a session in pair-planning mode where Claude and Codex (read-only) each draft an independent implementation plan for a task, then cross-review through an open-point ledger until consensus, escalating remaining disagreements to the user. Produces one agreed plan; does not write code. Use at the start of a task to align two frontier models on the approach before implementation.
Audits CLAUDE.md and AGENTS.md files against research-backed best practices: instruction budget scoring, anti-pattern detection, staleness checks, and concrete fix proposals. Use when the user asks to audit, check, review, or optimize context files, or mentions "instruction budget" or "context file quality". Treats CLAUDE.md and AGENTS.md identically.
Synchronizes project CLAUDE.md with recent codebase changes by analyzing git history, reviewing against official Anthropic best practices with parallel agents, and proposing updates for user approval. Use when CLAUDE.md is outdated, missing, or drifted after major architectural changes.
| name | mermaid-diagrams |
| description | Create Mermaid diagrams. ONLY use when user explicitly says "Mermaid". NOT for general diagrams, schemas, ASCII art, or wireframes. |
This skill helps create clean, well-organized Mermaid diagrams for software engineering and architecture visualization.
<when_to_use> Use this skill specifically for creating, editing, fixing, or improving Mermaid diagrams:
For simply reading or interpreting existing diagrams, proceed directly without this skill. </when_to_use>
<diagram_types>
This skill supports all major Mermaid diagram types for software engineering:
When creating or editing diagrams, consult references in this order:
For all diagrams first:
references/gotchas.md - Common errors, special characters, reserved keywordsreferences/styling.md - Themes, colors, formattingThen consult the specific syntax reference:
references/syntax-flowchart.mdreferences/syntax-sequence.mdreferences/syntax-class.mdreferences/syntax-er.mdreferences/syntax-state.mdreferences/syntax-c4.mdreferences/syntax-git.mdFor architectural patterns:
references/patterns.md - Common software architecture patternsAlways load gotchas.md when:
Load styling.md when:
Load specific syntax reference when:
Load patterns.md when:
Pre-built, well-commented templates are available in assets/templates/:
flowchart-template.md - Organized flowchart with sectionssequence-template.md - Sequence diagram with best practicesclass-template.md - Domain model class diagramer-template.md - Database schema ER diagramUse templates when:
<best_practices>
Use the same principles as code:
%% to explain sectionsExample:
flowchart TB
%% =================================================================
%% USER AUTHENTICATION FLOW
%% =================================================================
%% -----------------------------------------------------------------
%% Entry Point
%% -----------------------------------------------------------------
Start[User enters credentials]
%% -----------------------------------------------------------------
%% Validation
%% -----------------------------------------------------------------
Validate[Validate input format]
CheckDB{Credentials valid?}
%% ... rest of diagram
For large diagrams:
Structure pattern:
%% Section 1: Definition
[define elements]
%% Section 2: Connections
[define relationships]
%% Section 3: Styling
[define styles]
When diagrams get large:
Before finalizing any diagram, check:
Begin with basic structure:
flowchart LR
A --> B
B --> C
<syntax_reference>
%% Use quotes for special characters
A["Function with (parentheses)"]
B["Text with [brackets]"]
%% Or use HTML entities
C[getData#40;#41;] %% getData()
Flowcharts:
--> solid arrow-.-> dotted arrow==> thick arrowClass diagrams:
<|-- inheritance*-- compositiono-- aggregation--> association..> dependencyER diagrams:
||--|| one-to-one||--o{ one-to-many}o--o{ many-to-many
</syntax_reference><use_cases>
Use sequence diagrams to show request/response flows:
sequenceDiagram
Client->>API: POST /users
API->>Database: INSERT user
Database-->>API: User created
API-->>Client: 201 Created
Use ER diagrams with full attribute details:
erDiagram
USER {
uuid id PK
string email UK
}
ORDER {
uuid id PK
uuid user_id FK
}
USER ||--o{ ORDER : places
Use C4 diagrams for different abstraction levels:
C4Context
Person(user, "User")
System(sys, "System")
Rel(user, sys, "Uses")
Use flowcharts with clear decision points:
flowchart TB
Start --> Check{Valid?}
Check -->|Yes| Process
Check -->|No| Error
</use_cases>
"Parse error" → Check syntax matches diagram type
"Syntax error in text" → Escape special characters or use quotes
Blank output → Check browser console, usually invalid syntax
Wrong appearance → Verify correct diagram type declaration
<editing_tips>
When editing existing diagrams:
When creating new diagrams:
Mermaid diagrams work great in:
They can be version controlled, reviewed, and updated like code!
The goal is to create diagrams that are: