pdf-diff
Compares current Beamer PDF output against a baseline branch. Highlights visual differences to prevent regressions.
Install
mkdir -p .claude/skills/pdf-diff && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12005" && unzip -o skill.zip -d .claude/skills/pdf-diff && rm skill.zipInstalls to .claude/skills/pdf-diff
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Visual PDF regression test comparing current Beamer output against a baseline branch. Use when checking if slide changes introduced visual regressions.Key capabilities
- →Compile current Beamer PDF output
- →Retrieve baseline Beamer PDF output from a specified branch
- →Compare two PDFs visually using `diff-pdf`
- →Report visual differences or confirm identity
- →Generate a diff PDF highlighting changes
How it works
The skill compiles the current and baseline versions of a Beamer PDF, then uses `diff-pdf` to compare them. It reports whether visual differences are detected and provides a diff PDF if they are.
Inputs & outputs
When to use pdf-diff
- →Validate slide deck changes
- →Ensure document formatting consistency
- →Detect visual bugs in academic papers
About this skill
Visual PDF Regression Test
Compare the current Beamer PDF output against a baseline branch to detect visual regressions.
Prerequisites
diff-pdfmust be installed (brew install diff-pdf)- The paper's
.texfile must compile successfully
Steps
Step 1: Parse arguments
- First argument: PaperName (required, e.g.,
SUNY,DreamZero) - Second argument: baseline branch (optional, default:
main)
Step 2: Compile current version
cd /Users/iyunseong/maangeek/paper2pr/Slides
TEXINPUTS=../Preambles:$TEXINPUTS xelatex -interaction=nonstopmode $PAPER.tex
cp $PAPER.pdf /tmp/${PAPER}_current.pdf
Step 3: Get baseline version
cd /Users/iyunseong/maangeek/paper2pr
git stash --include-untracked
git checkout $BRANCH -- Slides/$PAPER.tex
cd Slides
TEXINPUTS=../Preambles:$TEXINPUTS xelatex -interaction=nonstopmode $PAPER.tex
cp $PAPER.pdf /tmp/${PAPER}_baseline.pdf
git checkout - -- Slides/$PAPER.tex
git stash pop
Step 4: Run diff-pdf
diff-pdf --output-diff=/tmp/${PAPER}_diff.pdf /tmp/${PAPER}_baseline.pdf /tmp/${PAPER}_current.pdf
echo "Exit code: $?"
- Exit code 0: PDFs are visually identical
- Exit code 1: Visual differences detected (diff PDF saved)
Step 5: Report results
- If identical: "No visual regressions detected."
- If different: "Visual differences found. Diff PDF saved to /tmp/${PAPER}_diff.pdf"
- Open the diff PDF:
open /tmp/${PAPER}_diff.pdf - Differences are highlighted in red
- Open the diff PDF:
Step 6: Cleanup
rm -f /tmp/${PAPER}_current.pdf /tmp/${PAPER}_baseline.pdf
Keep the diff PDF for review if differences were found.
Notes
- This compares full visual output, including fonts, spacing, and figure rendering
- Single-pass XeLaTeX is sufficient for visual comparison (no bibtex needed)
- For multi-page diffs,
diff-pdf --skip-identicalshows only changed pages
When not to use it
- →When `diff-pdf` is not installed
- →When the paper's `.tex` file does not compile successfully
- →When only text differences are needed
Prerequisites
Limitations
- →Requires `diff-pdf` to be installed
- →Requires the `.tex` file to compile successfully
- →Compares full visual output
How it compares
This skill automates the visual comparison of Beamer PDF outputs against a baseline, providing a clear diff, which is more efficient and accurate than manual visual inspection.
Compared to similar skills
pdf-diff side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| pdf-diff (this skill) | 0 | 4mo | Review | Intermediate |
| svelte-expert | 11 | 9mo | No flags | Intermediate |
| home-assistant-integration-knowledge | 8 | 2mo | No flags | Advanced |
| writing-skills | 4 | 4mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by alohays
View all by alohays →You might also like
svelte-expert
Raudbjorn
Expert Svelte/SvelteKit development assistant for building components, utilities, and applications. Use when creating Svelte components, SvelteKit applications, implementing reactive patterns, handling state management, working with stores, transitions, animations, or any Svelte/SvelteKit development task. Includes comprehensive documentation access, code validation with svelte-autofixer, and playground link generation.
home-assistant-integration-knowledge
home-assistant
Everything you need to know to build, test and review Home Assistant Integrations. If you're looking at an integration, you must use this as your primary reference.
writing-skills
obra
Use when creating new skills, editing existing skills, or verifying skills work before deployment
obsidian-hello-world
jeremylongshore
Create a minimal working Obsidian plugin with commands and settings. Use when building your first plugin feature, testing your setup, or learning basic Obsidian plugin patterns. Trigger with phrases like "obsidian hello world", "first obsidian plugin", "obsidian quick start", "simple obsidian plugin".
code-review-checklist
vudovn
Code review guidelines covering code quality, security, and best practices.
openspec-verify-change
studyzy
验证实现是否与变更产出物匹配。当用户想要在归档前验证实现是否完整、正确且一致时使用。