一键导入
neva-to-mermaid
Convert Neva programs to valid Mermaid flowchart diagrams. Use when asked to visualize Neva code as Mermaid.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Convert Neva programs to valid Mermaid flowchart diagrams. Use when asked to visualize Neva code as Mermaid.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use for Go changes in Neva: authoring, refactoring, debugging, or review.
Use for Neva source or snippets: authoring, refactoring, debugging, or review.
Use for focused review of a Neva pull request, branch, diff, or patch.
Prepare a Neva GitHub release draft from merged PRs, previous release style, and local multi-platform artifacts. Use this for monthly release preparation in nevalang/neva.
A systematic approach to refactoring complex codebases.
Create a Discord-ready Neva release announcement from a GitHub release payload. Use for official Neva Discord release posts.
| name | neva-to-mermaid |
| description | Convert Neva programs to valid Mermaid flowchart diagrams. Use when asked to visualize Neva code as Mermaid. |
Use this skill to convert any Neva source code into a Mermaid flowchart.
Read the Neva code to be converted.
Generate a Mermaid flowchart TB diagram using the following rules:
Layout: Always include this header at the top:
---
config:
layout: elk
---
flowchart TB
Ports:
:in / :out:
([":data"]), ([":res"]), ([":err"]), etc.data, res, err, sig, case[0], etc).Components:
id["name"].Literals:
zero@{ label: "0", shape: rect }dot@{ label: "'.'", shape: rect }Connections:
-- <port> --> labels for the wire’s port name.a:out -> b:in, label the edge with the output port name (out), unless Neva explicitly uses the input port name in the wiring (e.g., b:sig).x:res -> y → label edge as resx -> y:sig → label edge as sigx:case[0] -> y → label edge as case[0]If a port name is omitted in Neva, do not infer or guess it. Render an unlabeled edge:
x -> y → x --> yFan-out / Fan-in (IMPORTANT):
jX(( )) where jX is a unique ID.Fan-out: src -> [a, b, :out]
jX(( )).src -- <port> --> jXjX --> a, jX --> b, jX --> out_portFan-in: [a, b] -> dst:port
jX(( )).a --> jX and b --> jXjX -- <port> --> dstGrouping (&):
& to reduce clutter only when it does not hide fan-in/fan-out topology.[...]), prefer junction nodes over &.Do not look up other files in the repo or call web search; this text describes the conversion rules.
Ensure the output is ready to be pasted into the Mermaid playground.
pub def Tap<T>(data T) (res T, err error) {
pass1 Pass<T>
pass2 Pass<T>
lock Lock<T>
handler ITapHandler<T>
---
:data -> [lock:data, handler]
handler:res -> pass1
handler:err -> [pass2, :err]
[pass1, pass2] -> lock:sig
lock -> :res
}