Agent skill

Math Parser Formatter

by jolars in jolars/panache

Implement or debug Panache's TeX math parser and formatter internals, including the lossless CST, semantic model, diagnostics, and Badness parity.

MITAuto-check passedDevelopment

Install Math Parser Formatter

skills CLI
$ npx skills add jolars/panache --skill math-parser-formatter -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jolars/panache math-parser-formatter --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jolars/panache.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/math-parser-formatter .claude/skills/math-parser-formatter && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
math-parser-formatter
GitHub stars
234
Token cost
~1.5k tokens
SKILL.md length
698 words
Files
2
Skills in repo
10
Repo updated
First seen
Licence
MIT

At a glance

Implement or debug Panache's TeX math parser and formatter internals, including the lossless CST, semantic model, diagnostics, and Badness parity.

  • Works in 8 steps: Reproduce the smallest failing behavior… → Read the relevant source of truth above.… → Add the smallest focused failing test… → …
  • Modifying math implementation code
  • SKILL.md covers Scope and sources of truth, Invariants and Workflow
  • Calls cargo

What it does

Math Parser Formatter is an agent skill from jolars/panache. Implement or debug Panache's TeX math parser and formatter internals, including the lossless CST, semantic model, diagnostics, and Badness parity. Use when modifying math implementation code or regression tests. Do not use for explanatory questions, configuration or API design discussions, or documentation-only work.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `REFERENCE.md`).

It sits in Development, covering Linting and formatting. It works with Pandoc. The repository describes itself as: Language server, formatter, and linter for Markdown, Quarto, and R Markdown. The licence is MIT.

When your agent uses it

  • Modifying math implementation code
  • Regression tests
  • Explanatory questions
  • API design discussions

Example prompts

  • “/math-parser-formatter”

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Reproduce the smallest failing behavior and identify the owning layer
  2. Read the relevant source of truth above. Verify current implementation when
  3. Add the smallest focused failing test first. Use parser goldens for CST
  4. Compare against the pinned Badness oracle when the shared behavior applies.
  5. Run the focused suite for each changed layer
  6. If the formatter corpus, route census, or parity classification changes,
  7. Before landing a code change, run the workspace validation required by root
  8. Update STYLE.md, user documentation, configuration schema, oracle reports,

What it can do on your machine

Read from SKILL.md and the folder at commit 167b303. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • cargo

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Math Parser Formatter loads about 1.5k tokens when it runs. Until then it costs about 85 tokens; SKILL.md has 698 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~85
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jolars/panache at commit 167b303, republished under its MIT licence (© jolars). 698 words, ~1,503 tokens.

Download SKILL.mdSave it as .claude/skills/math-parser-formatter/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
math-parser-formatter
description
Implement or debug Panache's TeX math parser and formatter internals, including the lossless CST, semantic model, diagnostics, and Badness parity. Use when modifying math implementation code or regression tests. Do not use for explanatory questions, configuration or API design discussions, or documentation-only work.

Maintain the math parser and formatter

Treat math formatting as a stable, issue-driven subsystem. The migration roadmap in TODO.md is complete; do not use it as a work queue.

Project source paths below are relative to the repository root. Skill resources are relative to this SKILL.md.

Scope and sources of truth

  • The TeX content parser is crates/panache-parser/src/parser/math.rs; host embedding lives in crates/panache-parser/src/parser/inlines/math.rs, and typed accessors live in crates/panache-parser/src/syntax/{math,inlines}.rs.
  • The formatter lives in crates/panache-formatter/src/formatter/math/ and crates/panache-formatter/src/formatter/math.rs. Its user-facing policy is the stable [format] math mode, which defaults to reflow. The [experimental] format-math boolean is a deprecated compatibility alias.
  • For changes to user-visible formatting behavior, read crates/panache-formatter/src/formatter/math/STYLE.md; it is the canonical style and preservation contract.
  • For cross-layer parser, semantic, or formatter work, read REFERENCE.md before changing behavior. It records the non-obvious implementation constraints, intentional oracle differences, and stabilization baseline.
  • Pandoc is not an oracle for math formatting because it preserves math content. Use the exact, pinned badness-parser and badness-formatter development dependencies as structural and output oracles. Retain independent MathML and TeX/PDF checks when meaning preservation is at risk.

Follow the parser, math, formatter, linter, and language-server invariants in the repository's root AGENTS.md for every layer the change touches.

Invariants

  • Keep parsing unconditional, single-pass, lossless, and error-tolerant. The formatter option controls rewriting; it is not a Pandoc Extensions flag.
  • Derive MathDiagnostic values through math_diagnostics() as a side channel. Do not encode diagnostics as CST structure.
  • Keep Markdown delimiters, Bookdown equation labels, Pandoc attributes, and container prefixes at the host layer where possible. Equation labels remain host tokens between ordered MATH_CONTENT segments.
  • Keep MATH_SPACE and MATH_NEWLINE distinct from host trivia, and read math source through syntax::math::math_content_text() when container prefixes may be interleaved.
  • Keep the lexical CST neutral. Derive operator class, delimiter role, contextual unary coercion, and break priority through the shared semantic atom model rather than formatter-local token interpretation.
  • Keep Badness test-only. Production code must not retain or project a Badness tree, delegate parsing or formatting to Badness, or depend on Badness at runtime. Test projectors may only perform mechanical kind and wrapper normalization; they must not parse, infer attachment, or repair a tree.
  • Preserve source bytes when syntax is malformed or semantics cannot be proven. Do not broaden the formatter's rewrite boundary merely to increase oracle parity.
  • Do not rewrite macros, canonicalize \frac and \dfrac, or format constructs whose meaning would require macro expansion.
  • If a pinned Badness defect explains a divergence, record the defect and tell the user. Do not copy the defect into production code or silently reclassify the case.
Show full SKILL.md (289 more words)Show less

Workflow

  1. Reproduce the smallest failing behavior and identify the owning layer: host parsing, TeX CST, semantic atoms, formatter lowering/layout, configuration, diagnostics, or position mapping. Inspect the CST before adding a formatter workaround.

  2. Read the relevant source of truth above. Verify current implementation when documentation, reports, and behavior disagree; correct only stale material within the requested scope.

  3. Add the smallest focused failing test first. Use parser goldens for CST shape, formatter goldens for user-visible output, and unit or differential tests for semantic behavior.

  4. Compare against the pinned Badness oracle when the shared behavior applies. Keep named intentional differences and preservation cases explicit. Use MathML or representative TeX/PDF checks when byte parity does not establish semantic equivalence.

  5. Run the focused suite for each changed layer:

    • Parser CST: cargo test -p panache-parser --test math_badness_parity
    • Semantic model: cargo test -p panache-parser --test math_semantic_parity
    • Formatter output: cargo test -p panache-formatter --test math_badness_oracle
    • Formatter behavior and host integration: the smallest matching tests under crates/panache-formatter/tests/ and the root golden suite.
  6. If the formatter corpus, route census, or parity classification changes, regenerate and review the tracked report with:

    bash
    cargo test -p panache-formatter --test math_badness_oracle \
      math_badness_full_report -- --ignored --nocapture
  7. Before landing a code change, run the workspace validation required by root AGENTS.md. Review every parser snapshot diff for losslessness, verify formatter idempotency, and keep math content byte-identical in verbatim mode. Do not rerun a focused suite after an equivalent workspace gate on the same tree state.

  8. Update STYLE.md, user documentation, configuration schema, oracle reports, or this skill only when the behavior or durable maintenance contract changes. Do not update the completed roadmap or historical baselines for an unrelated fix. Commit only when the user has requested it, following repository guidance.

© jolars, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .agents/skills/math-parser-formatter of jolars/panache.

  • SKILL.md
  • REFERENCE.md

Open the folder on GitHubat commit 167b303

Compare with similar skills

Math Parser Formatter next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Math Parser Formatter compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Math Parser Formatter this skilljolars/panache234—~1.5kAutomated safety check: PassMIT
Go Pedantrychromedp/chromedp13k—~3.7kAutomated safety check: PassMIT
Update Dependenciesalorence/django-modern-rpc111—~1.3kAutomated safety check: PassMIT
Lintwheelos/apollo-lite171—~482Automated safety check: PassApache-2.0
Modern Pythonmycelium-io/mycelium119—~752Automated safety check: PassCustom licence
Docs CIjh941213/my-cc-harness126—~989Automated safety check: NotesNone

Similar skills

  • Go Pedantry

    chromedp/chromedp

    This skill should be used when the user is writing Go code and needs guidance on Go-specific pedantry: error wrapping with fmt.Errorf and %w, interface design (accept interfaces return structs)…

    13k GitHub stars~3.7k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Update Dependencies

    alorence/django-modern-rpc

    Routine update of all project dependencies — uv itself, uv.lock (all groups), tool versions pinned in GitHub workflows and .pre-commit-config.yaml (uv, ruff, mypy...), and SHA-pinned GitHub Actions.

    111 GitHub stars~1.3k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Lint

    wheelos/apollo-lite

    Apollo-Lite lint and formatting workflow. An agent skill from wheelos/apollo-lite.

    171 GitHub stars~482 tokensUpdated today
    DevelopmentAuto-check passed
  • Modern Python

    mycelium-io/mycelium

    Modern Python tooling practices for the mycelium project. An agent skill from mycelium-io/mycelium.

    119 GitHub stars~752 tokensUpdated today
    DevelopmentAuto-check passed
  • Docs CI

    jh941213/my-cc-harness

    Scaffold a docs-as-code CI/CD pipeline + docs drift detection — link check, OpenAPI lint/breaking gate, mermaid validation, docs freshness check, CHANGELOG automation, docs.yaml manifest.

    126 GitHub stars~989 tokensUpdated 2 mo ago
    DevelopmentAuto-check: notes
  • Docs CI

    jh941213/my-cc-harness

    docs-as-code CI/CD 파이프라인 스캐폴딩 + 문서 드리프트 감지 — 링크 체크, OpenAPI lint/breaking 게이트, mermaid 검증, 문서 신선도 검사, CHANGELOG 자동화, docs.yaml 매니페스트.

    126 GitHub stars~740 tokensUpdated 2 mo ago
    DevelopmentAuto-check: notes

More from jolars/panache

All 10 skills in this repo
  • Add Syntax Construct

    jolars/panache

    Add a new block-level or inline-level syntax construct to Panache's parser and formatter — confirm the pandoc-native shape first, add SyntaxKinds for every byte category, gate it behind an extension…

    234 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Grow Panache's CommonMark spec conformance under Flavor::CommonMark by running every spec.txt example through the shared parser, comparing rendered HTML against the spec's expected HTML…

    234 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • External Tools

    jolars/panache

    Work on Panache's delegation of embedded code blocks to third-party formatters and linters (ruff, shfmt, shellcheck, rustfmt, ...) — add or change a preset, fix the offset mapping that translates a…

    234 GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Linter Investigation

    jolars/panache

    Investigate panache's linter (and, secondarily, its parser) against a real-world Quarto/Markdown codebase.

    234 GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Add Lint Rule

    jolars/panache

    Add a new built-in lint rule to the Panache linter — wire it into the registry, gate it on the right extension/flavor, add a regression fixture with focused assertions, and document it.

    234 GitHub stars~2.8k tokensUpdated yesterday
    Auto-check passed
  • Perf Investigation

    jolars/panache

    Profile-driven performance work on the panache parser or formatter.

    234 GitHub stars~3.3k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Math Parser Formatter

What does Math Parser Formatter do?

Implement or debug Panache's TeX math parser and formatter internals, including the lossless CST, semantic model, diagnostics, and Badness parity. Math Parser Formatter is an agent skill from jolars/panache. Implement or debug Panache's TeX math parser and formatter internals, including the lossless CST, semantic model, diagnostics, and Badness parity.

When should I use Math Parser Formatter?

Math Parser Formatter fits situations like: modifying math implementation code; regression tests; explanatory questions; API design discussions.

How do I install Math Parser Formatter in Claude Code?

Run `npx skills add jolars/panache --skill math-parser-formatter -a claude-code`. Or copy the skill folder (.agents/skills/math-parser-formatter in jolars/panache) into .claude/skills/math-parser-formatter in your project. Claude Code loads it when a task matches its description.

How do I install Math Parser Formatter in Codex?

Run `npx skills add jolars/panache --skill math-parser-formatter -a codex`. Or copy the skill folder (.agents/skills/math-parser-formatter in jolars/panache) into .agents/skills/math-parser-formatter in your project. Codex loads it when a task matches its description.

Can I use Math Parser Formatter in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jolars/panache --skill math-parser-formatter -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/math-parser-formatter, .gemini/skills/math-parser-formatter, .github/skills/math-parser-formatter and .opencode/skills/math-parser-formatter in your project.

What does Math Parser Formatter need to run?

Going by SKILL.md and its folder, Math Parser Formatter needs the command-line tools its instructions call (cargo).

Does Math Parser Formatter access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Math Parser Formatter safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Math Parser Formatter use?

Math Parser Formatter is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Math Parser Formatter use?

About 1.5k tokens (SKILL.md is roughly 6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Math Parser Formatter?

Skills that share tags, products or a category with Math Parser Formatter: Go Pedantry (chromedp/chromedp, 13k stars), Update Dependencies (alorence/django-modern-rpc, 111 stars), Lint (wheelos/apollo-lite, 171 stars) and Modern Python (mycelium-io/mycelium, 119 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Math Parser Formatter?

jolars (a GitHub user) maintains it in jolars/panache, which has 234 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 6, 2026.

Source: jolars/panache on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.