mermaid-diagrams

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…

npx skills add https://github.com/langchain-ai/openwiki --skill mermaid-diagrams

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

  • sequenceDiagram for runtime and request flows across components (auth flows, request lifecycles, agent tool loops).
  • stateDiagram-v2 for lifecycles and state machines (job states, connection states, run phases).
  • erDiagram for the data model: entities and their relationships.
  • flowchart TD for 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".
  • In flowchart, wrap any label containing parentheses, brackets, or other punctuation in double quotes: A["calls foo(bar)"].
  • In flowchart, never use the bare word end as a node id, and never start a node id with o or x followed 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 be Notifier, not Note (which collides with the note keyword).
  • 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.

Thêm skills từ langchain-ai

langgraph-docs
langchain-ai
Truy cập tài liệu LangGraph để xây dựng tác nhân có trạng thái và quy trình làm việc đa tác nhân. Lấy tài liệu Python chính thức của LangGraph bao gồm máy trạng thái, thiết kế tác nhân dựa trên đồ thị và các mẫu có sự can thiệp của con người. Ưu tiên tài liệu phù hợp theo loại truy vấn: hướng dẫn triển khai cho câu hỏi cách làm, trang khái niệm cho lý thuyết, hướng dẫn cho ví dụ từ đầu đến cuối và tham chiếu API cho chi tiết kỹ thuật. Tự động chọn 2–4 URL tài liệu phù hợp nhất và truy xuất nội dung của chúng để trả lời...
official
langgraph-human-in-the-loop
langchain-ai
Tạm dừng thực thi đồ thị để con người xem xét, phê duyệt hoặc xác thực, sau đó tiếp tục với đầu vào của họ. Yêu cầu ba thành phần: một bộ kiểm tra điểm dừng (InMemorySaver hoặc PostgresSaver), một ID luồng trong cấu hình và tải trọng ngắt có thể tuần tự hóa JSON. interrupt(value) tạm dừng và hiển thị dữ liệu; Command(resume=value) tiếp tục và trả về giá trị đó cho nút đã tạm dừng. Tất cả mã trước interrupt() sẽ thực thi lại khi tiếp tục, vì vậy các tác dụng phụ phải có tính chất đơn giản (sử dụng upsert, không phải insert). Hỗ trợ quy trình phê duyệt,...
official
web-research
langchain-ai
Sử dụng kỹ năng này cho các yêu cầu liên quan đến nghiên cứu web; nó cung cấp một cách tiếp cận có cấu trúc để thực hiện nghiên cứu web toàn diện
official
langchain-oss-primer
langchain-ai
LUÔN BẮT ĐẦU TỪ ĐÂY cho bất kỳ dự án xây dựng agent LangChain, Deep Agents hoặc LangGraph nào. Điểm khởi đầu bắt buộc trước khi chọn các kỹ năng khác hoặc viết bất kỳ…
official
skill-creator
langchain-ai
Hướng dẫn tạo kỹ năng hiệu quả để mở rộng khả năng của tác nhân với kiến thức chuyên môn, quy trình làm việc hoặc tích hợp công cụ. Sử dụng kỹ năng này khi người dùng…
official
social-media
langchain-ai
Soạn thảo bài đăng mạng xã hội theo từng nền tảng với nội dung dựa trên nghiên cứu và hình ảnh đồng hành được tạo tự động. Hỗ trợ bài đăng LinkedIn (1.300 ký tự với giọng văn chuyên nghiệp) và chuỗi Twitter/X (280 ký tự mỗi tweet theo định dạng 1/🧵). Yêu cầu ủy quyền nghiên cứu cho một trợ lý phụ trước khi viết, sau đó đọc lại kết quả để đảm bảo độ chính xác và phù hợp. Tự động tạo hình ảnh mạng xã hội bắt mắt bằng công cụ generate_social_image với bố cục đậm, tương phản cao, tối ưu cho kích thước nhỏ...
official
deep-agents-memory
langchain-ai
Các backend bộ nhớ và tệp có thể cắm cho Deep Agents với các tùy chọn định tuyến tạm thời, bền vững và kết hợp. Bốn loại backend: StateBackend (theo luồng, tạm thời), StoreBackend (bền vững xuyên phiên), FilesystemBackend (truy cập đĩa thực cho phát triển cục bộ) và CompositeBackend (định tuyến các đường dẫn khác nhau đến các backend khác nhau). FilesystemMiddleware cung cấp sáu công cụ thao tác tệp: ls, read_file, write_file, edit_file, glob, grep. CompositeBackend sử dụng so khớp tiền tố dài nhất để định tuyến...
official
deep-agents-orchestration
langchain-ai
Điều phối các tác nhân phụ, lập kế hoạch tác vụ đa bước và yêu cầu phê duyệt của con người cho các thao tác nhạy cảm. Ủy quyền công việc cho các tác nhân phụ chuyên biệt thông qua công cụ tác vụ; các tác nhân phụ tùy chỉnh hỗ trợ bộ công cụ và lời nhắc hệ thống riêng biệt, trong khi tác nhân phụ "đa năng" mặc định kế thừa cấu hình của tác nhân chính. Lập kế hoạch và theo dõi các quy trình phức tạp với write_todos, sắp xếp tác vụ qua các trạng thái đang chờ, đang tiến hành và đã hoàn thành; yêu c
official