بنقرة واحدة
mermaid
Generate Mermaid diagrams in the README to visualise architecture, flows, or relationships from the codebase.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Generate Mermaid diagrams in the README to visualise architecture, flows, or relationships from the codebase.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Ruthlessly tear apart code design — naming, abstractions, coupling, complexity, and everything else.
Analyse test coverage gaps and report uncovered code before making changes.
Run tests, fix failures, and re-run until the suite passes.
Write and improve tests — reuse existing patterns, ensure consistency, and maintain quality.
Isolate a function or code block into a self-contained, runnable script for study and manual testing.
Fix grammar and improve writing while preserving the author's original voice and style.
| name | mermaid |
| description | Generate Mermaid diagrams in the README to visualise architecture, flows, or relationships from the codebase. |
| argument-hint | <files> [instructions] |
| user-invocable | true |
| disable-model-invocation | true |
Generate clear, accurate Mermaid diagrams in the project README (or a specified Markdown file) to visualise architecture, data flows, class relationships, or other structures derived from the codebase.
Files and instructions: $ARGUMENTS
Choose the Mermaid diagram type that best fits the subject:
flowchart TD/LR) — request flows, pipelines, decision trees, process stepssequenceDiagram) — interactions between components over time (API calls, message passing)classDiagram) — class hierarchies, interfaces, type relationshipserDiagram) — database schemas, data models, entity relationshipsstateDiagram-v2) — lifecycle states, state machines, status transitionsarchitecture-beta) — high-level system or infrastructure topologyIf the user specifies a diagram type, use it. Otherwise, select the most appropriate one based on the code being visualised.
```mermaid) so the diagram renders natively on GitHub and other Markdown renderersThe arguments are free-form and flexible. They may contain:
@service.ts, src/models/, handler.go, router.goput it in docs/architecture.md (defaults to README.md if not specified)as a sequence diagram, use a flowchartParse the arguments to identify which file(s) to read, what to visualise, where to place the diagram, and any additional instructions.
/mermaid @service.ts @handler.ts the request flow — diagram the request flow through these files/mermaid src/models/ the entity relationships as an ER diagram — generate an ER diagram from model files/mermaid @auth.ts how authentication works end to end — diagram the full auth flow/mermaid @router.go @middleware.go as a sequence diagram — visualise middleware and routing interactions/mermaid src/ high-level architecture, put it in docs/architecture.md — architecture overview in a specific fileUse the following diagram as a reference for style, tone, and formatting when generating flowcharts. Note how it uses emojis for input/output nodes, multi-line labels for steps that involve an external service or tool, decision nodes for branching logic, and a clean top-down layout:
flowchart TD
A["📂 Folder of page photos"] --> B["Scan images and sort by name or date"]
B --> C["Process pages with bounded concurrency"]
C --> D["Load image and auto-rotate from EXIF"]
D --> E["Layout OCR
AWS Textract"]
D --> F["Page number + figure analysis
Vision LLM via OpenRouter"]
E --> G["Merge OCR blocks with vision results"]
F --> G
G --> H["Crop figures and attach captions"]
H --> I["Fix reading order
and deduplicate caption text"]
I --> J["Repair cross-page hyphen splits"]
J --> K["Structured processed pages"]
K --> L["Build Word document"]
L --> M["📄 output.docx"]
K --> N{"Translate?"}
N -- Yes --> O["Clone pages"]
O --> P["Translate text blocks in batches
with neighboring-page context"]
P --> Q["Build translated Word document"]
Q --> R["📄 output.lang.docx"]
N -- No --> S(("Done"))
M --> S
R --> S
Apply the same patterns to other diagram types where applicable (e.g. emojis for key entities, multi-line labels for steps with external dependencies).