extract-diagrams

extract-diagrams is a skill for Claude Code from clearsmog/claude-skills. It costs 25 tokens per session (331 once invoked), scanned A, original, MIT.

A workflow that extracts diagrams from Typst or LaTeX source files and converts them into SVG files for use on the web. CeTZ is Typst’s diagram library, while TikZ is a LaTeX diagram system.

In plain words
What is it for?
Use it to extract CeTZ diagrams from .typ files and, when project-specific paths are configured, TikZ diagrams from .tex files, then check the resulting SVG files.
Why use it?
It avoids rebuilding diagrams manually when a project needs standalone, web-ready SVG versions of source diagrams.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to extract CeTZ diagrams from .typ files and, when project-specific paths are configured, TikZ diagrams from .tex files, then check the resulting SVG files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/clearsmog/claude-skills/extract-diagrams
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add clearsmog/claude-skills --skill extract-diagrams
Clone the repo
git clone --depth 1 https://github.com/clearsmog/claude-skills

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-diagrams

README.md
[![agentmods](https://agentmods.dev/badge/skills/clearsmog/claude-skills/extract-diagrams/github.svg)](https://agentmods.dev/skills/clearsmog/claude-skills/extract-diagrams)
Your own site
<a href="https://agentmods.dev/skills/clearsmog/claude-skills/extract-diagrams"><img src="https://agentmods.dev/badge/skills/clearsmog/claude-skills/extract-diagrams/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-diagrams

Your own site · 80×15
<a href="https://agentmods.dev/skills/clearsmog/claude-skills/extract-diagrams"><img src="https://agentmods.dev/badge/skills/clearsmog/claude-skills/extract-diagrams.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 331 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.
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.00025 $0.00331
Opus 5 $0.00013 $0.00166
Sonnet 5 $0.00005 $0.00066
Haiku 4.5 $0.00003 $0.00033

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

Security

Grade A, and why

extract-diagrams 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 11d 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.

extract-diagrams/SKILL.md · 46 lines

What it actually says

Extract Diagrams to SVG

Extract diagrams from source files and convert to SVG for web use.

Format Detection

  • .typ source → CeTZ extraction (Typst native SVG output)
  • .tex source → TikZ extraction (configure at project level with project-specific TEXINPUTS and paths)

CeTZ Extraction (Typst)

Typst can output SVG directly — no intermediate PDF needed.

Step 1: Identify CeTZ diagrams in the .typ file

grep -n '@preview/cetz' $ARGUMENTS

Step 2: For standalone diagram files, compile directly to SVG

typst compile --format svg diagram.typ diagram.svg

Step 3: For diagrams embedded in documents

  • Extract the diagram code to a standalone .typ file
  • Add necessary imports and page setup
  • Compile to SVG: typst compile --format svg standalone_diagram.typ output.svg

Step 4: Verify SVG files

  • Read 2-3 SVG files to confirm valid SVG markup
  • Confirm file sizes are reasonable

Step 5: Report results

Source of Truth

  • CeTZ: Diagrams are edited in the Typst .typ source file
  • TikZ: Configure extraction at project level (see project's extract-diagrams skill)
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. 11d ago First seen · 46 lines · 25 tokens per session scan A a1af0ede5200

Subscribe to this mod's changes

extract-diagrams is a skill published in the GitHub repository clearsmog/claude-skills (2 stars, last pushed 6mo ago), licensed MIT. It adds 25 tokens to every session and 331 once invoked, about $0.0001 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-31.

Related

Other skills, from other repositories

replicate-runner

Use when run AI models on Replicate cloud API. Deploy image generation, video creation, audio processing, and custom models without managing infrastructure. Use when working with replicate runner.

oyi77/1ai-skills · 40 tokens

pptx-posters

Create research posters using HTML/CSS that can be exported to PDF or PPTX. Use this skill ONLY when the user explicitly requests PowerPoint/PPTX poster format. For standard research posters, use latex-posters instead. This skill provides modern web-based poster design with responsive layouts and easy visual…

foryourhealth111-pixel/Vibe-Skills · 66 tokens

aws-wechat-article-assets

A local library for storing business descriptions, product images, and reusable writing or design presets for WeChat articles. It organizes these materials by product so other article tools can reuse them.

aiworkskills/wechat-article-skills · 258 tokens

utility-slideshow-creator

Generates professional presentations from a JSON deck specification using 18 slide types with dark/light variants, content-to-layout decision logic, and calibrated character limits. Ships with a default professional theme.

product-on-purpose/pm-skills · 43 tokens

release-sync

Syncs latest release content to NotebookLM and HQ Knowledge Base after version tagging. Reads CHANGELOG, CLAUDE.md, and hook README, updates notebook sources, and ingests release digest. Optionally generates podcast from updated knowledge base. Use after tagging a new version to propagate release knowledge.

yonatangross/orchestkit · 62 tokens

guizang-ppt-skill

A tool that creates slide-deck images from content by first making an outline and then rendering each slide. It supports multiple visual styles and is designed for decks people can read and share.

op7418/guizang-ppt-skill · 176 tokens