Agent skill

Latex Diff

by flonat in flonat/flonat-research

Compare two LaTeX files, project directories, or Git revisions and produce human-readable plus machine-readable severity-graded semantic changes.

MITAuto-check passedDocuments & Office

Install Latex Diff

skills CLI
$ npx skills add flonat/flonat-research --skill latex-diff -a claude-code

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

GitHub CLI
$ gh skill install flonat/flonat-research latex-diff --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/flonat/flonat-research.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/latex-diff .claude/skills/latex-diff && 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
latex-diff
GitHub stars
145
Token cost
~1.9k tokens
SKILL.md length
787 words
Files
1
Skills in repo
83
Repo updated
First seen
Licence
MIT

At a glance

Compare two LaTeX files, project directories, or Git revisions and produce human-readable plus machine-readable severity-graded semantic changes.

  • Works in 4 steps: Resolve the two inputs → Run the diff → Persist a requested diff bundle → …
  • Determining what changed between manuscript versions
  • SKILL.md covers When to Use, When NOT to Use, What it produces and Critical rules, plus 2 more sections
  • Calls git

What it does

Latex Diff is an agent skill from flonat/flonat-research. Compare two LaTeX files, project directories, or Git revisions and produce human-readable plus machine-readable severity-graded semantic changes. Use when determining what changed between manuscript versions or preparing a revision audit bundle. Not for proofreading one version; use $proofread.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Documents & Office, covering LaTeX and Copy editing and proofreading. It works with LaTeX and Git. The repository describes itself as: Shareable Claude Code + Codex infrastructure for PhD researchers — skills, agents, hooks, and rules for academic workflows. The licence is MIT.

When your agent uses it

  • Determining what changed between manuscript versions
  • Preparing a revision audit bundle

Example prompts

  • “/latex-diff”

Requirements

  • Pre-approved tools (allowed-tools): Bash(latexdiff-agent:*), Bash(git show:*), Bash(git diff:*), Bash(git worktree:*), Bash(git log:*), Bash(mktemp*), Bash(mkdir*), Bash(ls*), Bash(rm*), Read, Glob, Grep

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Resolve the two inputs
  2. Run the diff
  3. Persist a requested diff bundle
  4. Report

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash(latexdiff-agent:*)
    • Bash(git show:*)
    • Bash(git diff:*)
    • Bash(git worktree:*)
    • Bash(git log:*)
    • Bash(mktemp*)
    • Bash(mkdir*)
    • Bash(ls*)
    • Bash(rm*)
    • Read

    …and 2 more on the same allowed-tools line.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

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

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    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

Latex Diff loads about 1.9k tokens when it runs. Until then it costs about 77 tokens; SKILL.md has 787 words of instructions outside code blocks.

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

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 flonat/flonat-research at commit da27600, republished under its MIT licence (© flonat). 787 words, ~1,931 tokens.

