AGENT SKILL
figure.make_professional
Polish a TikZ, SVG, Graphviz, or Mermaid figure into a professional one
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-02
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- model
- sonnet
- description
- Polish a TikZ, SVG, Graphviz, or Mermaid figure into a professional one
03 SKILL.md 正文
Goal
- Take an existing figure (
<FILE>.tex/TikZ,<FILE>.svg,<FILE>.dot/Graphviz, or<FILE>.mmd/Mermaid) and polish it into a publication-quality figure by applying the project's figure conventions - Prove the improvement by rendering a before/after image and opening it
Workflow
Identify the Figure Type
.tex(TikZ/LaTeX source): apply.claude/skills/tikz.rules.md.svg(SVG source): apply.claude/skills/svg.rules.md.dot/.gv(Graphviz source): apply.claude/skills/graphviz.rules.md.mmd/.mermaid(Mermaid source): apply the## Mermaid Graphsection of.claude/skills/figure.rules.md- All four types also share the cross-diagram
## Color Palettein.claude/skills/figure.rules.md - If unsure which rules apply, inspect the file extension/content before proceeding: never mix rule sets on one figure
Render the Original (Before)
- Render the figure exactly as given, without any edits, to
before.png- TikZ:
> dev_scripts_helpers/dockerize/dockerized_tikz_to_bitmap.py \ -i <FILE>.tex -o before.png - SVG:
> inkscape <FILE>.svg --export-type=png --export-filename=before.png - Graphviz:
> dot -Tpng <FILE>.dot -o before.png - Mermaid:
> mmdc -i <FILE>.mmd -o before.png
- TikZ:
- Keep this file untouched: it is the baseline for the comparison at the end
Apply the Rules
- Read the relevant rules file in full and edit the source to conform to
every section, in particular:
- Layout & spacing (grid alignment, no cramped or overlapping elements; for Graphviz: rank/cluster alignment)
- Color system (restrained, semantic palette; no raw saturated colors; use
the shared palette in
figure.rules.mdunless the rules file gives a more specific one, e.g. Graphviz's flat/architecture color tables) - Typography (label-size hierarchy, sentence case, consistent font)
- Strokes & geometry (consistent line weights, consistent arrowheads/corners;
for Graphviz: edge style semantics; for Mermaid: the required
%%{init: ...}%%theme directive) - The "What NOT to Do" / anti-pattern list at the end of the rules file (Graphviz/Mermaid have no such list: instead follow every section above)
- Do not change the figure's meaning or content: only its visual execution
Render the Result and Iterate
- Re-render to
after.pngusing the same command as above (swap the output file name:-o after.png/--export-filename=after.png) - Inspect
after.png. If it still violates a rule (cramped spacing, overlapping labels, inconsistent strokes, non-semantic colors, etc.), fix the source and re-render. Repeat until the figure is professional per the rules
Compare Side by Side
- Build one image with the before and after panels next to each other and open
it:
> montage before.png after.png -tile 2x1 -geometry +10+10 -label '%f' comparison.png > open comparison.png
Verification
- [ ] Confirm
comparison.pngopened and showsbefore.pngandafter.pngclearly labeled side by side - [ ] Confirm
after.pnghas no unresolved violation from the rules file applied above - [ ] Confirm the figure's content/meaning is unchanged from the original: only styling improved
04 同仓库更多 Skills
tutorial_in_60_mins.propagate_docker_changes
Sync tutorial and class-project Docker files to match project_template
★ 0
tutorial_in_60_mins.merge_markdown
Merge the content of a markdown file into a Jupyter notebook
★ 0
tutorial_in_60_mins.format
Format a directory to follow the "Learn X in 60 Minutes" tutorial conventions
★ 0
tutorial_in_60_mins.create
Create a tutorial directory for the Learn X in 60 Minutes conventions
★ 0
todo.reorg_in_progress
Reorganize ai_task_queue.md so in-progress tasks, not-started tasks, and mislabeled topic headers sit under the right H1 stage
★ 0
todo.reorg_headers
Reorganize ai_task_queue.md .md so every H2 topic matches ALL TOPICS and every H3 task sits under the right topic, keeping its H1 stage
★ 0