extract-tikz
Extract TikZ diagrams from Beamer source, compile to PDF, convert to SVG with 0-based indexing. Use when updating TikZ diagrams for Quarto slides.
Best use case
extract-tikz is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Extract TikZ diagrams from Beamer source, compile to PDF, convert to SVG with 0-based indexing. Use when updating TikZ diagrams for Quarto slides.
Teams using extract-tikz should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/extract-tikz/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How extract-tikz Compares
| Feature / Agent | extract-tikz | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Extract TikZ diagrams from Beamer source, compile to PDF, convert to SVG with 0-based indexing. Use when updating TikZ diagrams for Quarto slides.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
SKILL.md Source
# Extract TikZ Diagrams to SVG
Extract TikZ diagrams from the Beamer source, compile to multi-page PDF, and convert each page to SVG for use in Quarto slides.
## Steps
### Step 0: Freshness Check (MANDATORY)
**Before compiling, verify that `extract_tikz.tex` matches the current Beamer source.**
1. Find the Beamer source: `ls Slides/$ARGUMENTS*.tex`
2. Extract all `\begin{tikzpicture}` blocks from Beamer
3. Compare with `Figures/$ARGUMENTS/extract_tikz.tex`
4. If ANY difference exists: update extract_tikz.tex from the Beamer source
5. If extract_tikz.tex doesn't exist: create it from scratch
### Step 1: Navigate to the lecture's Figures directory
```bash
cd Figures/$ARGUMENTS
```
### Step 2: Compile the extract_tikz.tex file
```bash
TEXINPUTS=../../Preambles:$TEXINPUTS xelatex -interaction=nonstopmode extract_tikz.tex
```
### Step 3: Count the number of pages
```bash
pdfinfo extract_tikz.pdf | grep "Pages:"
```
### Step 4: Convert each page to SVG using 0-BASED INDEXING
**CRITICAL: PDF pages are 1-indexed, but output SVG files are 0-indexed!**
```bash
PAGES=$(pdfinfo extract_tikz.pdf | grep "Pages:" | awk '{print $2}')
for i in $(seq 1 $PAGES); do
idx=$(printf "%02d" $((i-1)))
pdf2svg extract_tikz.pdf tikz_exact_$idx.svg $i
done
```
### Step 5: Sync to docs/ for deployment
```bash
cd ../..
./scripts/sync_to_docs.sh $ARGUMENTS
```
### Step 6: Verify SVG files
- Read 2-3 SVG files to confirm they contain valid SVG markup
- Confirm file sizes are reasonable (not 0 bytes)
### Step 7: Report results
## Source of Truth Reminder
TikZ diagrams MUST be edited in the Beamer `.tex` file first, then copied verbatim to `extract_tikz.tex`. See `.claude/rules/single-source-of-truth.md`.Related Skills
visual-audit
Perform adversarial visual audit of Quarto or Beamer slides checking for overflow, font consistency, box fatigue, and layout issues.
validate-bib
Validate bibliography entries against citations in all lecture files. Find missing entries and unused references.
translate-to-quarto
Translate Beamer LaTeX to Quarto RevealJS. Multi-phase workflow with TikZ extraction and QA.
slide-excellence
Multi-agent slide review (visual, pedagogy, proofreading). Use for comprehensive quality check before milestones.
review-r
Run the R code review protocol on R scripts. Checks code quality, reproducibility, domain correctness, and professional standards. Produces a report without editing files.
review-paper
Comprehensive manuscript review covering argument structure, econometric specification, citation completeness, and potential referee objections
research-ideation
Generate structured research questions, testable hypotheses, and empirical strategies from a topic or dataset
qa-quarto
Adversarial Quarto vs Beamer QA. Critic finds issues, fixer applies fixes, loops until APPROVED (max 5 rounds).
proofread
Run the proofreading protocol on lecture files. Checks grammar, typos, overflow, consistency, and academic writing quality. Produces a report without editing files.
pedagogy-review
Run holistic pedagogical review on lecture slides. Checks narrative arc, student prerequisites, worked examples, notation clarity, and deck pacing.
lit-review
Structured literature search and synthesis with citation extraction and gap identification
learn
Extract reusable knowledge from the current session into a persistent skill. Use when you discover something non-obvious, create a workaround, or develop a multi-step workflow that future sessions would benefit from.