chanmeng-typst
Health Gecti
- License รขโฌโ License: MIT
- Description รขโฌโ Repository has a description
- Active repo รขโฌโ Last push 0 days ago
- Community trust รขโฌโ 15 GitHub stars
Code Gecti
- Code scan รขโฌโ Scanned 6 files during light audit, no dangerous patterns found
Permissions Gecti
- Permissions รขโฌโ No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
ใ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.
Typst Skill for Claude Code
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.tomlmanifest 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. UseMove-Iteminstead ofmvandRemove-Item -Recurseinstead ofrm -rf.
Method 3 โ Manual ZIP
For users without Git:
- Visit
github.com/ChanMeng666/chanmeng-typst, click Code โ Download ZIP. - Extract the archive.
- Inside the extracted folder, navigate to
skills/chanmeng-typst/โ that subdirectory is the skill. - Move and rename
skills/chanmeng-typst/to~/.claude/skills/chanmeng-typst(macOS / Linux) or%USERPROFILE%\.claude\skills\typst(Windows). - Confirm
SKILL.mdexists 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.shfor 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.mdand 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
Acknowledgments
- Typst โ the typesetting system
- typst-typographic-resume โ inspiration for the theme system and two-column resume patterns
- pdf-writer โ reference for PDF capabilities documentation
- Claude Code โ Anthropic's CLI for Claude
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi