agentsclimarketplace

Lumen diagram

Skill MonsieurBarti/lumen/skills/lumen-diagram

Generate single-file HTML diagram (architecture, flow, sequence, ER, state, gantt, network, dependency graph, AI pattern). Invoke when user asks to draw, diagram, visualize, sketch architecture, show flow, or describes system / pipeline / topology to illustrate.From its SKILL.md

Install
npx -y skills add MonsieurBarti/lumen --skill lumen-diagram

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 12 stars12 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

7.5 KB, as published. Nobody here has run it

lumen-diagram

Single-file HTML diagram via foreignObject + CSS flexbox in 0–100 coordinate space. Offline-safe (file://). No JS at runtime.

Tier: capability (atomic) — does not invoke other lumen skills. Composites and playbooks may invoke it.

When to invoke

Triggers: draw, diagram, visualize, sketch, map, show the flow, architecture of X, sequence of Y, state machine, network topology, ER diagram, RAG pipeline, multi-agent, tool-call flow, dependency graph.

Pipeline

  1. Pick topology — read templates/<topology>.html (15 ship in this skill, see table below). The HTML is the structural skeleton; you fill in nodes + edges.
  2. Set node coordinates in 0–100 space via CSS custom props on each node: style="--x:20; --y:30; --w:18; --h:12". CSS does the layout math; LLM does not.
  3. Pick node shape per semantic class (table 2 below).
  4. Pick edge class per semantic role (table 3 below).
  5. Inline only the CSS subset your topology uses into a <style> block — never the whole 1300-line templates/fgraph-base.css. Each examples/*.html shows the right subset for its topology (typically 60–120 lines: container + chosen primitives + arrow markers). Inlining the full base would 10× the output size for no semantic gain. Keep the file single, offline-safe.

Topology selection (1)

PatternTemplate
hub-spoke, message bus, central brokerradial-hub.html
peer cluster, no centerradial-ring.html
2–4 stage pipelinelinear-flow.html
lanes × rows pipelinelane-swim.html
3–4 tier stacklayered.html
multi-tier deploymentdeployment-tiers.html
cross-host deploymentmachine-clusters.html
API / message exchangesequence.html
FSM, state machinestate.html
schedule, roadmap, timeline barsgantt.html
composition, proportionpie.html
relational schemaer.html
issue / dependency DAGdep-graph.html
dual-cluster comparisondual-cluster.html
≥15 components, full-systemsystem-architecture.html

For RAG / Mem0 / Multi-Agent / Tool-Call / Agent-Memory: compose existing topologies per templates/ai-patterns.md recipes (lifted from fireworks-tech-graph).

Node shape vocabulary (2)

CSS classSemantic
.cylinderdatabase, store, persistent state
.hexagonagent, worker, processor
.pillmessage broker, bus, queue
.foldedfile, config, document
.diamonddecision gate
.circleevent, trigger
(default rect)service, microservice, generic component

Edge semantics (3)

CSS classColorUse
.datapurplepayloads, results
.controlaccentinvocation, routing
.writegreen dashedwrites to store
.feedbackamberreward, loss, retry signal
.asyncmuted dashedpub/sub, queues
.thick(any)critical path; one per diagram

Layout rules (lift verbatim from roxabi)

  • R1 even stride between sibling nodes
  • R2 ≥2% gap between adjacent nodes
  • R3 ≥2% row clearance
  • R4 arrows straight (no diagonal through nodes)
  • R5 edge color matches semantic class
  • R6 solid component fills cover edges (z-order: arrows first in DOM, nodes last)
  • R7 ≤20-char node labels; longer goes in title tooltip. Sequence message labels (.fg-seq-msg-lbl) are exempt — call signatures and return shapes commonly run 30–50 chars and read fine on the wire.

Output

Single HTML file. The CSS subset of templates/fgraph-base.css your topology uses is inlined in <style> (see Pipeline step 5). SVG inlined. No external deps. Opens via file://.

Aesthetics

5 ship in skills/_shared/aesthetics/ (promoted from templates/aesthetics/ in v0.2 once chart + guide + slides + gallery started consuming them). Pick one and inline it into the output <style> block AFTER fgraph-base.css (it overrides tokens).

FileIdentity
dark-professional.css (default)semantic palette (cyan=frontend, emerald=backend, violet=database, amber=cloud, rose=security); JetBrains Mono
editorial.csswarm technical document; serif feel
blueprint.cssclean technical, monospace
terminal.cssretro CLI, high contrast
lyra.csswarm amber, narrative tone

Each file defines [data-theme="dark"] and [data-theme="light"] tokens. Set data-theme on <html> or <body> to switch.

Examples

10 ship in examples/. Each demonstrates one topology:

FileTopologySource
web-app.html, microservices.html, aws-serverless.htmlvariousarchitecture-diagram-generator
dep-graph.htmldep-graphroxabi
er-schema.htmlerroxabi
gantt-roadmap.htmlganttroxabi
pie-composition.htmlpieroxabi
sequence-api.htmlsequenceroxabi
state-machine.htmlstateroxabi
system-architecture.htmlsystem-architectureroxabi

Open any in a browser. Use the closest-match as a starting point when authoring a new diagram.

PI extension route (v0.2)

The lumen-generate_visual PI tool wires type: "diagram" for all 15 topologies. Every topology listed in the table above is callable via the PI tool with a structured FgraphContent object.

Coordinate philosophy for the PI route: callers describe topology semantically (lane indices, layer indices, compass positions, stage chains, tier indices, host indices, row indices, entity indices, state indices, task indices) and the renderer computes absolute --x/--y. Free-form topologies (system-architecture, dual-cluster) accept logical zone/cluster labels and node counts; the renderer distributes components automatically.

Call shape:

generateVisual({
  type: "diagram",
  title: "RAG pipeline",
  aesthetic: "dark-professional",  // any of the 13 fgraph aesthetics
  content: {
    topology: "linear-flow",
    stages: [
      { name: "Query" },
      { name: "Embed", shape: "hexagon", tone: "cyan" },
      { name: "VectorSearch", shape: "cylinder", tone: "purple" },
      { name: "LLM", shape: "hexagon", tone: "amber" },
      { name: "Response" },
    ],
    edges: [{ from: 1, to: 2, semantic: "async", label: "embedding" }],
  },
});

Full FgraphContent shape and per-topology field requirements: src/templates/diagram/schemas.ts.

Library exports (for direct programmatic use without the PI tool):

  • generateDiagramTemplate(input) — returns the single-file HTML string
  • parseFgraphContent(unknown) — schema validator with precise error paths
  • generateArchitectureTemplate(...) — visual-explainer text-card layout (separate from fgraph)

Sources

  • roxabi-forge/plugins/forge/references/graph-templates/ (MIT) → 15 templates + 7 examples + fgraph-base.css
  • roxabi-forge/plugins/forge/references/aesthetics/ (MIT) → 4 aesthetics
  • architecture-diagram-generator (MIT) → 3 examples + semantic palette behind dark-professional.css
  • fireworks-tech-graph (MIT) → AI pattern recipes paraphrased into templates/ai-patterns.md
  • gmdiagram/gm-architecture (MIT) → JSON schemas (land in _shared/schemas/diagram/ when type: "diagram" PI route is wired)

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.