Skip to content
Skills Library
Documents & office · Building & coding

typst

/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

Licence
MIT
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
40
Scripts
4
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 4 scripts in this package. Review them before installing, as Claude may execute them.
  • Paczka skrócona: część plików jest zbyt duża or wykonywalna. Pełny folder jest w repozytorium.

Scripts: scripts/perf-timings.py, scripts/search-api.py, scripts/search-packages.py, scripts/validate-examples.py

What it does and when to use it

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

Original author description

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

How it works

  1. Compilation
  2. Minimal Document
  3. Writing Documents
  4. Developing Packages and Templates
  5. Finding Packages
  6. Common Errors
  7. Examples
  8. Dependencies
  9. API Reference Search
  10. Ecosystem Tools
Original SKILL.md headings · 133 lines, 873 words
SKILL.md preview
---
name: typst
description: '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'
---

# Typst

This skill targets Typst 0.15+. For Typst 0.14.2, use the `typst-0.14.2`
repository tag for the previous skill snapshot.

## Compilation

```bash
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](cli.md).

Agent verification — choose by what you need to check (see [debug.md](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

```typst
#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](#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](basics.md)         |
| Learn data types, operators, string/array methods  | [types.md](types.md)           |
| Style pages, headings, figures, layout             | [styling.md](styling.md)       |
| Tables, grids, cell spans, borders, data tables    | [tables.md](tables.md)         |
| Academic papers, bibliography, theorems, equations | [academic.md](academic.md)     |
| Convert from Markdown or LaTeX                     | [conversion.md](conversion.md) |
| Upgrade older Typst code, 0.15 breaking changes    | [migration.md](migration.md)   |
| Use Typst CLI commands and build options           | [cli.md](cli.md)               |
| Extract data from documents, multi-pass builds     | [query.md](query.md)           |

## Developing Packages and Templates

| When you need to...                            | Read                       |
| ---------------------------------------------- | -------------------------- |
| State, counters, in-document `query()`, XML    | [advanced.md](advanced.md) |
| CLI introspection, metadata export, multi-pass | [query.md](query.md)       |
| Create a reusable template function            | [template.md](template.md) |
| Create or publish a package                    | [package.md](package.md)   |
| Verify output (HTML/PNG/pdftotext, repr)       | [debug.md](debug.md)       |
| Profile performance (--timings, hotspots)      | [perf.md](perf.md)         |

[basics.md](basics.md) and [types.md](types.md) are also the foundation for developers.

## Finding Packages

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

```bash
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](examples/basic-document.typ)   | A short note or memo                     | [basics.md](basics.md), [styling.md](styling.md) |
| [styled-document.typ](examples/styled-document.typ) | A multi-section report with page styling | [styling.md](styling.md), [tables.md](tables.md) |
| [template-report.typ](examples/template-report.typ) | A reusable template for a series         | [template.md](template.md)                       |
| [tables-showcase.typ](examples/tables-showcase.typ) | A data-heavy doc (tables, CSV/JSON)      | [tables.md](tables.md), [types.md](types.md)     |
| [academic-paper.typ](examples/academic-paper.typ)   | A paper with citations, theorems, math   | [academic.md](academic.md)                       |
| [query-export.typ](examples/query-export.typ)       | Metadata export or multi-pass builds     | [query.md](query.md)                             |
| [package-example/](examples/package-example/)       | A publishable package                    | [package.md](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` in shell scripts

## API Reference Search

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

```bash
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](package.md).
Files in this package (40)
  • LICENSE 1 KB
  • SKILL.md 8 KB
  • academic.md 8 KB
  • advanced.md 8 KB
  • basics.md 5 KB
  • cli.md 4 KB
  • conversion.md 9 KB
  • debug.md 12 KB
  • migration.md 5 KB
  • package.md 6 KB
  • perf.md 3 KB
  • query.md 7 KB
  • styling.md 5 KB
  • tables.md 6 KB
  • template.md 4 KB
  • types.md 6 KB
  • agents/typst-package-qa.md 3 KB
  • agents/typst-verify.md 4 KB
  • data/api-0.15.0-bm25.json 528 KB
  • data/api-0.15.1-bm25.json 528 KB
  • data/api-bm25.json 528 KB
  • data/api-main-bm25.json 695 KB
  • data/packages-bm25.json 377 KB
  • data/packages.json 591 KB
  • examples/academic-paper.typ 4 KB
  • examples/basic-document.typ 2 KB
  • examples/perf-test.typ 1 KB
  • examples/query-export.typ 2 KB
  • examples/styled-document.typ 2 KB
  • examples/tables-showcase.typ 3 KB
  • examples/template-report.typ 6 KB
  • examples/package-example/README.md 2 KB
  • examples/package-example/lib.typ 1 KB
  • examples/package-example/typst.toml 1 KB
  • examples/package-example/src/boxes.typ 1 KB
  • examples/package-example/src/formatting.typ 1 KB
  • scripts/perf-timings.py 10 KB
  • scripts/search-api.py 8 KB
  • scripts/search-packages.py 12 KB
  • scripts/validate-examples.py 8 KB

Omitted from the package: 4 (too large or executable); available in the repository.

Versions

RepositoryScoreLicence
This page · lucifer1004/claude-skill-typst100MIT
autonomous-ai/openharness100MIT
henkisdabro/wookstar-claude-plugins100MIT
ChanMeng666/typst-claude-skill100MIT

Database snapshot: 13.11.2026 · package version 16144616f4ac (SHA-256 digest of the entire package)

Downloads in the last 30 days: 2 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100typst-authoring
    This skill should be used when the user asks to "write Typst", "create a Typst document", "format in Typst", "convert to Typst", "Typst syntax", "Typst template", "Typst math", "Typst table", or works with .typ files. Provides comprehensive Typst markup, scripting, math, layout,…
  • 95latex-to-typst
    Translates LaTeX documents (.tex) to Typst (.typ), focusing on article-class documents. Use when asked to convert, port, migrate, or translate LaTeX to Typst. Covers document structure, text formatting, page layout, math equations and symbols, figures, tables, TikZ-to-CeTZ…
  • 100typst-writer
    Write correct and idiomatic Typst code for document typesetting. Use when creating or editing Typst (.typ) files, working with Typst markup, or answering questions about Typst syntax and features. Focuses on avoiding common syntax confusion (arrays vs content blocks, proper…
  • 100pdf-generation
    把 Markdown 排成 PDF(Typst 排版,不装 LaTeX):报告、白皮书、信函、书稿、教材、小说、笔记。当用户要把 .md 转成 PDF、按某种文档类型排版、或调整已有 PDF 的版式与观感时使用。
  • 100typst-creator
    Create, update, review, migrate, or diagnose Typst (.typ) source for documents, reports, papers, and presentations. Use for Typst markup, styling, scripting, math, layout, bibliography, and compiler/export issues. Resolve the compiler and generate source for stable Typst 0.13.0…
  • 100slidekit
    Create, edit, restyle or review a presentation built with slidekit (a Typst deck with slidekit.toml and lib/slidekit.typ). Use for any request about slides, a deck, a talk, a pitch, a lecture, speaker notes, a handout or the slide theme in a slidekit project — including "make a…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.