agentleFS
ChanMeng666ChanMeng666/typst-claude-skill/CLAUDE.md

typst-claude-skill

CLAUDE.md14 starsChanged 17 days agoMITView on GitHub

An agent skill that turns document requests into verified PDFs through the Typst CLI. It ships as a Claude Code plugin and marketplace from this one repo. The default branch is master. Run these before opening a PR. CI runs the same checks on Linux with Typst built from source. The plugin-validate CI job treats every validator warning as a failure except one: this file sits at the plugin root, and Claude Code does not load it there. That is…

  • In this repositoryOne other file it gives its agents.

The file

We split this CLAUDE.md into the rules it gives an agent

7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run these before opening a PR.

    line 27
  2. Distinctive:

    Test every claim about Typst behaviour on a real compile, and say which version you tested.

    line 44
  3. Very specific:

    Add new silent bugs to references/typst-pitfalls.md.

    line 45
  4. Distinctive:

    Keep personal data out of this repo.

    line 47
  5. Distinctive:

    Do not recommend an unmaintained package.

    line 48
  6. Very specific:

    Add a dated section to CHANGELOG.md.

    line 53
  7. Distinctive:

    Read the full release notes, not only the highlights.

    line 77

≈ “Common” is an estimate: at least 1 in 5 of the 27,641 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

chanmeng-typst

An agent skill that turns document requests into verified PDFs through the Typst CLI. It ships as a Claude Code plugin and marketplace from this one repo. The default branch is master.

Current state

  • Release: v0.6.0, released 2026-11-01. CHANGELOG.md has the history.
  • Tested on: Typst 0.15.1, the latest official release when this was written. CI pins that version in .github/workflows/validate.yml.
  • Not tested: the unreleased Typst main branch. Only its commit list was read.

Layout

.claude-plugin/          plugin.json (holds the version), marketplace.json
.github/scripts/         compile-templates.py
.github/workflows/       validate.yml, the only CI workflow
skills/chanmeng-typst/
  SKILL.md               workflow, decision tree, gotchas, recovery
  references/            loaded on demand; typst-pitfalls.md lists silent bugs
  scripts/               verify-typst.sh, check-pdf.py
  examples/              compiled by CI
  evals/                 4 test cases in the `claude plugin eval` layout

Checks

Run these before opening a PR. CI runs the same checks on Linux with Typst built from source.

python .github/scripts/compile-templates.py
typst compile --pdf-standard ua-1 skills/chanmeng-typst/examples/resume-ats.typ out.pdf
python skills/chanmeng-typst/scripts/check-pdf.py out.pdf \
  --source skills/chanmeng-typst/examples/resume-ats.typ --ats --pages 1
claude plugin validate .claude-plugin/plugin.json
claude plugin validate .

The plugin-validate CI job treats every validator warning as a failure except one: this file sits at the plugin root, and Claude Code does not load it there. That is intended, because it is for maintainers, not for users of the skill.

compile-templates.py compiles all 9 templates in references/typst-templates.md. Compiling cleanly proves little here, because the bugs this skill targets produce no error. To check a layout or CJK claim, render the PDF and look at it, or read pdffonts and pdftotext.

Rules

  • Test every claim about Typst behaviour on a real compile, and say which version you tested.
  • Add new silent bugs to references/typst-pitfalls.md. Add a check-pdf.py check only when the bug can be detected without false alarms.
  • Change a template and its example together. Both cjk-document copies must stay in step.
  • Keep personal data out of this repo. Examples use invented people, such as Alex Rivera.
  • Do not recommend an unmaintained package. Check its version on Typst Universe before naming it.

Release

  1. Branch from master and bump the version in .claude-plugin/plugin.json.
  2. Add a dated section to CHANGELOG.md. Update the README if features changed.
  3. Open a PR, wait for CI, then squash-merge.
  4. Tag vX.Y.Z on master and create the GitHub release from that changelog section.
  5. Install it fresh. A separate config directory leaves the real one untouched:

    CLAUDE_CONFIG_DIR=/some/empty/dir claude plugin marketplace add ChanMeng666/chanmeng-typst
    CLAUDE_CONFIG_DIR=/some/empty/dir claude plugin install chanmeng-typst@chanmeng-typst
  6. Confirm claude plugin list shows the new version, then compile an example from the installed copy.

Docs-only changes do not need a version bump.

Plugin packaging

  • Icon. The icon is .claude-plugin/icon.png, where the validator and plugin clients look for it. The repo's .gitignore excludes *.png except !.claude-plugin/icon.png, so keep that exception. Removing it makes CI fail with ICON_MISSING.
  • Clients cache by version. Claude Code serves an installed plugin from a cache keyed by version in plugin.json. A change to SKILL.md, references/ or scripts/ reaches existing users only after a version bump. Only README, CHANGELOG and this file may change without a bump.
  • Two manifests, two checks. At the repo root, claude plugin validate . checks only marketplace.json, so plugin.json needs its own validate .claude-plugin/plugin.json run. CI runs both with --strict.
  • Other clients read these files too. Grok Bot, which runs on a Cursor backend, lists this repo in its plugin market by reading .claude-plugin/marketplace.json from installed Claude marketplaces. A wrong name, description or icon shows up there as well.

Upgrading Typst

  1. Upgrade locally. On Windows: winget upgrade Typst.Typst.
  2. Read the full release notes, not only the highlights.
  3. Set TYPST_VERSION in validate.yml, which also rolls the CI cache.
  4. Compile every Typst block in SKILL.md and references/, plus every example, and look for deprecation warnings.
  5. Compare typst <command> --help against references/typst-cli-reference.md.
  6. Compare package versions in the skill against Typst Universe.

Known limits

  • Line breaks between Chinese characters: on 0.15.1 they add a visible space. A fix titled "Discard newline spaces adjacent to Chinese/Japanese text" is on Typst main but unreleased. When a release includes it, retest, then update typst-pitfalls.md and the check-pdf.py warning.
  • check-pdf.py bold warning: it infers bold from font names and source patterns, so it is a warning, not a failure.

Evals

Each case has a prompt and graders. To compare versions, run the same prompt on the new skill and on a snapshot of the old one, then render the outputs.

ComparisonResult
Earlier iteration, new skill against old17/17 and 16/17
v0.6.0 against v0.5.1, Chinese report only6/6 and 6/6, one run each

The Chinese report tie is not a score gain. The old skill reached 6/6 only because the model overrode its wrong guidance and used a font that happened to be installed. The new skill reached it by following its own guidance with a portable font chain.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.