extract-tikz

extract-tikz is a skill for Claude Code from pedrohcgs/claude-code-my-workflow. It costs 83 tokens per session (1,289 once invoked), scanned A, original, MIT.

A tool for taking TikZ diagrams from Beamer presentation source files and turning them into separate SVG image files. Beamer is a LaTeX system for creating slide decks, and TikZ is a LaTeX language for drawing diagrams.

In plain words
What is it for?
Use it to extract diagrams, regenerate them, rebuild their SVG files, or update a Quarto mirror after changing TikZ blocks in a Beamer deck.
Why use it?
It keeps diagrams in a Quarto slide version synchronized with the Beamer source and rebuilds the images after edits. It also checks diagrams for specified prevention-rule violations before compiling.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is **Creating a brand-new diagram instead of extracting?** Use [`/new-diagram`](../new-diagram/SKILL.md) — it scaffolds from `templates/tikz-snippets/` with the pr.

Good fit Use it to extract diagrams, regenerate them, rebuild their SVG files, or update a Quarto mirror after changing TikZ blocks in a Beamer deck.

Compare 6 skills from other repositories ↓
About the project

claude-code-my-workflow is a forkable setup for using Claude Code to produce and review academic papers, slides, data analyses, and replication packages. Researchers use its agents, skills, rules, hooks, and quality checks to coordinate these tasks and verify their results. The catalogue entries define the reusable workflow components for Claude Code.

pedrohcgs/claude-code-my-workflow · 1,567 stars · on GitHub · psantanna.com

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/pedrohcgs/claude-code-my-workflow
agentmods
npx agentmods add skills/pedrohcgs/claude-code-my-workflow/extract-tikz

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for extract-tikz

README.md
[![agentmods](https://agentmods.dev/badge/skills/pedrohcgs/claude-code-my-workflow/extract-tikz/github.svg)](https://agentmods.dev/skills/pedrohcgs/claude-code-my-workflow/extract-tikz)
Your own site
<a href="https://agentmods.dev/skills/pedrohcgs/claude-code-my-workflow/extract-tikz"><img src="https://agentmods.dev/badge/skills/pedrohcgs/claude-code-my-workflow/extract-tikz/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for extract-tikz

Your own site · 80×15
<a href="https://agentmods.dev/skills/pedrohcgs/claude-code-my-workflow/extract-tikz"><img src="https://agentmods.dev/badge/skills/pedrohcgs/claude-code-my-workflow/extract-tikz.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,289 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00083 $0.01289
Opus 5 $0.00042 $0.00645
Sonnet 5 $0.00017 $0.00258
Haiku 4.5 $0.00008 $0.00129

Measured 9d ago against content hash dfe2c0233d55, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

extract-tikz scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/extract-tikz/SKILL.md · 98 lines

How it starts

The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:

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.

Read the full file on GitHub · 98 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 98 lines · 83 tokens per session scan A dfe2c0233d55

Subscribe to this mod's changes

extract-tikz is a skill published in the GitHub repository pedrohcgs/claude-code-my-workflow (1,567 stars, last pushed 15d ago), licensed MIT. It adds 83 tokens to every session and 1,289 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories