mcpbeat

Typst Skill for Claude

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

1955k tokens
context cost
the whole folder, loaded on every use
43
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
112
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/lucifer1004/claude-skill-typst --skill typst

What comes with it

7 803 434 bytes besides the instruction
LICENSE
academic.md
advanced.md
agents/typst-package-qa.md
agents/typst-verify.md
basics.md
cli.md
conversion.md
data/api-0.14.2-bm25.json
data/api-0.14.2.json
data/api-0.15.0-bm25.json
data/api-0.15.0.json
data/api-bm25.json
data/api-main-bm25.json
data/api-main.json
data/api.json
data/packages-bm25.json
data/packages.json
debug.md
examples/academic-paper.typ
examples/basic-document.typ
examples/package-example/README.md
examples/package-example/lib.typ
examples/package-example/src/boxes.typ
examples/package-example/src/formatting.typ
examples/package-example/typst.toml
examples/perf-test.typ
examples/query-export.typ
examples/styled-document.typ
examples/tables-showcase.typ
examples/template-report.typ
package.md
perf.md
query.md
scripts/perf-timings.py
scripts/search-api.py
scripts/search-packages.py
scripts/validate-examples.py
styling.md
tables.md

The instruction itself

11 sections, as written by the author

Typst

This skill targets Typst 0.15+ by default. For Typst 0.14.2, use the

typst-0.14.2 repository tag for the previous skill snapshot, typst query

for CLI introspection, or --channel 0.14.2 with API search.

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 eval --in document.typ 'query(heading).len()'  # Typst 0.15+ introspection

For command options beyond this quick reference, see cli.md.

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

| Method | Command | Best for |

| ----------- | ----------------------------------------------------------------------- | ----------------------------------------- |

| HTML export | typst compile doc.typ /dev/stdout -f html --features html 2>/dev/null | Text content, structure, headings, tables |

| PNG export | typst compile doc.typ page-{p}.png -f png | Visual layout, alignment, spacing, fonts |

| pdftotext | typst 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 flow | basics.md |

| Learn data types, operators, string/array methods | types.md |

| Style pages, headings, figures, layout | styling.md |

| Tables, grids, cell spans, borders, data tables | tables.md |

| Academic papers, bibliography, theorems, equations | academic.md |

| Convert from Markdown or LaTeX | conversion.md |

| Use Typst CLI commands and build options | cli.md |

| Extract data from documents, multi-pass builds | query.md |

Developing Packages and Templates

| When you need to... | Read |

| ---------------------------------------------- | -------------------------- |

| State, counters, in-document query(), XML | advanced.md |

| CLI introspection, metadata export, multi-pass | query.md |

| Create a reusable template function | template.md |

| Create or publish a package | package.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

| Error | Cause | Fix |

| ------------------------------------------------ | ---------------------------- | ---------------------------------------------------- |

| "unknown variable" | Undefined identifier | Check spelling, ensure #let before use |

| "expected X, found Y" | Type mismatch | Check function signature in docs |

| "file not found" | Bad import path | Paths resolve relative to current file |

| "unknown font" | Font not installed | Use system fonts or web-safe alternatives |

| "maximum function call depth exceeded" | Deep recursion | Use iteration instead |

| "can only be used when context is known" | Missing context wrapper | Wrap in context { ... } |

| "unexpected argument" | = instead of : for args | Named args use : syntax: func(name: value) |

| "variables from outside are read-only" | Mutating captured variable | Use loop accumulation or state() — see advanced.md |

| "expected content, found string" (or vice versa) | Content/string type mismatch | Use [#str-var] to embed string in content |

| set/show rule has no effect | Rule placed after content | Place 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).

| Example | Start here when you want... | Next read |

| --------------------------------------------------- | ---------------------------------------- | ------------------------------------------------ |

| basic-document.typ | A short note or memo | basics.md, styling.md |

| styled-document.typ | A multi-section report with page styling | styling.md, tables.md |

| template-report.typ | A reusable template for a series | template.md |

| tables-showcase.typ | A data-heavy doc (tables, CSV/JSON) | tables.md, types.md |

| academic-paper.typ | A paper with citations, theorems, math | academic.md |

| query-export.typ | Metadata export or multi-pass builds | query.md |

| package-example/ | A publishable package | package.md |

Dependencies

  • typst CLI 0.15+ recommended: 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 eval or typst query in shell scripts

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 "path" --channel 0.14.2      # legacy Typst 0.14 API
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.

Other skills for the same job

different authors, same section of the catalogue
DOCX
by anthropics
vendor ×16

Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks

7k tokens
PDF
by anthropics
vendor ×16

Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.

13k tokens scripts
PPTX
by JayZeeDesign
×15

Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks

308k tokens scripts
Canvas Design
by anthropics
vendor ×13

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

1388k tokens
PDF
by anthropics
vendor ×10

Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.

15k tokens scripts
DOCX
by w95
×6

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.

5k tokens
PPTX
by w95
×4

Use this skill any time a .pptx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates, layouts, speaker notes, or comments. Trigger whenever the user mentions \"deck,\" \"slides,\" \"presentation,\" or references a .pptx filename, regardless of what they plan to do with the content afterward. If a .pptx file needs to be opened, created, or touched, use this skill.

2k tokens
Obsidian Markdown
by ZhanlinCui
×3

Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax. Use when working with .md files in Obsidian, or when the user mentions wikilinks, callouts, frontmatter, tags, embeds, or Obsidian notes.

3k tokens

How to use it

Copy the folder

Take lucifer1004/typst from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.

Install what it needs

The instructions reference brew, cargo, go. Without those the skill loads but fails at the first command.