Edit figures with AI

OpenTikZ ships one skill, using-opentikz: it takes an AI agent from a plain-language request to a finished, compiling figure — and confirms the ambiguous details with you instead of guessing.

Skills in action

One prompt, one precise edit — across different kinds of change.

How to use it

Point any agent that can read this repo (Claude Code, or an assistant with the files) at the skill, then just describe the change you want.

  1. Ask in plain language. “Add a cross-attention layer to the encoder-decoder and make it blue”, “recolor the database orange”, “give the net one more hidden layer”. No TikZ required.
  2. The agent finds the figure. It matches your request against catalog.json and confirms which icon, template, or example to start from.
  3. It edits, then verifies. It applies the change, keeps the figure parametric and palette-correct, and compiles the standalone .tex before handing it back — never an uncompiled guess.
  4. You stay in control. On anything material it asks first; on safe defaults (palette, width) it proceeds and tells you what it assumed in one line.

Why it edits each figure accurately

The skill doesn’t hand-parse TikZ and hope. Every template ships a structured edit_contract in its meta.json that tells the agent exactly how that figure is built — so edits land on the right parts.

The shared conventions it draws on

Beyond each template’s contract, the skill applies the library’s common conventions — so colour, annotations, and layout stay consistent across every figure it touches, not just the one you asked about. These are the references it works from: