# Typst

> >-

- **Type:** Skill
- **Install:** `agentstack add skill-moyeranqianzhi-typst-skill-typst`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [MoYeRanqianzhi](https://agentstack.voostack.com/s/moyeranqianzhi)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [MoYeRanqianzhi](https://github.com/MoYeRanqianzhi)
- **Source:** https://github.com/MoYeRanqianzhi/typst-skill/tree/main/skills/typst

## Install

```sh
agentstack add skill-moyeranqianzhi-typst-skill-typst
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# typst

Source-grounded Typst specialist for **Typst 0.14.2**.

**Authority**: official Typst source/docs > Chinese blue book. If they disagree, follow official and note the mismatch.

## Route the task first

### Quick intent check

| User wants to … | Start here |
|---|---|
| Create a new Typst document | `reference/05-recipes/book-paper-slide-cv-patterns.md` → `reference/01-workflows/project-templates-and-packages.md` |
| Explain Typst concepts / compare with LaTeX | relevant file under `reference/02-language/` |
| Fix a compilation error | see **Error triage** below |
| Modify an existing template | `reference/01-workflows/project-templates-and-packages.md` |

### Error triage

| Error signal | Route to |
|---|---|
| Syntax / parse error | `reference/02-language/markup-and-document-structure.md` |
| Type mismatch / function signature | `scripts/query_reference.py` + `reference/03-library/` |
| Font / package not found | `reference/01-workflows/compile-debug-publish.md` |
| Context / state bug | `reference/05-recipes/state-counter-query-locator.md` |
| Layout / page overflow | `reference/02-language/styling-layout-and-show-rules.md` |
| Version-related change | `reference/07-versioning/` |

### Creating from scratch

1. Determine document type → consult `reference/05-recipes/book-paper-slide-cv-patterns.md`
2. Consider `typst init` → see `reference/01-workflows/project-templates-and-packages.md`
3. Start from the smallest matching template and iterate

### Subsystem routing

- Compile, export, debug → `reference/01-workflows/compile-debug-publish.md`
- Project structure, templates, packages → `reference/01-workflows/project-templates-and-packages.md`
- Markup, scripting, context, styling, math language → relevant file under `reference/02-language/`
- Chinese typesetting (fonts, CJK spacing, punctuation) → `reference/05-recipes/chinese-typesetting.md`
- Library, symbols, typed HTML, exact API lookup → run `python scripts/query_reference.py --query `
- Quick official-only API filtering → run `python scripts/query_api_index.py --name `
- Bibliography, state/query, accessibility, template recipes → relevant file under `reference/05-recipes/`
- CLI, workspace, source-level behavior → `reference/06-dev/cli-workspace-and-testing.md` or `reference/06-dev/architecture-and-source-map.md`
- Version conflicts or blue-book drift → relevant file under `reference/07-versioning/`

Keep context small: open the **smallest** relevant reference file.

## Use the indexes correctly

Two index layers:

- `reference/generated/typst-reference.json` + `scripts/query_reference.py` — default entry point; broadest coverage across official sources, blue-book examples, symbols, and typed HTML metadata.
- `reference/08-generated/typst-api-index.json` + `scripts/query_api_index.py` — fast-path official inventory; useful when filtering by name, kind, or category.

If an index and raw upstream source disagree, trust the raw upstream source.

## Standard workflow

1. **Identify** the requested output: snippet, template, edit, debug help, or explanation.
2. **Confirm** the subsystem: workflow, language, library category, recipe, or versioning.
3. **Consult** the smallest matching bundled reference. When multiple files match, prefer the one most specific to the user's exact question.
4. **Query** — run `query_reference.py` before answering exact API questions.
5. **Produce** runnable Typst code or a concrete remediation plan.
6. **Verify** — mentally walk through generated code for syntax, type, and semantic correctness.
7. **Document** assumptions, compatibility notes, and validation commands when relevant.

### If stuck

- Broaden the query: try `query_reference.py` with alternative keywords.
- Cross-check the blue book against official docs for version drift.
- Fall back to `reference/07-versioning/whats-new-in-0.14.x.md` for recent API changes.
- If no bundled reference covers the topic, say so explicitly — do not guess.

## Output requirements

- Return directly runnable Typst unless the user asked only for explanation.
- Note version-sensitive behavior when it matters.
- Say whether guidance comes from official source/docs or from the blue book.
- Explain root cause before proposing a debug fix.
- Prefer the simplest valid Typst pattern that satisfies the request.

## Refresh the bundled knowledge

1. Update the local `typst` and blue-book snapshots.
2. Run `python scripts/build_reference.py`.
3. Run `python scripts/refresh_typst_knowledge.py`.
4. Re-check `reference/07-versioning/`.
5. Validate with `python /scripts/quick_validate.py skills/typst`.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [MoYeRanqianzhi](https://github.com/MoYeRanqianzhi)
- **Source:** [MoYeRanqianzhi/typst-skill](https://github.com/MoYeRanqianzhi/typst-skill)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-moyeranqianzhi-typst-skill-typst
- Seller: https://agentstack.voostack.com/s/moyeranqianzhi
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
