flonat/flonat-research/latex-diff
Claude Code and agent skill by flonat/flonat-research
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install flonat/flonat-research/latex-diffSKILL.md
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 thelatexdiff-agentCLI (packages/latex-diff). Member of thelatex-*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:
- Human summary — grouped by file and section, every line carrying a change
id, a severity badge, and a file:line location.
- 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:
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.texand.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
- Read-only. This skill never edits the paper. It reports; the human (or a
downstream skill) decides what to do.
- `paper/` is LaTeX-only — when extracting git revisions to temp dirs, write
temp copies under /tmp, never inside an Overleaf-synced paper/.
- Clean up any
git worktree/ temp dirs you create. - 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.
- 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 form | How to run | |
|---|---|---|
| Two files | latexdiff-agent OLD.tex NEW.tex … | |
Two project dirs (multi-file, \input/\include-aware) | latexdiff-agent OLD_DIR/ NEW_DIR/ … | |
| Two git revisions of one file | extract each, then diff (below) | |
| Two git revisions of a whole project | git worktree each, then diff dirs (below) |
Single file across revisions:
Whole project across revisions (multi-file):
Resolve revisions withgit log --oneline -- <path>when the user names around ("since submission", "v1") rather than a SHA. If ambiguous, ask.
2. Run the diff
Get both views in one pass — the human summary to read aloud, and the semantic-only JSON to reason over:
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.
Add same-stem companions only when useful:
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
- Lead with the summary line: total changes, semantic-impact count, impact score.
- List the semantic-impact changes grouped by section, each with its
file:line, type, and severity. These are the ones worth attention.
- Note (don't dump) the trivial/formatting/move changes as a count.
- 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
| Skill | Relationship | |
|---|---|---|
latex | Compiles documents; this skill compares versions of them | |
review-artefact-routing | Governs the scoped producer route and same-stem companion contract | |
strategic-revision --external | Consumes this as evidence for the R&R "summary of changes"; it does not turn internal findings into venue claims | |
preprint | Consumes this for a vN→vN+1 changelog on version bump | |
paper-critic / referee2-reviewer | Can take --semantic-only JSON to focus a re-review on what changed | |
packages/latex-diff/README.md | Full CLI flags, schema, and design notes |
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/latex-diff/SKILL.md
Popularity
- Repository stars
- 144
- Repository forks
- 27
- 7-day trend score
- 25
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/flonat/flonat-research/latex-diff)