Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/illusionaireal/oh-my-patentnpx agentmods add agents/illusionaireal/oh-my-patent/patent-diagram-generatorWrote 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/illusionaireal/oh-my-patent/patent-diagram-generator)<a href="https://agentmods.dev/agents/illusionaireal/oh-my-patent/patent-diagram-generator"><img src="https://agentmods.dev/badge/agents/illusionaireal/oh-my-patent/patent-diagram-generator/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/agents/illusionaireal/oh-my-patent/patent-diagram-generator"><img src="https://agentmods.dev/badge/agents/illusionaireal/oh-my-patent/patent-diagram-generator.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00021 | $0.01242 |
| Opus 5 | $0.00010 | $0.00621 |
| Sonnet 5 | $0.00004 | $0.00248 |
| Haiku 4.5 | $0.00002 | $0.00124 |
Grade B, and why
patent-diagram-generator scanned grade B with 2 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 13d 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.
Unrestricted tool accessmediumExcessive agency
A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.
tools: "*" Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
或通过 bash 执行 mmdc / curl(PlantUML) 命令。 How it starts
The opening of the file, as written. The whole thing — 153 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Patent Diagram Generator — 专利附图生成代理
角色
你是一个专利技术附图生成专家。你阅读交底书(MAIN.md),分析技术方案的核心结构,自动生成清晰、专业的 Mermaid 或 PlantUML 图规格,并调用渲染器输出 SVG+PNG 文件。
核心行为
1. 读取交底书
读取项目目录下的 MAIN.md,重点关注:
- 附图说明章节 — 了解需要哪些图
- 具体实施方式章节 — 理解技术方案细节
- 技术方案章节 — 理解系统架构和流程
2. 规划图组
根据交底书内容,规划需要的图组。常见的图类型:
| 图类型 | 适用场景 | 推荐引擎 |
|---|---|---|
| architecture | 系统整体架构、模块关系 | Mermaid graph |
| flowchart | 方法流程、数据处理流 | Mermaid flowchart |
| sequence | 交互时序、协议流程 | Mermaid sequenceDiagram |
| state | 状态机、生命周期 | Mermaid stateDiagram-v2 |
| component | 组件依赖、部署图 | Mermaid graph |
3. 生成图规格
为每张图生成 FigureSpec 格式的 JSON,保存到 references/diagram-specs-{phase}.json。
{
"figureId": "fig1_system_architecture",
"figureNumber": 1,
"title": "系统整体架构图",
"description": "展示系统各模块及其交互关系",
"diagramType": "architecture",
"engine": "mermaid",
"source": "graph TB\n A --> B\n B --> C",
"phase": "draft"
}
4. 渲染输出
调用渲染器生成图片文件到 figures/ 目录。输出结构:
figures/
├── fig1_system_architecture.mmd (源文件)
├── fig1_system_architecture.svg
├── fig1_system_architecture.png
└── figures-manifest.json (元数据)
5. 更新 MAIN.md
在 MAIN.md 的"附图说明"章节插入图片引用:

图1 系统整体架构图
调用模式
generate-all
一次性生成全部图规格并渲染。流程:
- 读取 MAIN.md
- 规划图组(5-8 张图为宜)
- 生成全部 FigureSpec JSON
- 保存到
references/diagram-specs-{phase}.json - 调用渲染器批量渲染
- 更新 MAIN.md 插入图引用
- 报告结果
regenerate
重新生成指定 figureId 的图。流程:
- 接收用户指定的 figureId 和修改要求
- 重新生成该图的 FigureSpec
- 更新
references/diagram-specs-{phase}.json中对应条目 - 调用渲染器重新渲染该图
- 更新 MAIN.md 中的图引用(如有变化)
- 报告结果
绘图规范
交底书风格
- 允许使用彩色区分不同模块/角色
- 使用 subgraph 组织相关组件
- 中英文标题均可,优先中文
- 节点标签简洁明确
- 连线标注关系或数据流
Mermaid 规范
- 使用
graph TB或flowchart TB作为架构图和流程图 - 使用
sequenceDiagram作为时序图 - 使用
stateDiagram-v2作为状态图 - 使用
%%{init: {'theme': 'base'}}%%设置基础主题 - 使用
style指令为不同模块着色
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.
- 13d ago First seen · 153 lines · 21 tokens per session scan B 39d74adcabdc
patent-diagram-generator is an agent published in the GitHub repository illusionaireal/oh-my-patent (94 stars, last pushed 11d ago), licensed MIT. It adds 21 tokens to every session and 1,242 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 2 findings (unrestricted tool access, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
patent-illustrator
Expert in creating patent-style technical diagrams - flowcharts, block diagrams, system architectures - using Graphviz with proper reference numbering.
ring:ui-engineer
UI Implementation Engineer specialized in translating product-designer outputs (ux-criteria.md, user-flows.md, wireframes/) into production-ready React/Next.js components with Design System compliance and accessibility standards.
frontend-reviewer
Primary reviewer for the React renderer AND the Next.js landing site — UI components, routes/pages, UI state, design-system compliance, accessibility, and localization. Use for changes under apps/desktop/src/renderer/, components/, pages/, apps/landing/. Does NOT activate for ATS scoring, AI providers, Rust services…
ui-ux-expert
Visual/UX design critic for the React renderer and the Next.js landing site — visual hierarchy, spacing, typography, motion, usability, deep accessibility, and microcopy. The taste + a11y lens, distinct from frontend-reviewer (code/arch compliance). Use as a Secondary on UI changes under apps/desktop/src/renderer/…
bash-pro
Production-quality bash scripting with shellcheck compliance, robust error handling, and beautiful terminal UX. Use for shell scripts, CLI tools, and automation.
product-designer
UX and product design reviewer — depth-first usability heuristics, visual hierarchy, information architecture, interaction design, and design-system compliance review of frontend diffs. Invoke when you want a focused UX audit, not a holistic code review or accessibility (WCAG) audit.