Generate idiomatic Typst (.typ) code, edit existing Typst files
/plugin install typst-author@max-skillsThis skill helps agents generate, edit, and reason about Typst documents. It provides quick‑start examples, detailed workflows, and links to the full Typst documentation (guides, tutorials, reference).
.typ file(s).set rule, show rule, and custom themes.https://typst.app/universe/search/?q=...) to select the best candidate. Then open the selected package page on Typst Universe and read its documentation before writing imports or code based on that package.booktabs package (@preview/booktabs) and avoid heavy vertical borders unless the user explicitly asks for boxed grid tables.docs/guides/*.mddocs/tutorial/*.mddocs/reference/**/*.mddocs/ folder before generating code.Read/Grep/Glob on the paths above).https://typst.app/universe/search/?q=...). Compare candidates and choose one that best matches the task.booktabs for clean table styling unless the user asks for a different table style or package..typ source according to the user's request.typst compile (if tool access is allowed)..typ content and optionally a rendered preview (PDF/HTML).(item1, item2) (parentheses). See docs/reference/foundations/array.md [blocked].(key: value, key2: value2) (parentheses with colons). See docs/reference/foundations/dictionary.md [blocked].[markup content] (square brackets). See docs/reference/foundations/content.md [blocked].# to start a code expression inside markup or content blocks; it disambiguates code from text. This is required for content-producing function calls and field access in markup: #figure[...], #image("file.png"), text(...)[#numbering(...)].# inside code contexts (argument lists, code blocks, show-rule bodies). Example: #figure(image("file.png")) (no # before image).set: Set rule to configure optional parameters on element functions (style defaults scoped to the current block or file).show: Show rule to target selected elements and apply a set rule or transform/replace the element output.set for common styling; use show for selective or structural changes (e.g., heading.where(level: 1), labels, text, regex).@preview/booktabs when the user does not request a specific table package.[] for arrays (use () instead).arr[0] (use arr.at(0)).# in markup/content blocks (e.g., text(...)[numbering(...)] should be text(...)[#numbering(...)]).# inside code contexts (e.g., figure(#image("x.png")) in an argument list).[] with code blocks {}.color.hsl instead of just hsl).\begin{...}, \section, or other LaTeX commands).tabular does not exist; use table).When working on large projects, consider organizing the project across multiple files.
#include "file.typ" to split into multiple filesIf you see "unknown font family" warnings, remove the font specification to use system defaults. Note: Font warnings don't prevent compilation; the document will use fallback fonts.
If import fails with "package not found":
@preview/package:version syntax.Common fixes:
#{ } or use proper syntax.# (or #(...)) in markup/content blocks.() for both, dictionaries need key: value, singleton arrays are (elem,).by Max Wiseman · MIT
#set document(title: "My Document", author: "Author Name")#set page(numbering: "1")#set text(lang: "en")// Enable paragraph justification and character-level justification#set par( justify: true, justification-limits: ( tracking: (min: -0.012em, max: 0.012em), spacing: (min: 75%, max: 120%), ))#title[My Document]= Heading 1This is a paragraph in Typst.== Heading 2#lorem(50)// Incorrect (missing # inside content block)text(...)[(numbering(...))]// Correcttext(...)[(#numbering(...))]// Set rule: configure optional parameters for an element type#set heading(numbering: "I.")#set text(font: "New Computer Modern")// Show-set rule: apply a set rule only to selected elements#show heading: set text(navy)// Show transform rule: replace/reshape element output#show heading: it => block[#emph(it.body)]#import "@preview/booktabs:0.2.0": *#booktabs-table( columns: 3, [Item], [Qty], [Price], [Engine], [2], [$1.2M], [Tank], [1], [$0.8M],)