typst

Typst document creation and package development. Use when: (1) Working with .typ files, (2) User mentions typst, typst.toml, or typst-cli, (3) Creating or using Typst packages, (4) Developing document templates, (5) Converting Markdown/LaTeX to Typst

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "typst" with this command: npx skills add lucifer1004/claude-skill-typst/lucifer1004-claude-skill-typst-typst

Typst

Compilation

typst compile document.typ              # compile once → PDF
typst compile document.typ output.pdf   # explicit output path
typst compile document.typ -f png       # export as PNG image
typst compile src/main.typ --root .     # set project root for /path imports
typst watch document.typ                # recompile on change
typst query document.typ "<label>"      # extract metadata as JSON (see query.md)

Agent verification — choose by what you need to check (see debug.md for details):

MethodCommandBest for
HTML exporttypst compile doc.typ /dev/stdout -f html --features html 2>/dev/nullText content, structure, headings, tables
PNG exporttypst compile doc.typ page-{p}.png -f pngVisual layout, alignment, spacing, fonts
pdftotexttypst compile doc.typ && pdftotext doc.pdf -Fallback for page-specific content

Minimal Document

#set page(paper: "a4", margin: 2cm)
#set text(size: 11pt)

= Title

Content goes here.

Writing Documents

Starting a new document? Copy the closest recipe from Examples below — it's faster than starting blank and each row names the docs to read next.

When you need to...Read
Learn syntax, imports, functions, control flowbasics.md
Learn data types, operators, string/array methodstypes.md
Style pages, headings, figures, layoutstyling.md
Tables, grids, cell spans, borders, data tablestables.md
Academic papers, bibliography, theorems, equationsacademic.md
Convert from Markdown or LaTeXconversion.md
Extract data from documents, multi-pass buildsquery.md

Developing Packages and Templates

When you need to...Read
State, counters, in-document query(), XMLadvanced.md
CLI query, metadata export, multi-passquery.md
Create a reusable template functiontemplate.md
Create or publish a packagepackage.md
Verify output (HTML/PNG/pdftotext, repr)debug.md
Profile performance (--timings, hotspots)perf.md

basics.md and types.md are also the foundation for developers.

Finding Packages

Search the embedded index of Typst Universe packages (updated weekly):

python3 scripts/search-packages.py "what you need"
python3 scripts/search-packages.py "chart" --category visualization
python3 scripts/search-packages.py --category cv --top 5
python3 scripts/search-packages.py --list-categories

Common Errors

ErrorCauseFix
"unknown variable"Undefined identifierCheck spelling, ensure #let before use
"expected X, found Y"Type mismatchCheck function signature in docs
"file not found"Bad import pathPaths resolve relative to current file
"unknown font"Font not installedUse system fonts or web-safe alternatives
"maximum function call depth exceeded"Deep recursionUse iteration instead
"can only be used when context is known"Missing context wrapperWrap in context { ... }
"unexpected argument"= instead of : for argsNamed args use : syntax: func(name: value)
"variables from outside are read-only"Mutating captured variableUse loop accumulation or state() — see advanced.md
"expected content, found string" (or vice versa)Content/string type mismatchUse [#str-var] to embed string in content
set/show rule has no effectRule placed after contentPlace set/show rules before the content they target

Examples

Copy the closest starter, adjust, compile. For CVs, letters, or slides, search packages: python3 scripts/search-packages.py --category cv (or letter, presentation).

ExampleStart here when you want...Next read
basic-document.typA short note or memobasics.md, styling.md
styled-document.typA multi-section report with page stylingstyling.md, tables.md
template-report.typA reusable template for a seriestemplate.md
tables-showcase.typA data-heavy doc (tables, CSV/JSON)tables.md, types.md
academic-paper.typA paper with citations, theorems, mathacademic.md
query-export.typMetadata export or multi-pass buildsquery.md
package-example/A publishable packagepackage.md

Dependencies

  • typst CLI: Install from https://typst.app or via package manager
    • macOS: brew install typst
    • Linux: cargo install typst-cli
    • Windows: winget install typst
  • pdftotext (optional): For text-level output verification
  • Python 3.10+ (optional): For package search and validation scripts
  • jq (optional): For parsing JSON output from typst query in shell scripts

API Reference Search

Search the embedded index of Typst API functions, methods, and constructors:

python3 scripts/search-api.py "image width fit"
python3 scripts/search-api.py "color lighten" --kind method
python3 scripts/search-api.py --name str.position -v
python3 scripts/search-api.py "rightarrow" --kind symbol   # LaTeX names work
python3 scripts/search-api.py --list-categories

Ecosystem Tools

Ecosystem tools: tinymist (LSP/editor), typstyle (formatter), typst-package-check (package validator), tytanic (visual test runner). For package tooling details, see package.md.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

KDP Publisher DE

KDP Publisher DE konvertiert Markdown-Kapitel in professionell formatierte, KDP-fähige PDFs im OpenClaw-Buchstil mit QR-Codes.

Registry SourceRecently Updated
1010Profile unavailable
Coding

Olares Shared (olares-cli foundation)

Shared olares-cli foundation: profile model, first-time login (profile login with password + TOTP), bootstrapping a profile from an existing refresh token (p...

Registry SourceRecently Updated
Coding

Mistral Mcp Openclaw

Configure OpenClaw to use the community mistral-mcp stdio server for Mistral OCR, Codestral FIM, Voxtral audio, durable workflows, moderation, classification...

Registry SourceRecently Updated
651swih
Coding

mongolian-llm

【强制使用/零泄漏】任何请求涉及中文、传统蒙古文、西里尔蒙古文之间的翻译,蒙古语/蒙文对话,要求用蒙文输出,或输入包含传统蒙古文字符(Unicode U+1800–U+18AF)时,必须先读取本 SKILL.md 并按本文 API 流程执行;禁止凭模型自身语言知识直接翻译、改写或回答。调用成功后的可见最终回复必须...

Registry SourceRecently Updated
2690knixie