/cc-intelligent-ui:intelligent-uifrom cc-intelligent-ui
Provides full Typst API, recipes, and compile checks for complex terminal drawings (diagrams, flow charts, state machines, architecture, plots, timelines, trees, heatmaps, gantt charts). Load before writing unusual typst blocks or after a compile failure.
Ships in cc-intelligent-ui. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Intelligent UI draws each answer as a picture with the template render/md.typ. A fenced typst (or typ) block is compiled live and drawn in the answer. This skill tells you how to write a block that compiles and looks right in dark and light mode, and how to check it before you answer.
#). It must start with its own #import lines:
#import "@preview/cetz:0.5.2"
#import "@preview/cetz-plot:0.1.4": plot, chart
#import "@preview/fletcher:0.5.8" as fletcher: diagram, node, edge
These are the only packages. There is no network.theme is in scope. Its keys:
fg, muted, link, border, accent, bg, code-bg, red, green, blue, yellow, orange, purplepalette: 6 colours in this order: blue, orange, green, red, purple, yellowwidth: the content width (a length). height: the height a drawing should fit in (a length; 3/4 of the width when the terminal height is unknown). page-width: the page width.text-size (11pt), sans and mono (font lists), dark (bool)theme.width × theme.height. The terminal is wide and short, so lay flows out left to right. A drawing wider than its space is made smaller. A drawing taller than theme.height is never made smaller: the page grows and the answer gets long.theme.width and theme.height, never from fixed page numbers.theme.fg and the body font. Strokes do not: the default stroke is black, which is invisible on a dark theme. Pass a theme colour to every stroke, axis, tick, legend and mark..transparentize(80%). Colour data series with theme.palette in order. Use theme.muted for secondary text.#page, #pagebreak and #set page are errors. A column break is dropped.read, image, json, csv, include and import of a file path are errors. Packages (@preview/...) still import. Put the data in the block./tmp/iui-draft.typ.${CLAUDE_SKILL_DIR}/scripts/check.sh /tmp/iui-draft.typ.error, read the diagnostics, fix the file and run it again.For a full answer with Markdown around the drawings, write it to a .md file and check that file: it compiles the way the mod does.
| You want to draw | Use | Reference |
|---|---|---|
| Flow chart, pipeline, state machine, architecture boxes and arrows, commutative diagram | fletcher | fletcher.md |
| Free drawing: timeline, tree, geometry, custom shapes, annotated figures, layouts with exact positions | cetz | cetz.md |
| Line, scatter or function plot, filled area, bar or error bars on numeric axes, contour | cetz-plot plot | plot.md |
| Bar, column, pie, radar, pyramid or box chart of categories | cetz-plot chart | charts.md |
| Candlestick, ratio bars, heatmap, gantt, waterfall | cetz rects and lines in a scaled box | charts.md |
| Coloured table, cards, side-by-side panels, a legend row | plain Typst table, grid, box, rect | typst.md |
If Markdown shows it well (a plain table, a list), use Markdown, not typst.
A timeline in a 10 × 2 unit box. It shows the canvas size, the stroke style, fills and muted text:
#import "@preview/cetz:0.5.2"
#cetz.canvas(length: calc.min(theme.width / 10, theme.height / 2), {
import cetz.draw: *
set-style(stroke: theme.fg)
line((0, 0), (10, 0), mark: (end: ">"))
for (x, name, date, c) in ((1, [v1.0], [Jan], theme.blue), (4, [v1.1], [Apr], theme.green), (8, [v2.0], [Oct], theme.orange)) {
circle((x, 0), radius: 0.15, fill: c, stroke: none)
content((x, 0.5), name)
content((x, -0.5), text(fill: theme.muted, date))
}
})
${CLAUDE_SKILL_DIR}/scripts/check.sh [--theme NAME] [--mode dark|light|both] [--width PT] [--height PT] FILE
FILE: a .typ file is one block body without fences. A .md file is Markdown with typst blocks. - reads the text from stdin.--theme NAME). --mode is both by default. --width and --height set the space in pt.using … line, then one line per mode. ok <mode> <png> … gives the PNG paths. error <mode> is followed by the compiler diagnostics (FILE:line:col: error: …)..md file compiles as one page. The mod can split a long answer into more pages. Its Markdown images show as their alt text here (the mod draws them).--opt=value, -h, and a folder path for --theme.cetz.draw.set-style(axes: (stroke: theme.fg, tick: (stroke: theme.fg)), legend: (fill: theme.bg, stroke: theme.border)).set-style(stroke: theme.fg). Lay the drawing out in a W × H unit box: cetz.canvas(length: calc.min(theme.width / W, theme.height / H), { … }).node-stroke: theme.fg, edge-stroke: theme.fg and node-shape: rect (small nodes become circles). Use crossing-fill: theme.bg. stroke: none makes a text-only node.\, and go around nodes with corner points, not bend.rect and line in a scaled coordinate box.h shadows the spacing function h(). Do not use it in destructuring or loops.$ starts math and ~ is a non-breaking space. Write \$ and \~. Use #(expr) to put an expression into content.theme.height is not made smaller. Make it wider and shorter instead.Read only the file that matches the drawing:
references/typst.md: the Typst language for blocks, layout, table and grid, the theme keys, common compile errors and their fixes.references/fletcher.md: fletcher for flow charts, state machines, architecture diagrams and commutative diagrams.references/cetz.md: cetz free drawing: canvas, primitives, anchors, timelines, trees, geometry.references/plot.md: cetz-plot plot: line, scatter, function, bar, error bar, fill and contour plots.references/charts.md: cetz-plot chart (bar, column, pie, radar, pyramid, box) and custom charts (candlestick, ratio bars, heatmap, gantt, waterfall).The files are in ${CLAUDE_SKILL_DIR}/references/.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub razorback16/cc-intelligent-ui --plugin cc-intelligent-uiOther plugins' skills for the same job