latexml-oxide: Skill for Claude Code

.claude/skills/perl-port/SKILL.md

perl-port is a skill for Claude Code from dginev/latexml-oxide. It costs 249 tokens per session (1,955 once invoked), scanned A, original, CC0-1.0.

A guide for translating LaTeXML bindings from Perl to Rust while preserving the original behavior. LaTeXML converts LaTeX documents, and bindings define how LaTeX commands and packages are handled.

In plain words
What is it for?
Use it to port or fix a macro, primitive, constructor, column type, or package binding, or to find why an existing Rust binding differs from Perl.
Why use it?
It prevents a Rust port from accidentally changing edge cases, control flow, or naming. It also requires checking the original Perl and real LaTeX sources when needed.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

This is dginev/latexml-oxide's own configuration. It tells Claude Code how to work on latexml-oxide itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything latexml-oxide configures →

Reuse

Borrowing it

Nothing to install: this file belongs to dginev/latexml-oxide. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/dginev/latexml-oxide/main/.claude/skills/perl-port/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/dginev/latexml-oxide

Made for: Claude Code.

Wrote 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.

agentmods badge for perl-port

README.md
[![agentmods](https://agentmods.dev/badge/skills/dginev/latexml-oxide/perl-port/github.svg)](https://agentmods.dev/skills/dginev/latexml-oxide/perl-port)
Your own site
<a href="https://agentmods.dev/skills/dginev/latexml-oxide/perl-port"><img src="https://agentmods.dev/badge/skills/dginev/latexml-oxide/perl-port/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.

agentmods 80×15 button for perl-port

Your own site · 80×15
<a href="https://agentmods.dev/skills/dginev/latexml-oxide/perl-port"><img src="https://agentmods.dev/badge/skills/dginev/latexml-oxide/perl-port.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 249 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,955 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00249 $0.01955
Opus 5 $0.00125 $0.00978
Sonnet 5 $0.00050 $0.00391
Haiku 4.5 $0.00025 $0.00196

Measured 10d ago against content hash 485663d0823f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

perl-port 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 10d ago.

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.

.claude/skills/perl-port/SKILL.md · 120 lines

How it starts

The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.

The Perl code is the ground truth. This is a translation project: preserve the original semantics, control flow, edge cases, and naming. Do not invent abstractions, rename concepts, or simplify behavior unless the difference is a documented intentional divergence.

1 — Read the Perl source FIRST (always, before writing Rust)

Kind Perl source
Engine definitions (\cs in the kernel) LaTeXML/lib/LaTeXML/Engine/<file>.pool.ltxml
Package bindings LaTeXML/lib/LaTeXML/Package/<name>.sty.ltxml (and .cls.ltxml)
Core machinery (Mouth/Gullet/Stomach/Document/State) LaTeXML/lib/LaTeXML/Core/*.pm
The Def* API itself LaTeXML/lib/LaTeXML/Package.pm
TeX ground truth (when Perl is itself emulating TeX) background/tex.web, background/texbook.tex
Real LaTeX / package source — LaTeXML's .pool/.ltxml is a reimplementation, occasionally simplified kpsewhich latex.ltx (kernel) · kpsewhich <pkg>.sty — the actual \defs

Quote the Perl line range in a comment next to the Rust port (the codebase does this consistently, e.g. // Perl L2734-2752) so the next reader can diff against the source.

1b — When a faithful-looking binding still diverges from Perl

Two techniques that repeatedly cut a multi-hour dig to minutes (witness: the \hrulefill\vspace* float bug, arXiv 2302.11635, [OXIDIZED_DESIGN #97] / WISDOM #38):

  • Diff the LaTeXML binding against the REAL kernel def early. Perl is ground truth has one exception: LaTeXML's .pool/.sty.ltxml sometimes simplifies the kernel macro (drops a \leavevmode, \kern\z@, \relax, a mode switch…). Perl may still be correct because its core machinery compensates for the omission; Rust's may not, so Rust diverges while its binding looks byte-faithful to the .pool. When Perl behaves right and Rust wrong on a construct whose binding you've already confirmed matches the .pool, run kpsewhich latex.ltx (or <pkg>.sty) and grep the real \def — a token LaTeXML dropped is a prime suspect. Restoring the kernel definition is more faithful (record it in OXIDIZED_DESIGN.md), and it fixes the root instead of the symptom.
  • A mode/state-gated primitive that "doesn't fire" → suspect the UPSTREAM setter, not the primitive. Instrument the gate itself (an env-gated eprintln! of the condition inputs — e.g. MODE/BOUND_MODE at the if mode=="horizontal" check). If the gate is correctly false, the binding is faithful and the bug is whatever should have set that state earlier (\leavevmode/enterHorizontal here). Don't keep re-reading the primitive that didn't fire — it's the victim, not the culprit. background/tex.web states the real gate (e.g. hmode+vskip: head_for_vmode\vskip ends a paragraph only in horizontal mode), which tells you which state must be true upstream.

Read the full file on GitHub · 120 lines

Changes

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.

  1. 10d ago First seen · 120 lines · 249 tokens per session scan A 485663d0823f

Subscribe to this mod's changes

perl-port is a skill published in the GitHub repository dginev/latexml-oxide (12 stars, last pushed today), licensed CC0-1.0. It adds 249 tokens to every session and 1,955 once invoked, about $0.0012 per session on Opus 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.