Borrowing it
Nothing to install: this file belongs to MahammadNuriyev62/claude-code-katex. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/MahammadNuriyev62/claude-code-katex/main/CLAUDE.mdgit clone --depth 1 https://github.com/MahammadNuriyev62/claude-code-katexWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/mahammadnuriyev62/claude-code-katex/claude-md)<a href="https://agentmods.dev/instructions/mahammadnuriyev62/claude-code-katex/claude-md"><img src="https://agentmods.dev/badge/instructions/mahammadnuriyev62/claude-code-katex/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/mahammadnuriyev62/claude-code-katex/claude-md"><img src="https://agentmods.dev/badge/instructions/mahammadnuriyev62/claude-code-katex/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.04712 | $0.04712 |
| Opus 5.5 | $0.01885 | $0.01885 |
| Sonnet 5.5 | $0.00942 | $0.00942 |
| Haiku 4.5 | $0.00471 | $0.00471 |
Grade A, and why
claude-code-katex CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 354 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Claude Code LaTeX Extension
Architecture
This extension patches Claude Code's webview to render LaTeX math via KaTeX.
(Display name is "Claude Code LaTeX"; the extension ID and repo name are still
claude-code-katex for marketplace continuity.)
The extension injects a math pipeline into Claude Code's own react-markdown plugin chain, so math is tokenized during Markdown parsing — verbatim — instead of being repaired in the DOM afterward.
applyPatch(inextension.js) locates the shared react-markdown processor withinjectMathPluginsinmarkdown-patch.js. Acorn proves that plugin lists come from the same props parameter, enter one unified.use()chain in the correct order, and that exact processor parses and runs the Markdown. Injecting into the two.use()arguments covers every renderer, including callers with no plugin props. Getter reads stay unchanged; plugin arrays are copied withconcat, and the original arguments remain when bundle loading fails. Multiple proven processors are rejected rather than guessed. On upstream builds with native math, the uniquely identifiedmathRenderingEnabledgetter is guarded so only one pipeline owns the source. The full original getter body remains unchanged and runs whenever__KATEX_V2_LOADEDis absent/false. This matters because native math tokenizers retain original-source offsets while our normalization can add line breaks. An unknown or ambiguous native gate rejects the entire patch. A fallback for older or isolated call shapes retains the existing output. Vendored Acorn parses JavaScript structure, accepting direct plugin props and helper-props spreads regardless of minified names, whitespace, comments, or property order. Helper definitions are resolved within their lexical scope; reassigned or shadowed helpers cannot establish an injection point. It addsrehypePlugins:[rehypeKatex]andremarkPlugins:[gfm, remarkBracketMath, remarkMath]. The injected references are guarded onwindow.__KATEX_V2_LOADEDso a bundle-load failure cannot break Claude Code's Markdown. The spread form evaluates the original helper once and preserves its plugins and URL transform, including the Windows file-link plugin. Multiple candidate fallback call sites are rejected as unsupported. Structural rejection reasons are logged so compatibility failures can be diagnosed without guesswork.- The complete patched JavaScript must compile before any files change. All assets are read first, then backups, fonts, CSS, and JS are staged and replaced with per-file renames. Ordinary write failures roll back prior replacements; a process crash between renames is not an atomic transaction across files. Fresh upstream files replace stale backups. If only JS was replaced, the existing CSS backup must match before its old patch is replaced. Disable and uninstall never restore an old backup over an unpatched upstream file.
- It prepends, in order,
vendor/katex.min.js, the optional KaTeX contribvendor/copy-tex.min.js(copying a selection of rendered math yields its LaTeX source), andvendor/remark-math-bundle.jsto the webview bundle (Claude Code mounts its React app at the end of the bundle, so the globals must be defined first). A missing contrib file degrades gracefully — core math still renders. The contrib has a small local adaptation: its cloned selection drops hidden source blocks, hidden rendered equations and source-toggle buttons before serialization. Otherwise a selection across display math copies its hidden source too, duplicating the equation. Keep this adaptation when updatingvendor/copy-tex.min.js. - If the injection point is not found — a future Claude Code reshaped its
bundle —
applyPatchreturnsfalse, touches nothing, and the extension shows an "update / report an issue" notice. There is no fallback renderer. - Display-math HAST nodes are wrapped after
rehype-katexrenders them with a source toggle and theapplication/x-texannotation exposed as selectable$$-wrapped code (issue #18). One delegated click handler covers streamed equations; inline math is not decorated.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday Changed · +36 lines · +441 tokens per session 97bd7664e13d
- 14d ago Changed · +9 lines · +129 tokens per session 4eeb5abf5e2a
- 17d ago Changed · +12 lines · +168 tokens per session c7bf21f0a554
- 18d ago Changed · +77 lines · +1,071 tokens per session dca9a4dac70e
- 1mo ago Changed · +1 tokens per session 82f04c63c4d8
- 1mo ago First seen · 220 lines · 2,902 tokens per session scan A ff9f37b3f32a
claude-code-katex CLAUDE.md is an instructions file published in the GitHub repository MahammadNuriyev62/claude-code-katex (26 stars, last pushed 2d ago), licensed MIT. It adds 4,712 tokens to every session, about $0.0188 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
vscode model-prompts.instructions.md
Model-specific prompt authoring and registry guidelines.