chanmeng-typst

skill
Security Audit
Pass
Health Pass
  • License รขโ‚ฌโ€ License: MIT
  • Description รขโ‚ฌโ€ Repository has a description
  • Active repo รขโ‚ฌโ€ Last push 0 days ago
  • Community trust รขโ‚ฌโ€ 15 GitHub stars
Code Pass
  • Code scan รขโ‚ฌโ€ Scanned 6 files during light audit, no dangerous patterns found
Permissions Pass
  • Permissions รขโ‚ฌโ€ No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

ใ€Stars are free hugs for code - spread the love! ๐Ÿค—โญ๏ธใ€‘ Claude Code skill for professional document generation using Typst typesetting system. Includes complete language reference, CLI reference, and 9 ready-to-use templates.

README.md

Typst Skill for Claude Code

License: MIT
Typst v0.14+
Claude Code Skill
Validate

A Claude Code skill that enables professional document generation using the Typst typesetting system.

When installed, Claude Code can create PDFs, reports, academic papers, resumes, presentations, and more โ€” directly from natural language requests.

Features

  • Full Typst language coverage โ€” page setup, text formatting, math equations, tables, figures, layout, scripting, show/set rules, introspection, and more
  • Complete CLI reference โ€” all commands (compile, watch, init, query, fonts), options, and environment variables for Typst v0.14
  • 9 ready-to-use templates โ€” general document, CJK document, academic paper, simple resume, typographic two-column resume, letter, technical report, presentation slides, and invoice
  • Advanced design patterns โ€” theme systems with cascading defaults, scope-based show rules, modular component functions, multi-column layouts, circular image clipping, typography hierarchy
  • CJK support โ€” font fallback configuration, cjk-latin-spacing, and proper paragraph settings for Chinese/Japanese/Korean documents
  • PDF capabilities โ€” PDF/A standards, tagged PDF for accessibility, ICC color profiles, reproducible builds
  • Package publishing โ€” typst.toml manifest format, directory structure, and font bundling
  • Plugin packaging โ€” installable as a Claude Code plugin (with marketplace) or dropped directly into ~/.claude/skills/

Prerequisites โ€” install Typst CLI

The Typst skill drives the typst binary, so install it first:

# Windows
winget install --id Typst.Typst

# macOS
brew install typst

# Any platform with Rust
cargo install --locked typst-cli

Verify with typst --version (should print v0.14 or newer).

Installation

Pick one of the four methods below. They are equivalent in capability โ€” choose by your environment.

Method 1 โ€” Claude Code plugin marketplace (recommended)

Inside Claude Code, run two commands:

/plugin marketplace add ChanMeng666/chanmeng-typst
/plugin install chanmeng-typst@chanmeng-typst

Auto-updates when the plugin's version field in .claude-plugin/plugin.json bumps. The marketplace name (chanmeng-typst) and plugin name (typst) are declared in .claude-plugin/marketplace.json and .claude-plugin/plugin.json respectively.

Method 2 โ€” Git clone (for users who want to hack on the skill)

The repo's actual skill content lives at skills/chanmeng-typst/ (so the plugin marketplace path can pick it up). To install via direct clone, copy that subdirectory into your user-level skills folder:

# macOS / Linux / Windows (Git Bash or WSL)
git clone --depth 1 https://github.com/ChanMeng666/chanmeng-typst.git /tmp/_typst-src \
  && mv /tmp/_typst-src/skills/chanmeng-typst ~/.claude/skills/chanmeng-typst \
  && rm -rf /tmp/_typst-src

Windows PowerShell users: replace ~ with $env:USERPROFILE, so the destination is $env:USERPROFILE\.claude\skills\typst. Use Move-Item instead of mv and Remove-Item -Recurse instead of rm -rf.

Method 3 โ€” Manual ZIP

For users without Git:

  1. Visit github.com/ChanMeng666/chanmeng-typst, click Code โ†’ Download ZIP.
  2. Extract the archive.
  3. Inside the extracted folder, navigate to skills/chanmeng-typst/ โ€” that subdirectory is the skill.
  4. Move and rename skills/chanmeng-typst/ to ~/.claude/skills/chanmeng-typst (macOS / Linux) or %USERPROFILE%\.claude\skills\typst (Windows).
  5. Confirm SKILL.md exists at the top of that destination folder.

Method 4 โ€” Project-level (per-project)

Use this when the skill should be available only inside one project (e.g. you want to commit it alongside the project so collaborators get it automatically):

# Run from the project root
git clone --depth 1 https://github.com/ChanMeng666/chanmeng-typst.git /tmp/_typst-src \
  && mkdir -p .claude/skills \
  && mv /tmp/_typst-src/skills/chanmeng-typst .claude/skills/chanmeng-typst \
  && rm -rf /tmp/_typst-src

The skill is now active whenever Claude Code runs from this project directory and is silent everywhere else.

Verify your installation

After installing by any method, run the bundled environment check.

For Method 1 (plugin marketplace), Claude Code installs the plugin to its cache; ask Claude Code:

Run bash $CLAUDE_PLUGIN_ROOT/scripts/verify-typst.sh for the typst plugin.

For Methods 2, 3, 4 (skill copied into ~/.claude/skills/chanmeng-typst/ or .claude/skills/chanmeng-typst/):

bash ~/.claude/skills/chanmeng-typst/scripts/verify-typst.sh
# (or `bash .claude/skills/chanmeng-typst/scripts/verify-typst.sh` for Method 4)

Expected output:

=== Typst Environment Check ===
[PASS] Typst found: typst 0.14.x
[PASS] Current directory is writable
--- Available CJK Fonts ---
[PASS] CJK fonts found:
  ...
