Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add 0xE1337/thesis-figure-skill --skill tikz-figure-codegit clone --depth 1 https://github.com/0xE1337/thesis-figure-skillWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/0xe1337/thesis-figure-skill/tikz-figure-code)<a href="https://agentmods.dev/skills/0xe1337/thesis-figure-skill/tikz-figure-code"><img src="https://agentmods.dev/badge/skills/0xe1337/thesis-figure-skill/tikz-figure-code/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/0xe1337/thesis-figure-skill/tikz-figure-code"><img src="https://agentmods.dev/badge/skills/0xe1337/thesis-figure-skill/tikz-figure-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00152 | $0.02484 |
| Opus 5 | $0.00076 | $0.01242 |
| Sonnet 5 | $0.00030 | $0.00497 |
| Haiku 4.5 | $0.00015 | $0.00248 |
Grade A, and why
tikz-figure-code scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TikZ Figure Code — 写对 + 编辑安全的工程基础
这是确定性地基:怎么写出编译干净、不重叠、改一处不崩的 TikZ 代码。 它不管"画什么图才美"——那是设计/编排层(见 thesis-figure-skill)的事。 本技能管的是:无论画什么,代码本身得写对、扛得住编辑。
一句话定位:thesis-figure-skill 决定画什么,本技能保证怎么写不出错。
为什么需要它(问题的根)
模型写 TikZ 的默认习惯是**"坐标凭感觉"——\node at (5.2, 3.1)、\fill rectangle (x0,y0)(x1,y1),
一格一格手摆。这是业余写法**,导致两类必然的痛:
- 盲写:你写到第 800 行时不知道渲染出来什么样,碰撞/溢出/箭头不贴框只能编译后看图才发现 → 被迫进昂贵的"渲染→审查→修"循环。
- 编辑即崩:同一个间距/中心被手抄在多处(zone 边界、内容中心、箭头坐标、底栏…)。改一个 stage 宽度要同步 5 处,漏一处就崩——而静态 checker 抓不到(实测:一个加宽 hero 的编辑把 zone 压重叠、边框切穿内容,validator + overlap-checker 全报 0 硬 bug,只有看图才发现)。
解法不是加更多检测,是换写法。 专家写 TikZ 是写一张约束图(相对定位 + fit + matrix), 让布局引擎算位置——碰撞按构造不可能发生,图correct by construction,不是 correct-after-review。
证据:references/examples/ 里同一张 5-stage pipeline,绝对坐标版 (BAD) 和按构造版 (GOOD)
渲染视觉等价;但施加同一个最自然的编辑(加宽 hero / 加长 label),BAD 崩、GOOD 自动重排。
见 proof-edit-safety-hero-widen.png。
核心原则:LAYOUT BY CONSTRUCTION,不是 BY COORDINATE
作用域:按构造纪律施加在宏观骨架层(模块/zone 彼此怎么放、怎么连)。
嵌入 viz 内部(热力图一格格、柱状图)可以继续局部手画——它自包含、坐标错了不级联——
但要用 \begin{scope}[shift={(parent.center)}] 挂到父节点 anchor,让它随父节点移动。
5 条 idiom(必须照做——散文指南传不了布局技能,照抄这些代码)
① 布局节奏只放一处
同一个间距/行高/列宽只定义一次,到处引用。永不把同一个数字抄在多处。
\newlength{\stagew}\setlength{\stagew}{4.5cm} % 改一处,全图跟着变
\def\gap{0.5cm}
\tikzset{node distance=\gap}
② 模块用相对定位摆,不用绝对 at (x,y)
第一个锚定,其余 right=of / below=of 前一个。间距活在 node distance 一处。
\node[zone] (s1) at (0,0) {};
\node[zone, right=of s1] (s2) {}; % ✅ 间距由 node distance 决定
\node[zone, right=of s2] (s3) {}; % 加宽 s2 → s3 自动右移
% ❌ \node[zone] (s2) at (5,0) {}; % 手填 5 = 改 s1 宽度就得改这里
网格/表格用 \matrix of nodes,流水线用 chains——别手动给 x 加 2cm。
③ 连线走节点 anchor,永不重抄边界坐标 ← 单点最大收益
\draw[arrow] (s1.east) -- (s2.west); % ✅ 任何重排下都不会错位
% ❌ \draw[arrow] (4.5,5) -- (5.0,5); % 把 zone 边界又抄了一遍 = 改布局就断
箭头引用节点,就永远不可能 misalign。这一条单独就能消灭评审环里一大半 bug。
④ 容器用 fit,标签用 text width(换行)不用 minimum width(撑大)
\node[fit=(a)(b)(c), draw, rounded corners] {}; % zone 自动包住内容
\node[box, text width=3.2cm, align=center] {长标签会换行不会溢出};
% ❌ minimum width=3.2cm → 长标签把框横向撑大、顶破 zone
text width 让超长内容换行(保持框宽),minimum width 让框长出去(溢出邻居)。
前者把"碰撞 bug"(硬,必修)降级成"挤一点"(软,审美)。
What ships with it
7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/by-construction.md 4.5 KB
- references/examples/pipeline-absolute-coords-BAD.tex 10 KB
- references/examples/pipeline-by-construction-GOOD.tex 10 KB
- references/examples/proof-edit-safety-hero-widen.png 222 KB
- references/examples/README.md 1.7 KB
- references/hard-constraints.md 3.8 KB
- references/lint.sh 4.3 KB runs code
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago First seen · 130 lines · 152 tokens per session scan A 29b113c473e7
tikz-figure-code is a skill published in the GitHub repository 0xE1337/thesis-figure-skill (130 stars, last pushed 1mo ago), licensed MIT. It adds 152 tokens to every session and 2,484 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
pre-submission-report
Run the final, comprehensive submission-readiness gate and consolidate all checks into one dated report; citation-integrity-only mode is also supported. Use when a paper and submission package are nearly final. Not for a mid-draft adversarial review; use $review-cluster.
proof-readability
Improve the exposition and readability of a mathematical proof already verified as correct without changing its mathematics. Use when polishing a lemma, theorem, proof, or appendix after correctness checks. Not for verifying the proof; use $verify-math.
computational-experiments
Scaffold, execute, analyse, and publish computational research experiments through a reproducible staged workflow. Use when a research question requires simulations or computational sweeps rather than a one-off script.
latex
Compile one specified LaTeX document, resolve build errors, audit citations, and report build quality. Use when a .tex source must be built or a concrete compilation failure repaired. Not for corpus-wide build checks, visual polish after a clean build, or creating a project; use $latex-health-check, $latex-polish, or…
beamer-deck
Create an academic presentation as a LaTeX Beamer source and reviewed PDF with an original theme. Use when the requested deliverable is a conference, seminar, or lecture deck in Beamer. Not for PowerPoint or RevealJS; use $pptx or $quarto-deck.
bib-parse
Extract citations from a PDF and generate a validated .bib file. Use when the user asks to extract citations from a PDF and generate a validated .bib file. Reads the PDF, identifies referenced works, constructs BibTeX entries, and verifies metadata.