figure-layout-geometry

figure-layout-geometry is a skill for Claude Code from GGbond-bo/MemOmics-Agent. It costs 235 tokens per session (3,413 once invoked), scanned A, original, MIT.

A geometry-checking workflow for programmatically drawn figures, including Sankey diagrams, node-link diagrams, and custom illustrations. It checks positions, sizes, overlaps, clipping, and alignment using measurements rather than visual guesses.

In plain words
What is it for?
It helps diagnose and verify label alignment, overlapping elements, clipped text, spacing, and other layout problems in generated figures.
Why use it?
It helps find why labels cover shapes, nodes overlap, legends collide with footnotes, or content is cut off. This targets layout calculations instead of repeatedly changing font sizes or coordinates by trial and error.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter.

Good fit It helps diagnose and verify label alignment, overlapping elements, clipped text, spacing, and other layout problems in generated figures.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ggbond-bo/memomics-agent/figure-layout-geometry
Install

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.

Any agent
npx skills add GGbond-bo/MemOmics-Agent --skill figure-layout-geometry
Clone the repo
git clone --depth 1 https://github.com/GGbond-bo/MemOmics-Agent

Made for: Claude Code.

Wrote 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.

agentmods badge for figure-layout-geometry

README.md
[![agentmods](https://agentmods.dev/badge/skills/ggbond-bo/memomics-agent/figure-layout-geometry/github.svg)](https://agentmods.dev/skills/ggbond-bo/memomics-agent/figure-layout-geometry)
Your own site
<a href="https://agentmods.dev/skills/ggbond-bo/memomics-agent/figure-layout-geometry"><img src="https://agentmods.dev/badge/skills/ggbond-bo/memomics-agent/figure-layout-geometry/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.

agentmods 80×15 button for figure-layout-geometry

Your own site · 80×15
<a href="https://agentmods.dev/skills/ggbond-bo/memomics-agent/figure-layout-geometry"><img src="https://agentmods.dev/badge/skills/ggbond-bo/memomics-agent/figure-layout-geometry.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 235 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,413 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00235 $0.03413
Opus 5.5 $0.00094 $0.01365
Sonnet 5.5 $0.00047 $0.00683
Haiku 4.5 $0.00023 $0.00341

Measured 1mo ago against content hash 63e668e456ab, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

figure-layout-geometry 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 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/text_bbox_overlap_check.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

memomics_home/skills/bioinformatics/figure-layout-geometry/SKILL.md · 155 lines

How it starts

The opening of the file, as written. The whole thing — 155 lines — stays where its author put it; the contents beside it link to each section on GitHub.

版式几何与对齐自检

版的"难看"几乎从不是配色问题,而是几何问题。 本 skill 处理用户指着图说"这里没对齐/被压住/被截断"的一类投诉, 用"先算几何量 → 再改代码 → 用自检数字复验"的固定流程,而不是靠肉眼反复试。

何时用

  • 用户指着某张程序化画的图(桑基/冲积、node-link 图、手绘示意图、自定义面板)说: "标签没跟自己对应的色块对齐" / "标签把 XX 压下来了" / "最上面被截断了" / "看着歪了"
  • 你刚改完这张图,要证明真的改对了(而不只是"又出了一版")
  • 反例(不要用本 skill):矩阵热图的纸宽反解、R base graphics/pheatmap 版式 → 用 matrix-heatmap-geometry

🔴 第一铁律:症状在标签,根因通常在布局/坐标系

用户描述的是视觉现象,不是代码缺陷。常见错配:

用户说 大概率根因(不是标签的问题)
标签没对齐色块 / 顶端标签"掉"到色块下沿 布局函数算出负高度 → 元素区间重叠 → 后画的盖住前一个,标签画在真实中心
最上面被截断、× 渲染成 ? 文字用轴坐标画在 y>1 + va="bottom" → 超出画布
图例和脚注挤成一行 两套坐标系混用(axes 负 y vs figure 坐标)
顶端标签被列标题压住 ylim 上沿给标题的留白不足(改完必须复验)

流程:先算几何量(usable / 高度 / 区间是否重叠),再动手改。 直接调字号、挪坐标通常治不好,会变成多轮返工。

布局函数的三条硬约束(写这类图的自检清单)

# ✅ 布局函数必须同时满足:
TOTAL_GAP = 0.10
gap    = TOTAL_GAP / (n - 1) if n > 1 else 0    # ① 间隙 = 整列的固定比例
usable = 1.0 - TOTAL_GAP                         # ② usable > 0(写成断言/打印)
h      = usable * w / tot                        # ③ 元素高度 ∝ 权重,且 Σh + Σgap = 1.0
  • ① 间隙必须与「权重数值」解耦。 反例 gap = GAP * tot / (n - 1) 把总权重(如 102)当比例系数 → 间隙总和 2.244 ≫ 1.0 → usable 变负 → 高度为负 → 相邻元素区间重叠。
  • ② 打印/断言 usable。 它是这类 bug 的唯一早期信号,一行 print 省一轮返工。
  • ③ 症状常具"选择性":同一脚本不同图行为不同(权重总和小的那张侥幸 usable 为正 → 完全正常)。 用户只报其中一张时,不要按"个别标签问题"处理 —— 先算两张的 usable。

出图必带的三项几何自检(renderer 实测,替代肉眼)

写在 savefig 之前,数字直接贴给用户当证据:

fig.canvas.draw(); rend = fig.canvas.get_renderer()
def _tcy(t):                                     # 文本框中心的像素 y
    b = t.get_window_extent(rend); return (b.y0 + b.y1) / 2

# ① 标签中心 vs 自己元素中心(<2px 才算对齐)
# ② 相邻元素区间重叠对数(必须 0)
# ③ 列标题 vs 顶端标签 / 主标题 的像素间距(>0 = 无重叠)

判据:max|dy| < 2px ✅ · 重叠 = 0 对 ✅ · 间距 > 0 ✅。任一不满足 → 没改完,别汇报。

🔴 第二类症状:文字 ⨯ 文字 互相压住(元素全对,是标注层自己叠了)

第一类的症状是"标签没对上元素";这一类的对齐全对,是文字自己撞在一起。 高发场景:多面板审计图 / 对照图,标注层同时承载"坐标 + 结论 + 计数"三类信息。

症状(OCR 读出来是糊成一团的乱码) 根因
一段长标签与加粗横幅糊在一起(OCR 出 the onlyhregborBuMBeoiusttingicansee 这类怪串) 两行标签(va="bottom" 约占 0.09 轴高)与横幅 y 只差 0.075 → 索引区间相撞
同层两个长标签横向贴住 两段坐标在 x 上只差 ~18%(如 15.9% vs 33.3%),单标签宽约 17% 轴宽 → 边缘接触
轴外说明压住 x 轴刻度线 文字放 y = -0.02(轴外)且 clip_on=False → 落到刻度标签那一行
面板 C 表格漏行 行数写死,增补内容时忘了同步扩行距

Read the full file on GitHub · 155 lines

Files

What ships with it

3 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.

Changes

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.

  1. 1mo ago First seen · 155 lines · 235 tokens per session scan A 63e668e456ab

Subscribe to this mod's changes

figure-layout-geometry is a skill published in the GitHub repository GGbond-bo/MemOmics-Agent (33 stars, last pushed 14d ago), licensed MIT. It adds 235 tokens to every session and 3,413 once invoked, about $0.0009 per session on Opus 5.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-10-12.

Related

figure-layout-geometry compared with skills from other repositories

figure-layout-geometry next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
figure-layout-geometryGGbond-bo/MemOmics-AgentSkill3314d agoMITA235Claude Code
webgl-holographic-foilnexu-io/open-designSkill110ktodayApache-2.0A41Claude Code, Codex
html-ppt-hermes-cyber-terminalnexu-io/open-designSkill110ktodayApache-2.0A53Claude Code, Codex
html-ppt-taste-brutalistnexu-io/open-designSkill110ktodayApache-2.0A78Claude Code, Codex
visual-ralphYeachan-Heo/oh-my-codexSkill34ktodayMITA52Codex
glance-canonical-layoutsandroid/skillsSkill11k7d agoApache-2.0A56Claude Code
prototype-webnexu-io/html-anythingSkill17kyesterdayApache-2.0A24Claude Code, Codex