xiaohongshu
xiaohongshu
mermaid-validator
Mermaid図の構文検証と修正を行うスキル。 architecture.md生成時のパースエラーを防止。
Full skill instructions
Mermaid図の構文エラーを検出し、自動修正を行うことで、ドキュメント生成時のパースエラーを防止する。
docs/**/architecture.mddocs/**/design.mddocs/**/sequence.md*.md (Mermaid図を含むすべてのMarkdownファイル)構文エラー検出
C4モデル構文検証
C4Context, C4Container, C4Component の正しい使用Person(), System(), Rel() の引数チェックシーケンス図検証
participant 宣言の確認->>, -->>, ->>)の正しい使用グラフ構文検証
C4Context
title System Context Diagram
Person(user, "User", "エンドユーザー")
System(system, "System Name", "システム説明")
System_Ext(external, "External System", "外部システム")
Rel(user, system, "Uses", "HTTPS")
Rel(system, external, "Integrates", "REST/HTTPS")
注意点:
C4Context の後に改行が必要title は必須ではないが推奨Rel() の引数は必ず4つ(from, to, label, technology)sequenceDiagram
participant User
participant Frontend
participant Backend
User->>Frontend: リクエスト
Frontend->>Backend: API呼び出し
Backend-->>Frontend: レスポンス
Frontend-->>User: 表示
注意点:
participant 宣言は必須ではないが推奨->>(同期)、-->>(非同期)、-x(破棄)を区別graph TB
A[クライアント] --> B[APIゲートウェイ]
B --> C[バックエンドサービス]
C --> D[データベース]
C --> E[外部API]
注意点:
graph TB(上から下)、graph LR(左から右)[] で囲むsubgraph はインデント必須erDiagram
USER ||--o{ ORDER : places
USER {
string id
string name
string email
}
ORDER {
string id
string userId
date createdAt
}
注意点:
||--o{(1対多)、}o--o{(多対多)type name の順# Mermaid Live Editorで検証
# https://mermaid.live/
# または、mermaid-cliを使用
npx @mermaid-js/mermaid-cli mmdc -i diagram.mmd -o diagram.svg
# Markdownファイル内のMermaid図を抽出
grep -A 50 '```mermaid' architecture.md > extracted-diagrams.txt
# 構文エラーを目視確認
cat extracted-diagrams.txt
誤り:
C4Context
title: System Context Diagram
修正:
C4Context
title System Context Diagram
誤り:
sequenceDiagram
User->Frontend: リクエスト
修正:
sequenceDiagram
User->>Frontend: リクエスト
誤り:
graph TB
subgraph "Production"
A[Pod 1]
end
修正:
graph TB
subgraph "Production"
A[Pod 1]
end
誤り:
erDiagram
USER -> ORDER : places
修正:
erDiagram
USER ||--o{ ORDER : places
->> に統一(同期呼び出し)-->> を使用name: Mermaid Validation
on:
pull_request:
paths:
- 'docs/**/*.md'
- '**/*.md'
jobs:
validate-mermaid:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Validate Mermaid Diagrams
run: |
npm install -g @mermaid-js/mermaid-cli
find . -name "*.md" -exec sh -c '
grep -l "```mermaid" "$1" && {
echo "Validating $1"
mmdc -i "$1" -o /tmp/test.svg || exit 1
}
' _ {} \;
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience