Convert Neva programs to valid Mermaid flowchart diagrams. Use when asked to visualize Neva code as Mermaid.
69
83%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
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 TBPorts:
: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
}a0a5c5f
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.