Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

Figure.Create Tikz

БесплатноБез исполняемых скриптовНе проверен

Generate a TikZ code for an image or a description

gpsaggeseот gpsaggese★ 158 звёзд на GitHub

Об этом скилле

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:
    \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 <OUTPUT_FILE>, which is figure.create_tikz.<INPUT_REF>.tex in the current directory (not in .claude/)
    • <INPUT_REF> comes from <IMAGE>|<DESCRIPTION>, as in .claude/skills/skill.rules.md ### Name the Output File
  • 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:
    % Generated by `.claude/skills/figure.create_tikz/SKILL.md`
    

Render to Image

  • Generate a PNG with the rendering script:

    > ./helpers_root/dev_scripts_helpers/dockerize/dockerized_tikz_to_bitmap.py \
        -i <OUTPUT_FILE> \
        -o output.png
    
  • Open the image to inspect it:

    > open output.png
    

Iterate and Refine

  • If the PNG differs from the original in significant ways:
    • Identify layout discrepancies
    • Update <OUTPUT_FILE> to match the input better
    • Re-render and verify

Compare for User

  • Build a side-by-side comparison and open it:
    > 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

  • The output file is figure.create_tikz.<INPUT_REF>.tex in the current dir
  • 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
Полный SKILL.md на GitHub

Установить Figure.Create Tikz в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл Figure.Create Tikz?

Generate a TikZ code for an image or a description

Как установить скилл Figure.Create Tikz?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Figure.Create Tikz запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Figure.Create Tikz с