Download SKILL.mdSave it as .claude/skills/latex-diff/SKILL.md (or your agent's skills folder).
name
latex-diff
description
Compare two LaTeX files, project directories, or Git revisions and produce human-readable plus machine-readable severity-graded semantic changes. Use when determining what changed between manuscript versions or preparing a revision audit bundle. Not for proofreading one version; use $proofread.
allowed-tools
Bash(latexdiff-agent:*), Bash(git show:*), Bash(git diff:*), Bash(git worktree:*), Bash(git log:*), Bash(mktemp*), Bash(mkdir*), Bash(ls*), Bash(rm*), Read, Glob, Grep
argument-hint
[old] [new] (files, dirs, or git revisions)

LaTeX Diff

Compare two versions of a LaTeX document and report what actually changed — text, equations, citations, labels/refs, section titles, macros, environments, file add/remove, and moves — each graded by severity. Wraps the latexdiff-agent CLI (packages/latex-diff). Member of the latex-* source/build family.

When to Use

  • "What changed between these two versions of the paper?"
  • Building an R&R "summary of changes" or a preprint vN→vN+1 changelog
  • Focusing a re-review on the changes that matter (semantic-impact only)
  • Sanity-checking a co-author's edits before merging

When NOT to Use

  • Compiling a document → latex
  • Prose quality / proofreading → proofread
  • A raw line diff is enough → git diff (this skill is LaTeX-aware: it knows a changed \cite key from a reflowed paragraph)

What it produces

Two views from the same canonical diff:

  1. Human summary — grouped by file and section, every line carrying a change id, a severity badge, and a file:line location.
  2. Machine-readable JSON — severity-graded ChangeRecords. semantic_impact: true flags the changes a reviewer should actually read.

For a persistent run inside a research project, these are the mandatory core files. Use one timestamp-only basename for the whole run:

text
reviews/<scope>/<check>/<YYYY-MM-DD-HHMM>.md
reviews/<scope>/<check>/<YYYY-MM-DD-HHMM>.changes.json

Here and below, <check> is this skill's frontmatter name.

Co-locate applicable typed companions with the same basename:

  • .full.json — unfiltered machine-readable inventory
  • .changes.md — full or raw human-readable inventory when the primary report is a shorter curated summary
  • .diff.tex and .diff.pdf — rendered manuscript comparison
  • .source.patch — exact source patch for source-only changes such as citation rekeys

The core pair is stable; companions vary with the comparison. Do not replace the core pair with a PDF, patch, or run-specific directory.

Severity ladder: trivial < low < medium < high < critical. Change types: formatting_only, text, equation, citation, label_ref, environment, section_title, macro_definition, file_add, file_remove, move, other.

Full flag reference: packages/latex-diff/README.md.

Critical rules

  1. Read-only. This skill never edits the paper. It reports; the human (or a downstream skill) decides what to do.
  2. paper/ is LaTeX-only — when extracting git revisions to temp dirs, write temp copies under /tmp, never inside an Overleaf-synced paper/.
  3. Clean up any git worktree / temp dirs you create.
  4. Route generated artifacts by provenance. In a research project, persist them under reviews/<scope>/<check>/, where <scope> is the target paper slug or _project and <check> is this skill's frontmatter name. Never place generated diff output under correspondence/; genuine reviewer/editor/co-author material may be an input, but it remains external correspondence.
  5. Use a flat, same-stem bundle. Put files directly in the producer directory with a YYYY-MM-DD-HHMM basename. Do not create a timestamped run subdirectory and do not use README.md, summary.md, or bespoke basenames.

Protocol

1. Resolve the two inputs
Input formHow to run
Two fileslatexdiff-agent OLD.tex NEW.tex …
Two project dirs (multi-file, \input/\include-aware)latexdiff-agent OLD_DIR/ NEW_DIR/ …
Two git revisions of one fileextract each, then diff (below)
Two git revisions of a whole projectgit worktree each, then diff dirs (below)

Single file across revisions:

bash
git show <REV_OLD>:<path/to/main.tex> > /tmp/ld-old.tex
git show <REV_NEW>:<path/to/main.tex> > /tmp/ld-new.tex   # omit for working tree
latexdiff-agent /tmp/ld-old.tex /tmp/ld-new.tex --summary -

Whole project across revisions (multi-file):

bash
git worktree add /tmp/ld-old <REV_OLD>
git worktree add /tmp/ld-new <REV_NEW>
latexdiff-agent /tmp/ld-old/<paper-dir> /tmp/ld-new/<paper-dir> --summary - --compact --semantic-only
git worktree remove /tmp/ld-old && git worktree remove /tmp/ld-new

Resolve revisions with git log --oneline -- <path> when the user names a round ("since submission", "v1") rather than a SHA. If ambiguous, ask.

Show full SKILL.md (288 more words)Show less
2. Run the diff

Get both views in one pass — the human summary to read aloud, and the semantic-only JSON to reason over:

bash
latexdiff-agent <OLD> <NEW> --summary -                 # human view
latexdiff-agent <OLD> <NEW> --compact --semantic-only   # the changes that matter

Useful filters (compose freely): --min-severity high, --type citation, --section Methods, --file sections/intro.tex.

3. Persist a requested diff bundle

If the user asks to generate, create, save, or deliver a diff inside a research project, resolve the project root and paper scope, then create the canonical destination. A conversational request to explain changes without saving files may remain stdout-only.

bash
STAMP=$(date '+%Y-%m-%d-%H%M')
OUT="<project-root>/reviews/<scope>/<check>"
BASE="$OUT/$STAMP"
mkdir -p "$OUT"
latexdiff-agent <OLD> <NEW> --summary "$BASE.md"
latexdiff-agent <OLD> <NEW> --compact --semantic-only --json "$BASE.changes.json"

Add same-stem companions only when useful:

bash
latexdiff-agent <OLD> <NEW> --json "$BASE.full.json"
latexdiff-agent <OLD> <NEW> --latexdiff "$BASE.diff.tex"
git diff <OLD> <NEW> > "$BASE.source.patch"  # source-level comparison only

Compile .diff.tex through the latex workflow when the user requests a visual diff; keep intermediate build artifacts in out/ and copy only the final .diff.pdf beside the bundle. Record the two stable comparison inputs in the Markdown report; never expose disposable /tmp paths as the authoritative baseline/current identifiers.

4. Report
  1. Lead with the summary line: total changes, semantic-impact count, impact score.
  2. List the semantic-impact changes grouped by section, each with its file:line, type, and severity. These are the ones worth attention.
  3. Note (don't dump) the trivial/formatting/move changes as a count.
  4. If the user wanted a changelog or response-letter "summary of changes", phrase the semantic changes as prose bullets — but do not edit the manuscript (rules/manuscript-edit-budget.md); hand the bullets back for them to place.

Cross-References

SkillRelationship
latexCompiles documents; this skill compares versions of them
review-artefact-routingGoverns the scoped producer route and same-stem companion contract
strategic-revision --externalConsumes this as evidence for the R&R "summary of changes"; it does not turn internal findings into venue claims
preprintConsumes this for a vN→vN+1 changelog on version bump
paper-critic / referee2-reviewerCan take --semantic-only JSON to focus a re-review on what changed
packages/latex-diff/README.mdFull CLI flags, schema, and design notes

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

Files

Just SKILL.md in skills/latex-diff of flonat/flonat-research.

Open the folder on GitHubat commit da27600

Compare with similar skills

Latex Diff 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.

Latex Diff compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Latex Diff this skillflonat/flonat-research145—~1.9kAutomated safety check: PassMIT
BeamerNoi1r/beamer-skill363—~13kAutomated safety check: NotesMIT
Pre Submission ReviewerHKUSTDial/Supervisor-Skills8.4k—~3.2kAutomated safety check: PassCC-BY-4.0
Oleafly Response LetterOleafly/Oleafly205—~2.3kAutomated safety check: PassMIT
Write Paperfrenzymath/Danus471—~18kAutomated safety check: PassApache-2.0
ProjectHurricaHjz/second-yourself113—~3.1kAutomated safety check: PassMIT

Similar skills

  • Beamer

    Noi1r/beamer-skill

    Beamer LaTeX slide workflow: create, compile, review, and polish academic presentations.

    363 GitHub stars~13k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check: notes
  • Pre Submission Reviewer

    HKUSTDial/Supervisor-Skills

    Runs a pre-submission review of a technical paper across five dimensions: macro logic, writing details, English grammar, LaTeX formatting, and figure quality.

    8.4k GitHub stars~3.2k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • Turn reviewer comments and the changes already made into a point-by-point response letter, in LaTeX or Typst and in plain text.

    205 GitHub stars~2.3k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Write Paper

    frenzymath/Danus

    Turn a project's verified fact graph into a publishable LaTeX paper in a configurable house style — a standalone amsart .tex with a real bibliography, compiled to PDF.

    471 GitHub stars~18k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • Project

    HurricaHjz/second-yourself

    Manage the owner's OWN working repositories (Overleaf LaTeX projects, code repositories) from the vault, on an explicit instruction only: /project link | open | sync | brief | snapshot | status |…

    113 GitHub stars~3.1k tokensUpdated 6 days ago
    Documents & OfficeAuto-check passed
  • Review Overleaf

    fcakyon/claude-codex-settings

    This skill should be used when user asks to "fetch overleaf review comments", "address overleaf reviews", "apply overleaf comments", "review my overleaf paper", "sync overleaf feedback to local"…

    1.2k GitHub stars~940 tokensUpdated yesterday
    Documents & OfficeAuto-check passed

More from flonat/flonat-research

All 83 skills in this repo
  • Latex Posters

    flonat/flonat-research

    Create a large-format academic poster in LaTeX using beamerposter, tikzposter, or baposter.

    145 GitHub stars~1.5k tokensUpdated 8 days ago
    Auto-check: notes
  • Skill Creator

    flonat/flonat-research

    Create, revise, and evaluate reusable AI workflow skills, including trigger-quality tests.

    145 GitHub stars~4.4k tokensUpdated 8 days ago
    Auto-check passed
  • DOCX

    flonat/flonat-research

    Create, read, edit, or convert Microsoft Word documents while preserving professional document structure.

    145 GitHub stars~1.2k tokensUpdated 8 days ago
    Auto-check passed
  • PDF

    flonat/flonat-research

    Read, create, combine, split, rotate, OCR, watermark, secure, or extract content from PDF files.

    145 GitHub stars~488 tokensUpdated 8 days ago
    Auto-check passed
  • Init Project Orchestration

    flonat/flonat-research

    Create or migrate project-level agents, repeatable project workflows, and planning state from one client-neutral contract, then render repository-scoped adapters for both Claude Code and Codex.

    145 GitHub stars~1.6k tokensUpdated 8 days ago
    Auto-check passed
  • Pre Commit Audit

    flonat/flonat-research

    Deliver a fast pre-commit safety scan: file size, anonymity (author / affiliation strings in tex/bib), hardcoded secrets, and invisible-Unicode carriers.

    145 GitHub stars~2.8k tokensUpdated 8 days ago
    Auto-check: notes

Works with

Questions about Latex Diff

What does Latex Diff do?

Compare two LaTeX files, project directories, or Git revisions and produce human-readable plus machine-readable severity-graded semantic changes. Latex Diff is an agent skill from flonat/flonat-research. Compare two LaTeX files, project directories, or Git revisions and produce human-readable plus machine-readable severity-graded semantic changes.

When should I use Latex Diff?

Latex Diff fits situations like: determining what changed between manuscript versions; preparing a revision audit bundle.

How do I install Latex Diff in Claude Code?

Run `npx skills add flonat/flonat-research --skill latex-diff -a claude-code`. Or copy the skill folder (skills/latex-diff in flonat/flonat-research) into .claude/skills/latex-diff in your project. Claude Code loads it when a task matches its description.

How do I install Latex Diff in Codex?

Run `npx skills add flonat/flonat-research --skill latex-diff -a codex`. Or copy the skill folder (skills/latex-diff in flonat/flonat-research) into .agents/skills/latex-diff in your project. Codex loads it when a task matches its description.

Can I use Latex Diff 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 flonat/flonat-research --skill latex-diff -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/latex-diff, .gemini/skills/latex-diff, .github/skills/latex-diff and .opencode/skills/latex-diff in your project.

What does Latex Diff need to run?

Going by SKILL.md and its folder, Latex Diff needs the command-line tools its instructions call (git). Its frontmatter pre-approves these tools: Bash(latexdiff-agent:*), Bash(git show:*), Bash(git diff:*), Bash(git worktree:*), Bash(git log:*), Bash(mktemp*), Bash(mkdir*), Bash(ls*), Bash(rm*), Read, Glob, Grep.

Does Latex Diff access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Latex Diff 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 Latex Diff use?

Latex Diff 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 Latex Diff use?

About 1.9k tokens (SKILL.md is roughly 7.7k 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 Latex Diff?

Skills that share tags, products or a category with Latex Diff: Beamer (Noi1r/beamer-skill, 363 stars), Pre Submission Reviewer (HKUSTDial/Supervisor-Skills, 8.4k stars), Oleafly Response Letter (Oleafly/Oleafly, 205 stars) and Write Paper (frenzymath/Danus, 471 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Latex Diff?

flonat (a GitHub user) maintains it in flonat/flonat-research, which has 145 GitHub stars. The repository holds 83 skills in this directory. The repository was last updated on September 29, 2026.

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