pele
Use when a request names pele or pele.run, or a project depends on the `pele` npm package: writing, rendering, or theming its diagrams, or calling its API.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- kind
- general
- name
- pele
- description
- Use when a request names pele or pele.run, or a project depends on the `pele` npm package: writing, rendering, or theming its diagrams, or calling its API.
02 资源文件 47
- 资产文件assets/page.css2.1 KB
- 资产文件assets/theme-dark.css762 B
- 资产文件assets/theme-light.css454 B
- 参考文档references/source/api.md13.1 KB
- 参考文档references/source/compatibility.md3.3 KB
- 参考文档references/source/examples/agentflow.md4.3 KB
- 参考文档references/source/examples/architecture.md3.8 KB
- 参考文档references/source/examples/block.md3.6 KB
- 参考文档references/source/examples/c4.md14.9 KB
- 参考文档references/source/examples/class.md8.0 KB
- 参考文档references/source/examples/cynefin.md908 B
- 参考文档references/source/examples/er.md6.5 KB
- 参考文档references/source/examples/eventmodeling.md2.9 KB
- 参考文档references/source/examples/flowchart.md36.1 KB
- 参考文档references/source/examples/gantt.md4.8 KB
- 参考文档references/source/examples/git.md15.7 KB
- 参考文档references/source/examples/ishikawa.md1.1 KB
- 参考文档references/source/examples/journey.md687 B
- 参考文档references/source/examples/kanban.md1.2 KB
- 参考文档references/source/examples/mindmap.md1.3 KB
- 参考文档references/source/examples/packet.md1.5 KB
- 参考文档references/source/examples/pie.md463 B
- 参考文档references/source/examples/quadrant.md2.2 KB
- 参考文档references/source/examples/radar.md975 B
- 参考文档references/source/examples/railroad.md3.3 KB
- 参考文档references/source/examples/requirement.md4.2 KB
- 参考文档references/source/examples/sankey.md3.6 KB
- 参考文档references/source/examples/sequence.md8.8 KB
- 参考文档references/source/examples/state.md5.9 KB
- 参考文档references/source/examples/swimlane.md4.5 KB
- 参考文档references/source/examples/timeline.md4.8 KB
- 参考文档references/source/examples/treemap.md1.6 KB
- 参考文档references/source/examples/treeview.md2.9 KB
- 参考文档references/source/examples/usecase.md6.8 KB
- 参考文档references/source/examples/venn.md1.4 KB
- 参考文档references/source/examples/wardley.md5.7 KB
- 参考文档references/source/examples/xychart.md2.6 KB
- 参考文档references/source/index.md2.2 KB
- 许可证references/source/LICENSE1.9 KB
- 参考文档references/source/README.md1.5 KB
- 参考文档references/source/security.md3.1 KB
- 参考文档references/source/theming.md4.5 KB
- 脚本scripts/render_diagrams.py21.6 KB
- 脚本scripts/render_pages.py25.7 KB
- 脚本scripts/tests/conftest.py682 B
- 脚本scripts/tests/test_render_diagrams.py3.3 KB
- 脚本scripts/tests/test_render_pages.py3.5 KB
03 SKILL.md 正文
Pele
Pele is a new renderer, not Mermaid. It reads Mermaid syntax and draws the diagram with its own layout, in a browser or in Node, with colors from CSS variables. Mermaid habits apply to syntax only. Before you reuse a Mermaid habit, read Differences from Mermaid.
Resolve bundled paths relative to this skill directory. references/source/ holds the pele.run pages at the version that its README names. When the project uses a newer pele, read the live page at https://pele.run/<page>.md, such as https://pele.run/api.md.
To draw a diagram, follow Draw a diagram. To hand a sequence diagram to a reader, such as a client, as web pages and images, go to Pages and images. To add pele to an app, go to Pele in an app.
Draw a diagram
- State the reader's question and the takeaway in one sentence each. Say whether the input is measured data, an estimate, or a made-up example
- Choose the type in Choose by question. For an exploratory request, compare two or three types that show different facts about the same subject. For other requests, use one type
- List the headings of the type's examples page with
rg -n '^#' <page>. Copy the closest example as the start - Model the meaning before the style: units, direction, the meaning of each arrow, and any scale. Do not invent observations or turn a hypothesis into a proven cause. When the type accepts them, add the accessibility title and description,
accTitleandaccDescr. Done when the diagram alone shows each unit and the meaning of each arrow - Run Render and verify until the script answers
{"ok":true,...}and the screenshot shows the takeaway - Deliver the SVG, its screenshot, the editable source, one sentence on how to read the diagram, and the pele version that the script reported
Choose by question
| Reader's question | Type and examples |
|---|---|
| What happens next, or under which condition? | Flowchart |
| Who performs each step of a process? | Swimlane |
| Who exchanges what, and in what order? | Sequence |
| Which states exist, and what moves between them? | State |
| What entities exist, and how do they relate? | ER, Class |
| At what architectural level are we speaking? | C4 |
| How are services connected? | Architecture |
| How do AI agents pass work to each other? | Agentflow |
| How do commands, events, and views change a system over time? | Event modeling |
| Which goals does each actor reach with the system? | Use case |
| Which elements satisfy or verify each requirement? | Requirement |
| When does each task happen? | Gantt, Timeline |
| What is in progress, by status? | Kanban |
| How satisfying is each step of a task? | Journey |
| How did branches diverge and merge? | Git graph |
| Where does a quantity flow? | Sankey |
| How is a whole divided? | Pie, Treemap for a hierarchy |
| How does a value change along an axis? | XY chart |
| What deserves attention given two criteria? | Quadrant |
| Which tradeoffs disappear inside an average score? | Radar |
| What do sets share? | Venn |
| Which causes contribute to a problem? | Ishikawa |
| Should we apply a procedure, analyze, experiment, or stabilize? | Cynefin |
| What should we build, buy, or let evolve? | Wardley |
| What ideas branch from one topic? | Mindmap |
| What does a hierarchy of files or folders hold? | Tree view |
| What syntax does a grammar accept? | Railroad |
| Which fields does a packet hold? | Packet |
| Where do blocks sit in a grid I arrange? | Block |
A diagram computes nothing: no critical path, causal inference, or statistics. When the task is an exact quantitative comparison, use a plotting tool.
Syntax and meaning
- Keep short, stable IDs apart from display labels. Quote each label that holds punctuation:
api["API (public)"] - Use text as well as color for each distinction
- In a sequence diagram, keep the label of a message from a participant to itself at two lines or fewer: pele 1.6.0 draws a third line over the next frame or message. Remove this limit when pele fixes the height calculation
- Label made-up data as made-up. Below the diagram, say what the diagram cannot establish
Render and verify
Requires uv (uv --version), Node.js 20 or later (node --version), and pnpm (pnpm --version). To use the project's pele, run scripts/render_diagrams.py from the project's folder. When the script finds no pele, its error gives the install command.
# Check only, without files
uv run <this-skill-folder>/scripts/render_diagrams.py diagram.mmd
# Also write one SVG per diagram
uv run <this-skill-folder>/scripts/render_diagrams.py notes.md --output /tmp/pele
For the inputs, the theme option, and the answer fields, run the script with --help. Fix each error at the file:line:column that the script names. Then run the script again.
To inspect an SVG, take a screenshot of it in a Chromium browser (chromium --version), at the width and height that the answer gives. rsvg-convert and ImageMagick ignore pele's CSS variables and draw every shape black.
chromium --headless --screenshot=/tmp/pele/diagram.png --window-size=<width>,<height> file:///tmp/pele/diagram.svg
On macOS, use "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" in place of chromium. Read the screenshot. Check the labels, arrowheads, legend, contrast, and takeaway. An ok answer proves that the diagram renders with that pele version, not with Mermaid or another host's renderer.
When the screenshot is taller than about 2000 px, use ImageMagick 7 (magick --version) to cut it into slices. From the screenshot's folder (/tmp/pele in the example above), run magick diagram.png -crop x1400 +repage slice-%02d.png, then read each slice. ImageMagick only cuts the PNG that Chromium drew, so pele's colors stay intact.
Pages and images
scripts/render_pages.py turns a .mmd file that holds a sequence diagram into a light page, a dark page, and a JPEG of each page, 1920 pixels wide at twice the pixel density. It writes them beside the .mmd file. The pages are self-contained and in Canadian French. Each page draws the diagram in the reader's browser, so the labels fit the font that browser shows. The script needs the tools of Render and verify and a Chromium browser; when it finds no Chromium, its error gives the install command. Run the script with --help for the title and actor options.
uv run <this-skill-folder>/scripts/render_pages.py process.mmd --title "PROC_01 | Handle a request" --actor CLIENT
- Run the script until it answers
{"ok":true,...} - Open each JPEG. Check the title, the legend, every participant, and the last message
- Write the command beside the diagram, such as in its notes, so the next run after a change gives the same pages
To put a page online, use the html-publish skill.
Theme
assets/theme-dark.css sets a black canvas, white text, and Catppuccin Frappe accents as pele variables. assets/theme-light.css sets a white canvas and dark Frappe text. Each theme also holds the colors that assets/page.css gives to notes, to notes that start with ✅, to break frames, and to messages that start with 🔷. render_diagrams.py embeds the dark theme in each SVG, and render_pages.py puts one theme in each page. The embedded theme applies to every pele diagram on an HTML page. Before you put an SVG inline in a page, render it with --no-theme. In an app, add a theme to the page's CSS. Theming lists every variable and class name.
Pele in an app
- Rendering, mounting, errors, and imports: read API
- Diagrams from untrusted authors: before you insert their SVG or an error message, read Security
- Fonts: pele measures labels before it draws them. Pass the page's font as Fonts describes
- Pele compared with Mermaid.js: read the home page for the bundle size and the render time
04 同仓库更多 Skills
writing-great-skills
Use when creating, modifying, evaluating a skill.
writing-for-agents
Use when creating, editing, or reviewing a skill, AGENTS.md, CLAUDE.md, or another document agents read.
why
Use for questions about design rationale, the history of regressions or incidents, or the evidence behind thresholds and tradeoffs. Use `how` for runtime behavior. Do not use for plain commit or date lookups.
verify-video-archive
Use when validating the macOS or Linux archive workflow reached by `just convert-video`, including real media, prerequisites, terminal progress, source safety, locking, and recovery.
verify-transcript
Use when validating transcript CLI behavior, locating its verification features, or running the paid YouTube end-to-end check.
verify-skills
Use when verifying `just compile-skills`, `just remote-skills`, `just install-skills`, or `just skills-discover` in the skills repository, such as after changing their scripts or adding, renaming, or moving a skill.