Skip to content
Back to skills

Figure.Create Tikz

ASecurity

Generate a TikZ code for an image or a description

  • 158 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added November 7, 2026
designgobashnodedocker

Security analysis

A100/100

Scanned November 7, 2026

npx -y skills add gpsaggese/helpers --skill figure.create_tikz --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Figure.Create Tikz?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Figure.Create Tikz
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gpsaggese-figure-create-tikz/badge)](https://www.skillsdirectory.com/skills/gpsaggese-figure-create-tikz)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
description: Generate a TikZ code for an image or a description
model: sonnet
---

# Goal
- Convert images or text descriptions into publication-quality TikZ LaTeX code
- Generate a compilable LaTeX file, render it to PNG, and refine the output until
  it matches the input

## When to Use
- Use this skill to:
  - Create publication-quality diagrams, plots, or visualizations
  - Convert hand-drawn sketches or images into reproducible TikZ code
  - Generate diagrams for LaTeX documents

## When NOT to Use
- Do not use this skill for:
  - Complex photographs needing photorealistic rendering
  - Plots from large datasets (use dedicated plotting libraries)
  - Advanced 3D visualizations

# Workflow

## Receive and Understand the Input

- You receive either:
  1. An image of a diagram
  2. A text description of a concept or situation

## Choose Figure Type

- Pick the diagram structure that fits the input:
  - **FLOWCHART**: sequential steps, decision branches, pipelines
  - **STRUCTURAL**: containment (things inside other things), architecture
  - **ILLUSTRATIVE**: plots, physical cross-sections, or abstract spatial metaphors

## Generate TikZ Code
- Generate valid LaTeX with the TikZ package, as a complete minimal working
  example:
  ```latex
  \documentclass{standalone}
  \usepackage{tikz}
  \begin{document}
  \begin{tikzpicture}
  ...
  \end{tikzpicture}
  \end{document}
  ```

**Preserve layout accurately**

- If converting from an image `<IMAGE>`, reproduce the layout precisely
- Preserve proportions, relative positions, and symmetry
- Use coordinates and scaling where appropriate
- Approximate complex curves with TikZ paths when needed

**Follow the TikZ conventions**

- Follow `.claude/skills/tikz.rules.md`, especially Colors, Typography, Layout,
  Reusable Patterns, and Polish

**Handle ambiguity**

- Make reasonable assumptions about unclear inputs
- Prioritize clarity and visual correctness over perfection

## Save the File
- Save the LaTeX code to `./tikz_figure.tex` in the current directory (not in
  `.claude/`). Output only valid TikZ code, with no markdown formatting or
  explanations
- Add this comment at the top of the file, saying how it was generated:
  ```latex
  % Generated by `.claude/skills/figure.create_tikz/SKILL.md`
  ```

## Render to Image
- Generate a PNG with the rendering script:
  ```bash
  > ./helpers_root/dev_scripts_helpers/dockerize/dockerized_tikz_to_bitmap.py \
      -i tikz_figure.tex \
      -o output.png
  ```

- Open the image to inspect it:
  ```bash
  > open output.png
  ```

## Iterate and Refine
- If the PNG differs from the original in significant ways:
  - Identify layout discrepancies
  - Update `./tikz_figure.tex` to match the input better
  - Re-render and verify

## Compare for User
- Build a side-by-side comparison and open it:
  ```bash
  > montage <ORIGINAL_IMAGE> output.png -tile 2x1 -geometry 500x+10+10 \
      -background white comparison.png
  > open comparison.png
  ```
- Remove `comparison.png` after the user has seen it. It is a temp file, not a
  deliverable

# Verification
- [ ] All lines connect cleanly to box edges with no overlap
- [ ] The diagram closely matches the original (same layout, colors, semantics)
- [ ] The TikZ file says that it was generated by
      `.claude/skills/figure.create_tikz/SKILL.md`

# Examples
- **Bad**: Converting a photograph of a natural scene into TikZ (infeasible; use
  image inclusion instead)
- **Good**: Converting a circuit diagram sketch into TikZ with accurate node
  positioning, labeled connections, and proper symmetry

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in design →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.