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 agentmods add agents/windviki/vbookmarks/design-lawsgit clone --depth 1 https://github.com/windviki/vBookmarksWrote 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/agents/windviki/vbookmarks/design-laws)<a href="https://agentmods.dev/agents/windviki/vbookmarks/design-laws"><img src="https://agentmods.dev/badge/agents/windviki/vbookmarks/design-laws.svg" alt="Measured on agentmods" height="20"></a>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 | $0.00000 | $0.02667 |
| Opus 5 | $0.00000 | $0.01333 |
| Sonnet 5 | $0.00000 | $0.00533 |
| Haiku 4.5 | $0.00000 | $0.00267 |
Grade A, and why
design-laws 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 4d 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 — 58 lines — stays where its author put it; the contents beside it link to each section on GitHub.
视觉对齐与交互设计律(design laws)
用户在多轮反馈中反复强调的视觉/交互癖好,浓缩成以下硬规则。改任何工具栏、行按钮、组头前先读这份——这些点每一犯过至少两次。每条都附出处轮次,便于回溯原始场景。
1. 右缘 8px 轴律(one right axis)
每个列表视图的最后一个行按钮右缘、工具栏最右图标右缘、组头快捷尾最后一个按钮右缘,都距容器右缘 8px(容器 4px padding + 按钮 4px margin)。选择模式入口必须落在这条轴上(右对齐 margin-inline-start: auto),且放在工具栏第一行(控制行)的最右,不在第二行。(统计/标签组两个视图都为此返工过。)
2. 行图标几何:20px 盒、24px 均匀步距(2026-08 终版)
行尾悬浮图标与工具栏纯图标钮全部 20px 盒(高同 20)+ 16px 图标 + 均匀 4px 间距;右缘 8px 由 li 的 padding-inline-end: 4px 提供——禁止给最后一个按钮加 8px margin(那会把末段步距撑成 28px,工具栏簇永远堆不齐;staging/search/dead/stats 四个视图都犯过)。工具栏纯图标尾与组头/窗口头快捷尾一律包 nowrap 簇:工具栏用 <span class="*-icon-cluster">(簇内 gap 4、margin-inline-start:auto 右锚定),组头用 <span class="head-icon-cluster">(簇内 gap 4、按钮 margin 0、簇尾 margin 4 与头 padding 4 合成 8px 轴——头自身的 gap 4 会与按钮 margin 叠成 28px 步距,禁止按钮直接作为头的尾子元素)。文本控件(过滤段、全部应用等)不参与堆叠、放簇左侧。图标化的选择动作行同用 20px 盒 + 4px gap(渐进文字点亮时宽度自然增长)。验收标准:diag 实测工具栏图标中心与行尾图标中心逐一相等(参考 lattice:中心 302 = 右缘 8px 轴 @420px 容器)。
- 特异性陷阱:
.dupes-toolbar button:not(...)这类链是 (0,5,1);新按钮要么加进:not()排除表(如.dupes-tbtn),要么用同量级复合选择器。后代组合子不能匹配同一元素上的两个类——.dupes-toolbar .dupes-actions-toolbar …在两类同挂一个 div 时永不命中(去重图标簇为此排查过一轮)。写完规则必须实测getComputedStyle。
3. 竖向对齐 = 列对齐 + 垂直居中
"竖直对齐"指两件事:a) 上方工具栏图标与下方行图标列位堆叠(用 §2 的几何自然达成,必要时实测两个中心的差值再钉 CSS,如标签组当前窗口 pill 绝对定位在右缘 128px);b) 图标垂直居中——一切图标钮/文本字形用 display:inline-flex; align-items:center; line-height:1(▾/▸ 文本字形尤其要,否则基线下沉视觉偏移)。测中心用 getBoundingClientRect 的中点,别目测。
4. staged(暂存)图形语言
- 空心飞机 = 未暂存(悬浮浮现);实心飞机 +
.staged(accent 色 + 常显)= 已暂存。 - 点击一律切换语义;组/文件夹/窗口级 = 全员判定(全部已暂存才实心)。
- 视觉即时同步是调用方的责任:宿主视图不随暂存变化重渲染,点击后必须
flipStageBtn在位翻转(含文件夹级的子行级联翻转)。只改状态不改图 = 未完成。
5. 破坏性右端律
danger 红只给破坏性动作,且放行的最右 / 图标条的最后。危险批量的 hover 用 danger 12% 淡底。
6. 选择模式 = 两行 rung + 图标化渐进
第一行:计数 + 全选/反选/清除 + 退出(文本钮)。第二行:图标化批量动作 + 从右向左按剩余宽度逐个点亮文字(共享 src/toolbar-fit.js;动作行 nowrap + 溢出回退,flex-wrap 会把"放不下"变成换行,装配器就永远看不到失败)。全部六个列表视图已统一,新视图照抄。
7. 组头/区头 = 树视图三层槽位(2026-08-26 树律统一,适用 树/暂存/最近/标签组)
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.
- 4d ago First seen · 58 lines · 0 tokens per session scan A 7d7c24f2ced9
design-laws is an agent published in the GitHub repository windviki/vBookmarks (135 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,667 tokens. 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 agents, from other repositories
logic-design
Decide where new application logic belongs — component shape, logic layer, store variant — and return a recommendation with the schematic to run and what to verify. Use the logic-review agent for existing code.
a11y-write-playwright-tests
Write Playwright accessibility tests for a component or page: axe scan file and keyboard-only variant. Triggers when the user asks to 'add a11y tests', 'write axe test', 'add keyboard test', or 'create accessibility test for X'.
doc-to-deck-agent
Converts a Pages or Word document into a Keynote slide deck.
sheet-report-agent
Analyzes spreadsheet data and produces a report with charts.
meeting-start-agent
Detects the current meeting and starts a Voice Memo recording.
sheet-convert-agent
Converts between Excel and Numbers formats.