agentsclimarketplace

Tikz figure

Skill yusekiya/tikz-figure/skills/tikz-figure

Create publication-quality figures and diagrams as PDF using TikZ/LaTeX, keeping the editable .tex source so the figure can be fine-tuned later. Use this skill whenever the user wants to draw, illustrate, sketch, or generate a figure — a diagram, schematic, geometric construction, vector diagram, flow/graph, or technical illustration — from a text description and/or a reference (e.g. a hand-drawn) image. Trigger for any request to reproduce a sketch as a clean vector PDF, or to produce figures for papers, lecture notes, slides, or exercises across any field (physics, math, CS, engineering, chemistry, biology, economics, …), even if the user never says the word "TikZ" but clearly wants a clean vector diagram in PDF/LaTeX form.From its SKILL.md

Install
npx -y skills add yusekiya/tikz-figure --skill tikz-figure

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

4.6 KB, 989 tokens by cl100k_base, as published. Nobody here has run it

tikz-figure

Turn a description and/or a reference image into a clean vector PDF figure drawn with TikZ, while leaving a well-organized .tex source behind so the user can fine-tune it afterwards.

This skill is domain-agnostic — the same workflow draws a free-body diagram, a commutative diagram, a state machine, a circuit sketch, a supply/demand graph, or a protein schematic. Do not assume any particular field.

Fixed conventions (always apply)

These are deliberate, non-negotiable defaults — they keep every figure this user produces consistent and easy to reuse:

  • Document class: \documentclass[11pt,border=6pt]{standalone}. Font size is fixed at 11pt so labels match the surrounding 11pt documents the user writes. Never change the font size unless the user explicitly asks.
  • Vectors are bold: write vector quantities with \bm{...} (load bm), e.g. $\bm{A}$, $\bm{\omega}$, $\Delta\bm{A}$. Do not use \vec or \overrightarrow for the primary vector notation — bold is the house style.
  • Keep the source: the deliverable is both <name>.pdf and <name>.tex. Never delete the .tex. Only clean up LaTeX auxiliary files.
  • Parameterize for later tweaks: put key coordinates, lengths, angles, and radii in \def/\pgfmathsetmacro macros at the top of the tikzpicture, with a short comment each. Adjusting the figure should be editing a number, not hunting through path commands. This is what makes the figure "fine-tunable".

Workflow

1. Understand the target

If a reference image is attached, study it carefully and list its elements (axes, shapes, arrows, labels, angles, relative positions, perspective). The goal is a faithful but clean redraw — not a pixel copy of hand-drawn wobble.

If only a text description is given, restate the geometry to yourself: what points/objects exist, how they relate, what is labeled. Ask the user only if something essential is genuinely ambiguous; otherwise pick sensible defaults and proceed (they can fine-tune via the parameters).

2. Write the .tex

Copy assets/template.tex to <working-dir>/<name>.tex and build the figure inside it. Keep the parameter block at the top. See references/tikz-tips.md for reusable patterns (bold vectors, arrows, angle marks, perspective ellipses, leader lines, colors, the pgfmath polar gotcha).

3. Compile and look at the result

Run the bundled helper, which compiles to PDF and renders a PNG preview:

bash <skill-dir>/scripts/build.sh <working-dir>/<name>.tex

Then Read the generated <name>_preview.png and compare it against the reference / description. Visual verification is essential — TikZ coordinates are easy to get subtly wrong, and a quick look catches overlaps, off-plane arcs, clipped labels, and wrong proportions that the code alone won't reveal.

4. Iterate

Fix issues by editing the parameter values and paths, then rebuild and look again. Repeat until the figure matches. Most adjustments should be one-line parameter edits thanks to step 2.

5. Clean up, keep source + PDF

When the user is satisfied, remove auxiliary and preview files but keep <name>.tex and <name>.pdf:

latexmk -c <working-dir>/<name>.tex   # removes .aux/.log/.fls/etc., keeps .pdf
rm -f <working-dir>/<name>_preview*.png

Report both file paths to the user as clickable links, and mention that the geometry parameters at the top of the .tex make later tweaks easy.

Notes

  • Compilation uses latexmk -pdf (pdfLaTeX). If a figure needs lualatex/ xelatex (e.g. custom fonts, CJK labels), pass it through or adjust the helper; pdfLaTeX is the default because it is fastest for line art.
  • If pdftoppm is unavailable, the helper falls back to magick/sips for the preview; if none exist it still produces the PDF and you can Read that.

What ships with it: 3 files

8.3 KB alongside SKILL.md, 1 of them executable

assets/

references/

scripts/

Keep looking

Skills are one crate of 326,144. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.