Agent skill

Extract Tikz

by pedrohcgs in pedrohcgs/claude-code-my-workflow

Extract TikZ diagrams from Beamer .tex source, compile each to a standalone PDF, and convert to SVG with 0-based indexing.

MITAuto-check: notesDocuments & Office

Install Extract Tikz

skills CLI
$ npx skills add pedrohcgs/claude-code-my-workflow --skill extract-tikz -a claude-code

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

GitHub CLI
$ gh skill install pedrohcgs/claude-code-my-workflow extract-tikz --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/pedrohcgs/claude-code-my-workflow.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/extract-tikz .claude/skills/extract-tikz && 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
extract-tikz
GitHub stars
1.7k
Token cost
~1.2k tokens
SKILL.md length
494 words
Files
1
Skills in repo
59
Repo updated
First seen
Licence
MIT

At a glance

Extract TikZ diagrams from Beamer .tex source, compile each to a standalone PDF, and convert to SVG with 0-based indexing.

  • Works in 10 steps: Freshness Check (MANDATORY) → Prevention pre-check (MANDATORY — halt… → Navigate to the lecture's Figures… → …
  • User says extract the tikz
  • SKILL.md covers Steps and Source of Truth Reminder
  • Calls python3

What it does

Extract Tikz is an agent skill from pedrohcgs/claude-code-my-workflow. Extract TikZ diagrams from Beamer .tex source, compile each to a standalone PDF, and convert to SVG with 0-based indexing. Use when user says "extract the tikz", "regenerate the diagrams", "rebuild the SVGs", "sync tikz to quarto", or after editing TikZ blocks in a Beamer deck that also has a Quarto mirror.

Its SKILL.md is about 1.2k 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 Diagrams. The repository describes itself as: A ready-to-fork Claude Code template for academics using LaTeX/Beamer + R. Multi-agent review, quality gates, adversarial QA, and replication protocols. The licence is MIT.

When your agent uses it

  • User says extract the tikz
  • Regenerate the diagrams
  • Rebuild the SVGs
  • Sync tikz to quarto

Example prompts

  • “extract the tikz”
  • “regenerate the diagrams”
  • “rebuild the SVGs”
  • “/extract-tikz”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): Read, Bash, Glob, Agent, Task

Workflow steps

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

  1. Freshness Check (MANDATORY)
  2. Prevention pre-check (MANDATORY — halt on violation)
  3. Navigate to the lecture's Figures directory
  4. Compile the extract_tikz.tex file
  5. Count the number of pages
  6. Convert each page to SVG using 0-BASED INDEXING
  7. Sync to docs/ for deployment
  8. Verify SVG files
  9. Visual Quality Review (tikz-reviewer)
  10. Report results

What it can do on your machine

Read from SKILL.md and the folder at commit ae72617. 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:

    • Read
    • Bash
    • Glob
    • Agent
    • Task

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python3

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

  • Network

    No URLs in SKILL.md.

    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

Extract Tikz loads about 1.2k tokens when it runs. Until then it costs about 81 tokens; SKILL.md has 494 words of instructions outside code blocks.

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

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Bash, Glob, Agent, Task

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 pedrohcgs/claude-code-my-workflow at commit ae72617, republished under its MIT licence (© pedrohcgs). 494 words, ~1,169 tokens.

Download SKILL.mdSave it as .claude/skills/extract-tikz/SKILL.md (or your agent's skills folder).
name
extract-tikz
description
Extract TikZ diagrams from Beamer `.tex` source, compile each to a standalone PDF, and convert to SVG with 0-based indexing. Use when user says "extract the tikz", "regenerate the diagrams", "rebuild the SVGs", "sync tikz to quarto", or after editing TikZ blocks in a Beamer deck that also has a Quarto mirror.
allowed-tools
Read, Bash, Glob, Agent, Task
argument-hint
[LectureN, e.g., Lecture2]

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.

Creating a brand-new diagram instead of extracting? Use /new-diagram — it scaffolds from templates/tikz-snippets/ with the prevention rules pre-applied.

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: Prevention pre-check (MANDATORY — halt on violation)

Before compiling, verify every \begin{tikzpicture} block in Figures/$ARGUMENTS/extract_tikz.tex satisfies the prevention rules in .claude/rules/tikz-prevention.md. The pre-check is a small Python script shared with /new-diagram so both skills enforce identical behavior:

bash
python3 scripts/check-tikz-prevention.py "Figures/$ARGUMENTS/extract_tikz.tex"

What it checks:

  • P3 — scale=X without node scaling. Bare scale= shrinks coordinates but not text. Allowed forms: scale=X, every node/.style={scale=X} or scale=X, transform shape. The checker parses the full \begin{tikzpicture}[...] options block even when it spans multiple lines.
  • P4 — Directional keyword on edge labels. Every edge label (node inside a \draw) must carry above, below, left, right, or a compound (e.g. above left). midway alone is a path position, not a direction. The checker scans the full \draw ...; statement so \draw on one line and node[...]{...} on the next line are still linked.

Note what the pre-check does NOT enforce: P1 (boxed-node explicit dimensions) and P2 (coordinate-map comment) are structural and get flagged by tikz-reviewer in Step 8, not here.

Exit codes: 0 = all files pass, 1 = one or more P3/P4 violations (stderr lists file, line, snippet, rule), 2 = usage error.

If exit is non-zero: halt, report the offending lines, and ask the user to fix the Beamer source (single source of truth). Do NOT compile.

Show full SKILL.md (191 more words)Show less
Step 2: Navigate to the lecture's Figures directory
bash
cd Figures/$ARGUMENTS
Step 3: Compile the extract_tikz.tex file
bash
TEXINPUTS=../../Preambles:$TEXINPUTS xelatex -interaction=nonstopmode extract_tikz.tex
Step 4: Count the number of pages
bash
pdfinfo extract_tikz.pdf | grep "Pages:"
Step 5: 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 6: Sync to docs/ for deployment
bash
cd ../..
./scripts/sync_to_docs.sh $ARGUMENTS
Step 7: Verify SVG files
  • Read 2-3 SVG files to confirm they contain valid SVG markup
  • Confirm file sizes are reasonable (not 0 bytes)
Step 8: Visual Quality Review (tikz-reviewer)

Spawn the tikz-reviewer agent (via the Agent tool with subagent_type=tikz-reviewer) on the TikZ source blocks to catch label overlaps, geometric errors, and visual inconsistencies. The reviewer cites specific passes and formulas from .claude/rules/tikz-measurement.md. If it returns NEEDS REVISION or REJECTED, loop:

  1. Apply the recommended fixes to the Beamer .tex source (single source of truth).
  2. Re-copy the updated block to extract_tikz.tex.
  3. Re-run the prevention pre-check (Step 1) and compile.
  4. Regenerate SVGs, re-sync.
  5. Re-invoke tikz-reviewer.

Stop when tikz-reviewer returns APPROVED (max 5 rounds).

Step 9: 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.

© pedrohcgs, 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 .claude/skills/extract-tikz of pedrohcgs/claude-code-my-workflow.

Open the folder on GitHubat commit ae72617

Compare with similar skills

Extract Tikz 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.

Extract Tikz compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Extract Tikz this skillpedrohcgs/claude-code-my-workflow1.7k—~1.2kAutomated safety check: NotesMIT
Thesis Figure Skill0xE1337/thesis-figure-skill144—~9.1kAutomated safety check: PassMIT
Paper Interpreterchujianyun/skills742—~810Automated safety check: PassCustom licence
CI Mockup Figureyzhao062/anywhere-agents253—~7.5kAutomated safety check: PassApache-2.0
Figure DrawingnanoAgentTeam/research-claw293—~1kAutomated safety check: PassMIT
Extract Tikzbrycewang-stanford/Auto-Empirical-Research-Skills4.6k—~498Automated safety check: NotesCustom licence

Similar skills

  • Thesis Figure Skill

    0xE1337/thesis-figure-skill

    生成学术论文配图:LaTeX/TikZ 代码(结构化图表,直接嵌入论文)或 draw.io XML (技术路线图、汇报配图)。自动按论文领域风格设计,编译验证后交付。

    144 GitHub stars~9.1k tokensUpdated 2 mo ago
    Documents & OfficeAuto-check passed
  • Paper Interpreter

    chujianyun/skills

    论文解读助手。适用于用户发送 arXiv 论文链接,并希望下载论文、解读论文、生成读书笔记、做论文拆解或输出详细报告时使用。会在工作目录创建论文文件夹、下载 PDF 与 TeX Source(如有)、生成中文 Markdown 报告。默认先交付初稿,不自动复查;如果用户明确同意,再安排后续复查。不适用于只要简短推荐语的情况。

    742 GitHub stars~810 tokensUpdated yesterday
    Documents & OfficeAuto-check passed
  • CI Mockup Figure

    yzhao062/anywhere-agents

    Create paper and proposal figures guided by confirmed visual preferences and efficient use of page space.

    253 GitHub stars~7.5k tokensUpdated 2 days ago
    Documents & OfficeAuto-check passed
  • Figure Drawing

    nanoAgentTeam/research-claw

    MANDATORY skill for creating any figure, diagram, chart, table visualization, or TikZ graphic in a paper.

    293 GitHub stars~1k tokensUpdated 4 mo ago
    Documents & OfficeAuto-check passed
  • Extract Tikz

    brycewang-stanford/Auto-Empirical-Research-Skills

    Extract TikZ diagrams from Beamer source, compile to PDF, convert to SVG with 0-based indexing.

    4.6k GitHub stars~498 tokensUpdated 5 days ago
    Documents & OfficeAuto-check: notes
  • Tikz Diagrams Guide

    wentorai/research-plugins

    Create publication-quality scientific diagrams with TikZ in LaTeX

    298 GitHub starsUsed in 1 repo~1.4k tokens
    Documents & OfficeAuto-check passed

More from pedrohcgs/claude-code-my-workflow

All 59 skills in this repo
  • Devils Advocate

    pedrohcgs/claude-code-my-workflow

    Adversarial 5-7 question challenge to a deck's pedagogical choices — ordering, prerequisites, cognitive load, motivation.

    1.7k GitHub starsUsed in 2 repos~641 tokens
    Auto-check passed
  • Vaccinate

    pedrohcgs/claude-code-my-workflow

    Qualify a check before it is allowed to clear anything — prove it can detect the failure it is meant to catch.

    1.7k GitHub stars~2.1k tokensUpdated 12 days ago
    Auto-check: notes
  • Compile Latex

    pedrohcgs/claude-code-my-workflow

    Compile a Beamer LaTeX slide deck with XeLaTeX (3 passes + bibtex).

    1.7k GitHub starsUsed in 1 repo~492 tokens
    Auto-check: notes
  • Context Status

    pedrohcgs/claude-code-my-workflow

    Show current context status and session health. An agent skill from pedrohcgs/claude-code-my-workflow.

    1.7k GitHub starsUsed in 1 repo~613 tokens
    Auto-check: notes
  • Capture Environment

    pedrohcgs/claude-code-my-workflow

    Snapshot the computational environment for a replication package — detects the analysis stack (R / Stata / Python) and emits the right lockfiles (renv.lock + sessionInfo.txt, requirements.txt /…

    1.7k GitHub stars~2.8k tokensUpdated 12 days ago
    Auto-check: notes
  • Checkpoint

    pedrohcgs/claude-code-my-workflow

    Save a structured state snapshot before stopping or handing off.

    1.7k GitHub stars~2.8k tokensUpdated 12 days ago
    Auto-check: notes

Questions about Extract Tikz

What does Extract Tikz do?

Extract TikZ diagrams from Beamer .tex source, compile each to a standalone PDF, and convert to SVG with 0-based indexing. Extract Tikz is an agent skill from pedrohcgs/claude-code-my-workflow.tex source, compile each to a standalone PDF, and convert to SVG with 0-based indexing.

When should I use Extract Tikz?

Extract Tikz fits situations like: user says extract the tikz; regenerate the diagrams; rebuild the SVGs; sync tikz to quarto.

How do I install Extract Tikz in Claude Code?

Run `npx skills add pedrohcgs/claude-code-my-workflow --skill extract-tikz -a claude-code`. Or copy the skill folder (.claude/skills/extract-tikz in pedrohcgs/claude-code-my-workflow) into .claude/skills/extract-tikz in your project. Claude Code loads it when a task matches its description.

How do I install Extract Tikz in Codex?

Run `npx skills add pedrohcgs/claude-code-my-workflow --skill extract-tikz -a codex`. Or copy the skill folder (.claude/skills/extract-tikz in pedrohcgs/claude-code-my-workflow) into .agents/skills/extract-tikz in your project. Codex loads it when a task matches its description.

Can I use Extract Tikz 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 pedrohcgs/claude-code-my-workflow --skill extract-tikz -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/extract-tikz, .gemini/skills/extract-tikz, .github/skills/extract-tikz and .opencode/skills/extract-tikz in your project.

What does Extract Tikz need to run?

Going by SKILL.md and its folder, Extract Tikz needs the command-line tools its instructions call (python3). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Bash, Glob, Agent, Task.

Does Extract Tikz access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Extract Tikz safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Extract Tikz use?

Extract Tikz 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 Extract Tikz use?

About 1.2k tokens (SKILL.md is roughly 4.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 Extract Tikz?

Skills that share tags, products or a category with Extract Tikz: Thesis Figure Skill (0xE1337/thesis-figure-skill, 144 stars), Paper Interpreter (chujianyun/skills, 742 stars), CI Mockup Figure (yzhao062/anywhere-agents, 253 stars) and Figure Drawing (nanoAgentTeam/research-claw, 293 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Extract Tikz?

pedrohcgs (a GitHub user) maintains it in pedrohcgs/claude-code-my-workflow, which has 1,655 GitHub stars. The repository holds 59 skills in this directory. The repository was last updated on September 27, 2026.

Source: pedrohcgs/claude-code-my-workflow on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.