mermaid-diagrams
Fungsinya
Skill ini membantu agent AI menggambar diagram yang sederhana dan akurat di dalam halaman dokumentasi. Skill ini untuk orang yang menulis dokumen teknis dan ingin alur serta strukturnya ditampilkan secara visual.
Kapan dipakai
- ✓Saat sebuah halaman menjelaskan permintaan atau proses yang lebih mudah diikuti sebagai gambar.
- ✓Saat sebuah halaman menjelaskan siklus hidup dengan beberapa state atau sekumpulan tabel data yang saling terhubung.
- ✓Saat pembaruan menyentuh halaman yang sudah punya diagram dan diagramnya perlu tetap sinkron.
Link skill
https://github.com/langchain-ai/openwiki/blob/main/skills/mermaid-diagrams/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
“Bisakah Anda menambahkan diagram yang menunjukkan bagaimana permintaan bergerak melalui API kami di halaman dokumentasi?”
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent memilih jenis diagram yang sesuai dengan isinya, seperti diagram sekuens atau diagram state, dan menulisnya dalam format Mermaid. Agent hanya menggambar apa yang didukung kode dan menambahkan keterangan singkat di bawah setiap diagram.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Mermaid Diagrams In Generated Wiki Pages
Diagrams are part of high-quality wiki generation, not decoration. Where a flow, lifecycle, or data model is easier to grasp visually, embed a Mermaid diagram in a fenced ```mermaid block on the most relevant page.
Choosing a diagram type
sequenceDiagramfor runtime and request flows across components (auth flows, request lifecycles, agent tool loops).stateDiagram-v2for lifecycles and state machines (job states, connection states, run phases).erDiagramfor the data model: entities and their relationships.flowchart TDfor branching control flow and decision logic.
Discipline
- Ground every diagram in inspected source. Do not invent participants, states, entities, or relationships the code does not support.
- Cover the high-value cases: add a diagram wherever a page documents a request or runtime flow, a call sequence, a lifecycle or state machine, or a data model. A repository wiki usually has several such diagrams, not one overall. Skip pages that are navigation, reference tables, or pure configuration.
- Still prefer a few strong diagrams over decorating every page: one accurate diagram on the page that needs it beats a diagram forced onto every page.
- Give each diagram a one-line caption directly below it stating what it shows.
- OpenWiki validates every mermaid fence after your run and converts fences that fail to parse into plain text fences. A degraded diagram is a quality failure; follow the syntax rules below so it does not happen.
Syntax safety
These rules prevent the most common render breakages. When in doubt, rephrase the label.
- Never place semicolons or pipes inside node, message, or edge labels.
- Never place unescaped angle brackets in labels; write "returns Promise of User" instead of "returns Promise<User>".
- In
flowchart, wrap any label containing parentheses, brackets, or other punctuation in double quotes:A["calls foo(bar)"]. - In
flowchart, never use the bare wordendas a node id, and never start a node id withoorxfollowed by a dash (both are edge-marker syntax); rename the node. - In
sequenceDiagram, participant names with spaces or punctuation need an alias:participant AS as Auth Service. - Never use a Mermaid reserved word as a participant name, alias, or node id:
note,end,loop,alt,opt,par,and,else,activate,deactivate,class,state,click,link. For example a notification participant must beNotifier, notNote(which collides with thenotekeyword). - In
erDiagram, entity and attribute names must be single identifier-like tokens; put human phrasing in the relationship label. - Keep labels short. Move explanation into the surrounding prose or the caption, not the diagram.
Update runs
- A wrong diagram is a stale claim, not existing structure to preserve. If a source change makes a diagram inaccurate, update the diagram in the same edit as the surrounding prose.
- Do not rewrite a diagram that is still accurate. Regenerating unchanged diagrams creates diff noise.
- If a page contains a text fence preceded by an HTML comment starting with "openwiki: mermaid parse failed", that is a diagram a previous run degraded. Fix the syntax using the parser error in the comment, restore the ```mermaid fence, and delete the comment.
Pertanyaan umum
Jenis diagram apa saja yang bisa dibuat?
Skill ini bisa membuat diagram sekuens, diagram state, diagram relasi entitas, dan diagram alur.
Apakah agent akan menambahkan diagram ke setiap halaman?
Tidak. Agent lebih memilih beberapa diagram yang kuat daripada menghias setiap halaman.
Siapa yang memeriksa bahwa diagramnya benar?
Skill ini menyatakan diagram harus sesuai dengan kode sumber yang diperiksa, dan alat wiki memvalidasinya setelah proses selesai.
Detail
Deskripsi asli dari pembuat
Embed Mermaid diagrams in generated wiki pages. Use whenever documenting a runtime or request flow, a call sequence, a state machine or lifecycle, a data model or entity relationships, or non-trivial control flow, since these are clearer as a diagram than as prose. Also use when an update run touches a page that already contains a mermaid fence, or a page that contains a text fence a previous run degraded.
repo: langchain-ai/openwiki
Popularitas
- Bintang GitHub
- 18k
- Peringkat
- #10737
- Lisensi
- MIT
- Diperbarui
- 2/11/2026
Komentar
- …
Skill lain dari repositori ini
Skill serupa
technical-documentation
394kMembantu agent Anda menulis dan meninjau dokumentasi teknis serta file instruksi agent yang jelas, agar orang dan alat AI dapat mengikutinya dengan mudah.
architecture-decision-records
280kMembuat agent Anda mencatat keputusan penting terkait struktur proyek. Membantu memahami alasan di balik pilihan dan menjaga riwayat perubahan yang jelas.
code-tour
280kMembuat agent Anda menyusun panduan kode langkah demi langkah dengan referensi file dan nomor baris yang tepat. Berguna untuk pengenalan, penjelasan, dan review.