extract-tikz
Converts LaTeX TikZ diagrams into SVG files for use in Quarto presentations.
Install
mkdir -p .claude/skills/extract-tikz && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/18239" && unzip -o skill.zip -d .claude/skills/extract-tikz && rm skill.zipInstalls to .claude/skills/extract-tikz
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.
Extract TikZ diagrams from Beamer source, compile to PDF, convert to SVG with 0-based indexing. Use when updating TikZ diagrams for Quarto slides.Key capabilities
- →Extract TikZ diagrams from Beamer source
- →Compile TikZ diagrams to multi-page PDF
- →Convert PDF pages to SVG with 0-based indexing
- →Sync generated SVG files to docs directory
- →Verify SVG file integrity
How it works
The skill extracts TikZ blocks from a Beamer source, compiles them into a PDF, and then converts each page of the PDF to an SVG file using 0-based indexing.
Inputs & outputs
When to use extract-tikz
- →Extract TikZ for slides
- →Convert diagram to SVG
- →Update lecture diagrams
About this skill
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.
- Find the Beamer source:
ls Slides/$ARGUMENTS*.tex - Extract all
\begin{tikzpicture}blocks from Beamer - Compare with
Figures/$ARGUMENTS/extract_tikz.tex - If ANY difference exists: update extract_tikz.tex from the Beamer source
- If extract_tikz.tex doesn't exist: create it from scratch
Step 1: Navigate to the lecture's Figures directory
cd Figures/$ARGUMENTS
Step 2: Compile the extract_tikz.tex file
TEXINPUTS=../../Preambles:$TEXINPUTS xelatex -interaction=nonstopmode extract_tikz.tex
Step 3: Count the number of pages
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!
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
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.
When not to use it
- →When the source is not a Beamer .tex file
- →When the diagrams are not TikZ diagrams
Limitations
- →Requires TikZ diagrams to be edited in the Beamer .tex file first
- →Output SVG files use 0-based indexing, requiring careful handling
- →Limited to converting PDF to SVG
How it compares
This skill automates the extraction, compilation, and conversion of TikZ diagrams from Beamer to SVG with specific indexing and syncing, unlike manual conversion processes.
Compared to similar skills
extract-tikz side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| extract-tikz (this skill) | 0 | 4mo | Review | Intermediate |
| readme-metrics-dashboard | 0 | 3mo | No flags | Beginner |
| operational-hydrologist | 0 | 4mo | No flags | Intermediate |
| memory-transform | 0 | 2mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by alohays
View all by alohays →You might also like
readme-metrics-dashboard
harrybin
Refresh repository metrics, render a full chart dashboard (line, bar, area, pie, scatter, composed), and update README with a reproducible example.
operational-hydrologist
hydrosolutions
Domain expert reviewer representing operational hydrologists in Central Asia, Nepal, Switzerland, and the Caucasus. Use when: (1) making frontend/dashboard changes targeted at hydrologists, (2) writing or updating documentation for end users, (3) reviewing forecast results and skill metrics after mo
memory-transform
fahad0001
Agent memory transformation skill. Converts the indexed agent memory into navigable representations including Obsidian vaults with backlinks, Mermaid dependency and status graphs, Graphviz DOT files, and static dashboards. Use when the user wants to visualize requirements, browse memory in Obsidian,
view
egregore-labs
Fallback Codex adapter for the Egregore view workflow.
infographic-creation
antvis
Create beautiful infographics based on the given text content. Use this when users request creating infographics.
draw-io
davila7
draw.io diagram creation, editing, and review. Use for .drawio XML editing, PNG conversion, layout adjustment, and AWS icon usage.