=== Done ===

Then ask Claude Code:

Read ~/.claude/skills/chanmeng-typst/SKILL.md and tell me the skill name from its YAML frontmatter.

If Claude reports typst, the skill is loaded.

File Structure

Repo layout (what you see on GitHub / after git clone)

chanmeng-typst/
โ”œโ”€โ”€ .claude-plugin/
โ”‚   โ”œโ”€โ”€ plugin.json                       # Plugin manifest (used by Method 1)
โ”‚   โ””โ”€โ”€ marketplace.json                  # Marketplace catalog
โ”œโ”€โ”€ .github/workflows/validate.yml        # CI: validates frontmatter, compiles examples
โ”œโ”€โ”€ skills/
โ”‚   โ””โ”€โ”€ typst/                            # โ† THE SKILL ITSELF
โ”‚       โ”œโ”€โ”€ SKILL.md                      # Main skill file (workflow, decision tree, gotchas, recovery)
โ”‚       โ”œโ”€โ”€ references/                   # Loaded on demand by Claude Code
โ”‚       โ”‚   โ”œโ”€โ”€ typst-cli-reference.md
โ”‚       โ”‚   โ”œโ”€โ”€ typst-language-reference.md
โ”‚       โ”‚   โ”œโ”€โ”€ typst-templates.md
โ”‚       โ”‚   โ””โ”€โ”€ typst-design-patterns.md
โ”‚       โ”œโ”€โ”€ scripts/
โ”‚       โ”‚   โ””โ”€โ”€ verify-typst.sh           # Environment verification
โ”‚       โ””โ”€โ”€ examples/
โ”‚           โ”œโ”€โ”€ hello-world.typ
โ”‚           โ”œโ”€โ”€ cjk-document.typ
โ”‚           โ””โ”€โ”€ resume-basic.typ
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ CHANGELOG.md
โ””โ”€โ”€ LICENSE

Installed layout (what the skill loader sees)

For Method 1 (plugin marketplace): files live under ~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/skills/chanmeng-typst/ โ€” Claude Code resolves paths automatically; you do not need to know the exact location.

For Methods 2, 3, 4 (clone-and-move / ZIP / per-project): only the skills/chanmeng-typst/ subdirectory is moved to your skills folder, so the resulting layout is flat:

~/.claude/skills/chanmeng-typst/  (or .claude/skills/chanmeng-typst/ for Method 4)
โ”œโ”€โ”€ SKILL.md
โ”œโ”€โ”€ references/โ€ฆ
โ”œโ”€โ”€ scripts/verify-typst.sh
โ””โ”€โ”€ examples/โ€ฆ

Usage

Once installed, the skill activates automatically when you ask Claude Code to generate documents. Examples:

> Create a PDF report about Q1 sales performance
> Write an academic paper template with two-column layout
> Generate a one-page resume for a software engineer
> ๅธฎๆˆ‘็”จ Typst ็”Ÿๆˆไธ€ไปฝไธญๆ–‡ๆฑ‚่Œไฟก PDF
> Typeset this math formula as a PDF: E = mc^2
> Create a presentation about our new product launch

You can also invoke it explicitly with /typst.

Templates Included

Template Description
General Document TOC, headers, footers, page numbering
CJK Document Chinese/Japanese/Korean font and paragraph configuration
Academic Paper Two-column, abstract, keywords, bibliography, equation numbering
Simple Resume Single-column with section entries
Typographic Resume Two-column sidebar layout with theme system
Letter Formal letter with sender/recipient blocks
Technical Report Cover page, confidential headers, appendix
Presentation Landscape slides with title/content pattern
Invoice Styled table with totals and payment terms

Examples

The examples/ directory contains minimal, self-contained .typ files that compile without external dependencies:

  • hello-world.typ โ€” Basic document setup with headings, math, and lists
  • cjk-document.typ โ€” Chinese document with proper font fallback chain
  • resume-basic.typ โ€” Simple one-page resume with reusable component functions

Compile any example with:

typst compile examples/hello-world.typ

Troubleshooting

Symptom Likely cause Fix
Claude Code says "I don't see a Typst skill" SKILL.md missing or in the wrong place Verify the file exists at ~/.claude/skills/chanmeng-typst/SKILL.md (or your chosen install path) and that the YAML frontmatter starts with name: typst
typst: command not found Typst CLI not on PATH Reinstall via Prerequisites above; on Windows, restart the terminal after winget install
verify-typst.sh: Permission denied Script not executable on Linux/macOS chmod +x ~/.claude/skills/chanmeng-typst/scripts/verify-typst.sh
tofu (โ–ก) glyphs in CJK output Missing CJK font fallback chain See SKILL.md ยง Gotchas; or run typst fonts to list installed fonts
/plugin install chanmeng-typst@chanmeng-typst fails with "marketplace not found" Marketplace was not added in this Claude Code session Re-run /plugin marketplace add ChanMeng666/chanmeng-typst first
Plugin installs but skill does not appear Stale plugin cache /plugin marketplace update chanmeng-typst then retry install

For deeper diagnostics, run Claude Code with claude --debug and look for loading plugin messages.

Contributing

Contributions are welcome! Feel free to:

  • Add new templates
  • Improve language reference coverage
  • Fix errors or outdated information
  • Add support for more Typst packages

License

MIT

Acknowledgments


Chan Meng

Chan Meng
Need a custom app like this one? I build them โ€” let's talk.

Email Chan Meng
Chan Meng on GitHub

Reviews (0)

No results found