agentsclimarketplace

Typst skill

Skill statzhero/typst-skill

An LLM skill for modern Typst typesetting (0.14+)

Install
npx -y skills add statzhero/typst-skill

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 9 stars9 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Modern Typst typesetting patterns for documents, slides, and academic writing. Use this skill when writing Typst markup (.typ files), creating document templates, building slide decks with Quarto, or debugging Typst compilation issues. Covers content blocks, styling, math typesetting, tables, figures, custom functions, citations, and Quarto integration. Also use when the user mentions #set rules, #show rules, Typst page layout, Typst math mode, or wants to convert LaTeX to Typst. Trigger even for brief Typst questions like formatting a table or equation.

The file declares its own license as CC-BY-4.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

6.6 KB, as published. Nobody here has run it

Typst Typesetting

Typst is a modern typesetting system designed as a faster, more ergonomic alternative to LaTeX. It uses a markup syntax with scripting capabilities.

Related skills:

  • /typst-touying - Slide presentations with animations and themes
  • /typst-cetz - Diagrams, flowcharts, plots (TikZ-style drawing)

When to use this skill

  • Writing new Typst documents (.typ files)
  • Creating or modifying document templates
  • Typesetting math, tables, figures, or bibliographies
  • Integrating Typst with Quarto (.qmd → Typst output)
  • Debugging Typst compilation errors
  • Styling pages, headings, or custom environments

When NOT to use this skill

  • Slide presentations with animations → use /typst-touying
  • Diagrams or flowcharts → use /typst-cetz
  • LaTeX documents (different system entirely)
  • Quarto HTML/PDF output that does not use Typst backend
  • Tables generated by R's tinytable package → use /write-tinytable

Instructions

Step 1: Classify the request

CategoryReference fileTrigger
Mathmath-typesetting.mdEquations, symbols, alignment, display math, numbering
Tables & figurestables-figures.md#table, #figure, #image, grids, cross-references
Quartoquarto-integration.md.qmd files, YAML frontmatter, raw Typst blocks, Quarto metadata
Citationscitations-bibliography.md@key, #cite, #bibliography, CSL styles, supplements
Layout & stylingpage-layout-styling.md#set, #show, page setup, headers/footers, colors, custom functions

Step 2: Read the reference file(s)

Use the Read tool to load the relevant reference. For requests that span multiple categories (e.g., "create a document with math and a bibliography"), read multiple files.

Step 3: Verify with Context7

When unsure about Typst syntax or function signatures, use Context7 to check the latest docs:

  • Typst docs: library ID /websites/typst_app (1300+ snippets)
  • Quarto Typst format: library ID /websites/quarto

Step 4: Apply core principles

  1. Use #set rules for global defaults - avoid inline styling
  2. Use #show rules for transformations - customize heading/link/code appearance
  3. Use relative units (1fr, %) over hard-coded sizes
  4. Use labels and cross-references (<label> + @label) over manual numbering
  5. Keep templates modular - separate layout from content

Step 5: Write the code

Follow the quick reference and anti-patterns below. When in doubt, consult the reference files.

Quick reference

Core syntax

// Markup
*bold*  _italic_  `code`
#link("https://example.com")[Link text]

= Heading 1
== Heading 2

- Bullet
+ Numbered
/ Term: Definition

Set and show rules

// Set rules: global defaults
#set text(font: "New Computer Modern", size: 11pt)
#set par(justify: true)
#set page(margin: 2.5cm)

// Show rules: transform content
#show heading.where(level: 1): it => {
  pagebreak(weak: true)
  text(size: 18pt, weight: "bold", it.body)
}

Custom functions

#let note(body) = {
  block(fill: luma(230), inset: 8pt, radius: 4pt, body)
}

Variables and logic

#let draft = true
#if draft [#text(fill: red)[DRAFT]]

#for x in (1, 2, 3) [Item #x. ]

Anti-patterns

AvoidPreferReason
Inline styles everywhere#set rulesConsistent, maintainable
Hard-coded sizesRelative units (1fr, %)Responsive layout
Manual numbering#counter() and @labelAutomatic updates
\n for line breaksBlank line or \More readable
@key for narrative citations#cite(<key>, form: "prose")Correct rendering
Repeating styles per element#show rulesSingle source of truth

Complete workflow example

// Document setup
#set text(font: "New Computer Modern", size: 11pt)
#set par(justify: true, leading: 0.65em)
#set page(paper: "a4", margin: (x: 2.5cm, y: 3cm))
#set heading(numbering: "1.1")

// Custom environments
#let abstract(body) = {
  align(center)[*Abstract*]
  pad(x: 2em, body)
}

// Title
#align(center)[
  #text(size: 18pt, weight: "bold")[Document Title]
  #v(0.5em)
  Author Name \
  #text(size: 9pt, fill: luma(100))[March 2026]
]

#abstract[
  This paper examines...
]

= Introduction

We study the effect of $X$ on $Y$ using a difference-in-differences design.

= Data

#figure(
  table(
    columns: (auto, 1fr, 1fr),
    stroke: none,
    inset: (x: 10pt, y: 5pt),
    table.hline(stroke: 1.5pt),
    table.header([*Variable*], [*Mean*], [*SD*]),
    table.hline(stroke: 0.5pt),
    [Age], [34.2], [12.1],
    [Income], [52,100], [18,400],
    table.hline(stroke: 1.5pt),
  ),
  caption: [Summary statistics.],
  kind: table,
) <tbl-summary>

As shown in @tbl-summary, the sample includes...

= Results

Our main specification yields $beta = 0.42$ (SE = 0.08), significant at the 1% level.

$ Y_(i t) = alpha + beta D_(i t) + gamma_i + delta_t + epsilon_(i t) $ <eq-main>

@eq-main includes unit and time fixed effects.

#cite(<atz2022>, form: "prose") finds similar results in a related context.

#bibliography("references.bib", style: "apa")

Debugging tips

  1. Compilation errors: Check for unmatched brackets [], (), {}
  2. Layout issues: Use #box(stroke: red, [...]) to visualize bounds
  3. Math errors: Display math needs spaces inside $: $ x^2 $ not $x^2$
  4. Missing content: Ensure content blocks [] are properly closed
  5. Type errors: Use #type(value) to inspect types at compile time

Resources

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.