figure-typst
Use when the manuscript root is `.typ` (or the user asked for CeTZ / Typst diagrams) — catalog templates first (layered boxes, fletcher exchange), copy the `.typ`, edit only the contract lets, typst-compile-standalone, stop when the PDF sits next to the source. LaTeX TikZ → figure-tikz. Not for experiment-data plots (→ figure-matplotlib), manuscript wiring (→ figure-pipeline), or chat panel cards (→ figure-interaction).
- License 许可
- MIT
- 最近更新
- 2026-09-05
- Stars
- ★ 4
- Forks
- 0
01 前言 Front Matter
- name
- figure-typst
- license
- MIT
- description
- Use when the manuscript root is `.typ` (or the user asked for CeTZ / Typst diagrams) — catalog templates first (layered boxes, fletcher exchange), copy the `.typ`, edit only the contract lets, typst-compile-standalone, stop when the PDF sits next to the source. LaTeX TikZ → figure-tikz. Not for experiment-data plots (→ figure-matplotlib), manuscript wiring (→ figure-pipeline), or chat panel cards (→ figure-interaction).
02 资源文件 5
03 SKILL.md 正文
Typst / CeTZ Graphics
Typst papers only (.typ root). If the paper is LaTeX, use figure-tikz.
Start from a shipped, compilable figure. When the PDF is next to the
.typ, the job is done.
library/catalog.json is the menu. Paths in this file (library/…)
are relative to this skill folder — the directory that contains this
SKILL.md — not the project root. Do not edit this folder. Compile
with typst-compile-standalone. Do not bump pins (@preview/cetz:0.3.4, @preview/fletcher:0.5.8).
Do not start from an empty canvas / diagram. First compile may
download the pinned Universe packages (network); do not curl them
yourself.
Pick a base
- Read
library/catalog.json. Match the request to anid/name/tags/domain. One clear hit → name it and proceed. Several fit → list theids and let the user pick. - No catalog hit → closest template, still the closed path. Do not invent a third package.
| Ask | Template |
|---|---|
| Layered boxes / pipeline / schematic | architecture-boxes (CeTZ 0.3.4) |
| Commutative / exchange / arrows | exchange-diagram (fletcher 0.5.8) |
| Data from a run / large CSV | Stop. figure-matplotlib |
Pins are part of the contract. fletcher:0.5.8 already pulls
cetz:0.3.4 — do not import a newer CeTZ in the same file.
Catalog path (closed)
Four steps. No reconnaissance.
- Copy
library/<path>/<typ>into the project's figures folder (Workspace Folder Descriptions — do not guessfigures/if the project uses another name). Rename to the figure. Never edit the file underlibrary/. - Edit the copy — read that item's
template.meta.jsonedit_contract. Change only listed#letparameters. Followoperations. Keep everyinvariant. Do not restyle from scratch. - Compile —
typst-compile-standalonewithmainFileset to that figure path. On error: edit the copy, compile again. Never run a Typst engine via bash. - Stop. Chat already previews the PDF next to the source.
Done = that PDF exists. One short sentence in chat (what the diagram shows). Nothing else.
Do not (unless the user named that next step)
typst-compile— that is the manuscript build, not a figurelatex-compile-standaloneor TikZ- bash
typst/tinymist/curl/rm #imageinto the manuscript, orinteraction-write- bump
@preview/cetzor@preview/fletcherpins
04 同仓库更多 Skills
demo-multi-file
Local test skill with an extra notes file
writing-results
Use when drafting a Results / Experiments / Analysis section — narrating verified evidence from run receipts, with complete statistical reporting, derivation analysis, and honest treatment of negative results. Every number traces to a run; every claim survives the audit.
writing-related-work
Use when drafting a Related Work / literature review section or a standalone synthesis note — organizing prior work into a grounded, cited narrative or comparing methods across papers, from the project library plus staged external discovery. Never cites from memory.
writing-preliminaries
Use when drafting a Preliminaries / Background / Notation section — definitions, problem setup, and formal statements the rest of the paper builds on, with notation consistency and machine-checked formal claims. Reference patterns, not molds; include only what later sections actually use.
writing-methods
Use when drafting a Methods / Methodology / Approach / Model section — expounding the ideas and the reasoning behind the method, grounded in the project's brief, notes, and prior discussions, with empirical details from run receipts. Structure follows the idea's shape; reference angles, not fixed templates.
writing-introduction
Use when drafting or rewriting a paper's Introduction — framing the problem, positioning against prior work, and stating contributions as checkable claims, grounded in the brief, notes, and the library. Reference rhetorical patterns, adapted to the paper — never applied as molds.