Skip to content

About

A set of guardrails designed to ensure agents adhere to valid Typst/Touying syntax

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Typst Agent Skills

Agent skills that keep coding agents from inventing/hallucinating Typst syntax.

Skill version Skill license Typst Touying

A pair of Agent Skills for writing, editing, and debugging Typst documents and Touying slide decks. Point the agent at a .typ file — or ask it to create one — and it is instructed to look up signatures, defaults, and failure modes in the bundled chapters before it writes any code.

What it does

Typst is still young compared with LaTeX, so most models mix in removed APIs, LaTeX-isms, and parameters that never existed. These skills address that by shipping local, version-pinned references (chapters, wrong→right tables, cheatsheets, and compile-then-claim rules) rather than relying on training data. The agent is told to search those files for the function and parameters it needs, instead of guessing.

Important

Not an official project! typst-writer and touying-composer are independent community skills. They are not products of, affiliated with, or endorsed by Typst GmbH or the Touying authors.

This repository is designed to assist an agent that is already writing Typst, not to replace the Typst compiler. Every .typ file the agent produces should still be compiled with the typst CLI. Treat unverified markup as a draft.

The general-purpose skill for Typst 0.15.1. Covers markup, scripting, set/show, context, math, tables, templates, LaTeX conversion, compile errors, and PDF/HTML export. Reference chapters were checked against the Typst 0.15.1 sources that generate the official docs (parameter names, defaults, deprecation markers).

A specialized skill for presentation slides with Touying 0.7.4 on Typst 0.15.1. Covers animations (#pause / #only / #uncover / waypoints), themes, config, handout mode, diagram animation, and export. Where the published docs and the shipped touying:0.7.4 package disagree, the package source wins.

touying-composer covers Touying only. Load typst-writer for base Typst syntax, set/show, context, and the standard library — most compile errors in a deck are Typst errors, not Touying errors.

Installation

These skills follow the open Agent Skills standard. They work in any skills-compatible AI agent runtime. Compiling and verifying output requires the typst CLI (0.15.1) on PATH.

Option 1: One-liner (recommended, cross-runtime)

npx skills (from Vercel Labs) reads this repo, finds the skill directories, and drops them into the right folder for whatever agent it detects:

npx skills add Emberwhirl/typst-agent-skills

To install one skill only:

npx skills add Emberwhirl/typst-agent-skills --skill typst-writer
npx skills add Emberwhirl/typst-agent-skills --skill touying-composer

Alternatively, open your preferred skills-compatible agent (e.g., Hermes, Claude Code, Codex, Grok) and tell it:

Install these skills for me: https://github.com/Emberwhirl/typst-agent-skills

Option 2: Manual clone

git clone https://github.com/emberwhirl/typst-agent-skills.git
cp -r typst-agent-skills/typst-writer typst-agent-skills/touying-composer ~/.agents/skills/

Copy or symlink the skill directories into your agent's global or project-level skills/ folder (for example ~/.claude/skills/, ~/.codex/skills/, ~/.grok/skills/, or .agents/skills/).

Usage

Once installed, the skills activate when you prompt the agent about topics in each SKILL.md frontmatter — .typ files, Typst documents or templates, LaTeX conversion, compile errors, or Touying / Typst slides.

Example prompts you can paste:

Write a Typst 0.15.1 article with numbered headings, a bibliography, and a captioned figure.
Convert this LaTeX paper to Typst. Do not emit removed APIs.
Create a Touying metropolis deck with #pause animations and a section outline.
This deck compiles but the animation is one subslide short. Please fix it.

The agent should consult the local chapters (especially common-mistakes.md) before writing code, then run typst compile and not claim success without a zero exit code.

Repository structure

typst-agent-skills/
├── README.md
├── LICENSE
├── typst-writer/
│   ├── SKILL.md
│   └── references/          # 20 chapters + cheatsheet, common-mistakes, glossary, patterns
└── touying-composer/
    ├── SKILL.md
    └── references/          # 19 chapters + api-reference, internals, cheatsheet, …

Each chapter is meant to be opened on demand, not read cover to cover: Core Idea → Key Concepts → Reference Tables → Common Mistakes → examples. Fences tagged typ compile under the pinned versions; fences tagged typ-wrong are deliberate counterexamples and must not be copied.

License

This repository is licensed under the Apache License 2.0. Copyright 2026 Emberwhirl.

The skills describe, but do not redistribute, these upstream projects:

  • Typst is licensed under Apache-2.0.

  • Touying is licensed under MIT. Copyright from Touying's LICENSE:

    Copyright (c) 2026 OrangeX4 <orangex4@qq.com>
    Copyright (c) 2026 zral0kh
    

When you use these skills in a write-up or derived work, please keep attribution to Typst and Touying.

Acknowledgements

About

A set of guardrails designed to ensure agents adhere to valid Typst/Touying syntax

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors