katex/SKILL.md
Render and embed math formulas with KaTeX using official documentation-backed patterns. Use when an agent needs inline or display math in HTML, Markdown, MDX, or other text-based outputs, or when it should generate insertion-ready KaTeX snippets from TeX.
npx skillsauth add laitszkin/apollo-toolkit katexInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
node, npx, or network package download is unavailable, keep the source TeX unchanged and explain that KaTeX rendering could not be generated locally.references/official-docs.md before choosing render mode, options, or insertion strategy.apltk render-katex for deterministic output whenever a static rendered snippet is enough.htmlAndMathml, keep trust disabled unless the content source is explicitly trusted, and include the KaTeX stylesheet whenever the output will be displayed in HTML.Use KaTeX safely and consistently so mathematical formulas can be inserted into documents without the agent re-deriving the rendering workflow each time.
$...$ and $$...$$.Run the bundled renderer for pre-rendered output:
apltk render-katex \
--tex '\int_0^1 x^2 \\, dx = \\frac{1}{3}' \
--display-mode \
--output-format html-fragment
Useful output modes:
html-fragment: paste into HTML, MDX, JSX, or Markdown engines that allow raw HTML.html-page: generate a standalone previewable HTML file with the KaTeX stylesheet link included.markdown-inline: emit an inline-friendly HTML fragment for Markdown/MDX.markdown-block: emit a block-friendly HTML fragment for Markdown/MDX.json: emit machine-friendly JSON for downstream automation or templating.Useful options:
--display-mode for centered display math; omit for inline math.--katex-format htmlAndMathml by default for accessibility; switch only when the destination needs HTML-only or MathML-only output.--macro / --macro-file for reusable custom macros.--strict, --trust, --max-size, --max-expand, --error-color, and --no-throw-on-error when the task needs explicit control from the official options reference.html-fragment output and ensure the page loads the KaTeX stylesheet.html-page when the user wants a ready-to-open preview file.markdown-inline or markdown-block only if the target renderer preserves raw HTML; otherwise keep source TeX and document the runtime render requirement.See references/insertion-patterns.md for concrete insertion guidance.
katex.min.js, auto-render.min.js, the stylesheet, then call renderMathInElement(...) after the DOM is ready.trust off unless the input source is trusted and the task explicitly needs trusted commands.references/official-docs.md: condensed notes from the official KaTeX docs and direct source links.references/insertion-patterns.md: insertion patterns for HTML, Markdown/MDX, and auto-rendered pages.apltk render-katex: TypeScript handler that calls the official KaTeX CLI for insertion-ready output (lib/tools/render-katex.ts).development
Guides the agent through creating a new Agent Skill from scratch. Use when the user wants to build a skill, create a new skill, scaffold a skill directory, or author a SKILL.md. Do NOT use for optimising or rewriting existing skills — use 'optimise-skill' for that. Do NOT use for editing files that are already part of a skill. Do NOT use for creating non-skill content like documentation, scripts, or project files.
development
Guides the agent through creating a new Agent Skill from scratch. Use when the user wants to build a skill, create a new skill, scaffold a skill directory, or author a SKILL.md. Do NOT use for optimising or rewriting existing skills — use 'optimise-skill' for that. Do NOT use for editing files that are already part of a skill. Do NOT use for creating non-skill content like documentation, scripts, or project files.
development
Review a pull request — interactive PR selection via `gh`, 4-dimension code review (hallucinated code, architecture, performance, test validity), then post severity-graded comments with fix suggestions on the PR. Not for spec-based review — use `review` instead.
tools
協助完成自動化版本發佈。同步文檔、更新版本號、推送 tag 並建立 GitHub Release。