Skip to content
Back to skills

Typdd

ASecurity

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.

  • 4 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added September 12, 2026
toolsbashnodeexpressapi

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 12, 2026

npx -y skills add aibot88/sec_skill_store --skill typdd --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Typdd?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Typdd
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aibot88-typdd/badge)](https://www.skillsdirectory.com/skills/aibot88-typdd)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: typdd
description: 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.
argument-hint: <boolean expression or customization request>
allowed-tools:
  - Write
  - Edit
  - Bash
  - Read
  - Glob
---

# typdd

Render publication-ready BDD diagrams in Typst. Write `#bdd("expr")`, typdd handles parsing, building, reducing, layout, and rendering via fletcher.

## Workflow

1. **New file:** create `.typ` with `#bdd(...)` — **existing file:** add/edit `#bdd(...)` calls
2. Ensure `#import "@preview/typdd:0.1.0": bdd` is at the top
3. Compile: `typst compile file.typ file.png` (add `--root .` for local imports)

## Example

```typst
#import "@preview/typdd:0.1.0": bdd
#set page(width: auto, height: auto, margin: 1em)
#set text(font: "New Computer Modern", size: 10pt)

#grid(
  columns: 3, column-gutter: 2em, align: center + horizon,
  bdd("x1 & x2"),
  bdd("x1 ^ x2", style: "presentation"),
  bdd("a & (b | !c)", labels: (a: $alpha$, b: $beta$, c: $gamma$), compact: true),
)
```

## API — `bdd(expr, ..options)`

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `expr` | `str` | **required** | Boolean expression |
| `style` | `str` | `"classic"` | `classic` / `paper` / `presentation` / `curved` |
| `order` | `array` | `none` | Variable ordering, e.g. `("x3","x1","x2")` |
| `labels` | `dict` | `(:)` | Display names: `(x1: $alpha$)` or `(a: "emoji")` |
| `show-edge-labels` | `bool` | `false` | Show 0/1 on edges |
| `direction` | `str` | `"TB"` | `TB` / `BT` / `LR` / `RL` |
| `scale` | `float` | `1.0` | Uniform scale factor |
| `compact` | `bool` | `false` | Tighter spacing for large BDDs |
| `reduced` | `bool` | `true` | Apply BDD reduction (set `false` for teaching) |
| `center-root` | `bool` | `true` | Center on root node |
| `node-sep` / `level-sep` | `length` | `auto` | Spacing overrides |
| `show-complement` | `bool` | `false` | Complement edge bubbles |

`bdd-from-json(data, ..options)` — same rendering options, imports from JSON interchange format.

## Operators

`&` AND · `|` OR · `!` NOT · `^` XOR · `=>` IMPLIES · `~&` NAND · `~|` NOR · `~^` XNOR · `ite(c,t,f)`

Precedence (low→high): `=>` → `|` → `^` → `&` → `!`. Variables: alphanumeric (`x1`, `input_A`). Constants: `0`, `1`, `true`, `false`.

## Styles

`classic` (B&W default) · `paper` (thin grayscale) · `presentation` (blue/colored) · `curved` (curved edges)

## Common Mistakes

| Mistake | Fix |
|---------|-----|
| Missing `#set page(width: auto, height: auto)` | Add it for standalone images |
| Using `&&` or `\|\|` | Single-char: `&` and `\|` |
| Hyphenated variable names | Alphanumeric only: `input_A` not `input-A` |
| >20 variables or >1000 char expression | Simplify or use `compact: true` |

Files in this skill

  • SKILL.md2.8 KB
  • source.json666 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.