By hmyuuu
BDD (Binary Decision Diagram) visualization skill for Typst — draw, customize, and develop decision diagrams
Use when modifying typdd library source code, adding operators or styles, fixing layout or rendering, writing tests, or debugging BDD construction.
Use when user wants to draw, render, visualize, or customize a Binary Decision Diagram (BDD) in Typst, or asks about boolean expression diagrams, decision trees, or logic circuit visualization.
A Typst package for visualizing Binary Decision Diagrams (BDDs). Write a boolean expression, get a publication-ready diagram.
Requires Typst >= 0.12 and fletcher >= 0.5.8
This project is also available as a Claude Code plugin. Install to get your ai agents equipped with /typdd skill:
/plugin marketplace add https://github.com/hmyuuu/typdd
/plugin install typdd
#import "@preview/typdd:0.1.0": *
#bdd("x1 & x2")
#bdd("x1 ^ x2")
#bdd("x1 => x2")
#bdd("(x1 & x2) | (x3 & x4)", compact: true)

All standard operators are supported: & (AND), | (OR), ! (NOT), ^ (XOR), => (IMPLIES), ~& (NAND), ~| (NOR), ~^ (XNOR), and ite(c, t, f).
Built-in styles: classic (default), paper, presentation, and curved.
bdd("x1 & (x2 | !x3)", style: "classic")
bdd("x1 & (x2 | !x3)", style: "paper")
bdd("x1 & (x2 | !x3)", style: "presentation")
bdd("x1 & (x2 | !x3)", style: "curved")

Edge labels (default or custom), custom node labels, layout direction, compact mode, and target height.
bdd("x1 & (x2 | !x3)", show-edge-labels: true)
bdd("x1 & (x2 | !x3)", show-edge-labels: ("T", "F"))
bdd("a & (b | !c)", labels: (a: "🐶", b: "🐱", c: "🐟"), style: "presentation")
bdd("x1 & (x2 | !x3)", direction: "BT")
bdd("(x1 & x2) | (x3 & x4)", compact: true, style: "curved", height: 2cm)

bdd(expr, ..options)| Parameter | Type | Default | Description |
|---|---|---|---|
expr | str | required | Boolean expression |
style | str | "classic" | classic / paper / presentation / curved |
order | array | none | Variable ordering |
labels | dict | (:) | Variable display names |
show-edge-labels | bool / array | false | true for 0/1, or ("high", "low") for custom |
direction | str | "TB" | TB / BT / LR / RL |
width | length | auto | Target width — adjusts node spacing |
height | length | auto | Target height — adjusts level spacing |
scale | float | 1.0 | Uniform zoom factor |
compact | bool | false | Tighter spacing for large BDDs |
center-root | bool | true | Center diagram on root node |
node-sep | length | auto | Horizontal spacing between nodes |
level-sep | length | auto | Vertical spacing between levels |
reduced | bool | true | Apply BDD reduction |
bdd-from-json(data, ..options)Import a BDD from JSON interchange format. Same rendering options as bdd().
make install # install dependencies
make test # run all tests
make examples # compile examples to PNG
See AGENTS.md for development guide.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub hmyuuu/typddMeta-skills for AI agent self-improvement and skill management.
Development skills - issue triage, experiment logging, and more. L2 autonomy with human validation.
Academic research skills - papers, citations, derivations, typst/cetz, and more. L1-L3 autonomy with human validation.
Inline terminal visualization for scientific diagrams via typst
Claude Code skill for generating high-quality draw.io diagrams with proper font settings, arrow placement, and Japanese text support
Generate, validate, render D2 diagrams from text or code
Editorial-quality technical and product diagrams — 13 types rendered as standalone HTML with inline SVG, skinnable to match your brand
Generate professional draw.io diagrams from natural language — flowcharts, architecture diagrams, comparisons, and more.
Excalidraw diagramming toolkit — auto-diagram any codebase, architecture diagrams, data flows, with PNG/SVG/URL export
Build interactive, click-through architecture diagrams as a single HTML file. Animated step-by-step flows, mode toggles, dark/light theme, side panel with payloads.