patent-diagram-generator

patent-diagram-generator is a skill for Claude Code, Codex from illusionaireal/oh-my-patent. It costs 0 tokens per session (1,259 once invoked), scanned A, original, MIT.

A specialist workflow for turning patent disclosure documents into technical patent drawings. It creates Mermaid or PlantUML diagram definitions and rendered SVG and PNG files.

In plain words
What is it for?
Use it to read a patent disclosure, plan a set of figures, save diagram specifications, and render the resulting drawings.
Why use it?
It helps convert a written invention description into clear architecture, process, interaction, or state diagrams for a patent application.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ![图1 系统整体架构图](./figures/fig1_system_architecture.png).

Good fit Use it to read a patent disclosure, plan a set of figures, save diagram specifications, and render the resulting drawings.

Compare 6 skills from other repositories ↓
Install

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.

Clone the repo
git clone --depth 1 https://github.com/illusionaireal/oh-my-patent
agentmods
npx agentmods add skills/illusionaireal/oh-my-patent/patent-diagram-generator

Made for: Claude Code, Codex.

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 patent-diagram-generator

README.md
[![agentmods](https://agentmods.dev/badge/skills/illusionaireal/oh-my-patent/patent-diagram-generator/github.svg)](https://agentmods.dev/skills/illusionaireal/oh-my-patent/patent-diagram-generator)
Your own site
<a href="https://agentmods.dev/skills/illusionaireal/oh-my-patent/patent-diagram-generator"><img src="https://agentmods.dev/badge/skills/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.

agentmods 80×15 button for patent-diagram-generator

Your own site · 80×15
<a href="https://agentmods.dev/skills/illusionaireal/oh-my-patent/patent-diagram-generator"><img src="https://agentmods.dev/badge/skills/illusionaireal/oh-my-patent/patent-diagram-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,259 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00000 $0.01259
Opus 5 $0.00000 $0.00629
Sonnet 5 $0.00000 $0.00252
Haiku 4.5 $0.00000 $0.00126

Measured 12d ago against content hash 3cc413839221, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

patent-diagram-generator scanned grade A with 1 finding 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 12d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

或通过 bash 执行 mmdc / curl(PlantUML) 命令。
plugins/codex/plugins/oh-my-patent/skills/patent-diagram-generator/SKILL.md · 151 lines

How it starts

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

Patent Diagram Generator

Act as this oh-my-patent specialist role. Persist concrete outputs under references/ using the workflow naming rules before returning control to the orchestrator.

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 系统整体架构图](./figures/fig1_system_architecture.png)

图1 系统整体架构图

调用模式

generate-all

一次性生成全部图规格并渲染。流程:

  1. 读取 MAIN.md
  2. 规划图组(5-8 张图为宜)
  3. 生成全部 FigureSpec JSON
  4. 保存到 references/diagram-specs-{phase}.json
  5. 调用渲染器批量渲染
  6. 更新 MAIN.md 插入图引用
  7. 报告结果

regenerate

重新生成指定 figureId 的图。流程:

  1. 接收用户指定的 figureId 和修改要求
  2. 重新生成该图的 FigureSpec
  3. 更新 references/diagram-specs-{phase}.json 中对应条目
  4. 调用渲染器重新渲染该图
  5. 更新 MAIN.md 中的图引用(如有变化)
  6. 报告结果

绘图规范

交底书风格

  • 允许使用彩色区分不同模块/角色
  • 使用 subgraph 组织相关组件
  • 中英文标题均可,优先中文
  • 节点标签简洁明确
  • 连线标注关系或数据流

Mermaid 规范

  • 使用 graph TBflowchart TB 作为架构图和流程图
  • 使用 sequenceDiagram 作为时序图
  • 使用 stateDiagram-v2 作为状态图
  • 使用 %%{init: {'theme': 'base'}}%% 设置基础主题
  • 使用 style 指令为不同模块着色

Read the full file on GitHub · 151 lines

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. 12d ago First seen · 151 lines · 0 tokens per session scan A 3cc413839221

Subscribe to this mod's changes

patent-diagram-generator is a skill published in the GitHub repository illusionaireal/oh-my-patent (94 stars, last pushed 11d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,259 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

specification-writing

A workflow for writing complete patent specifications from patent claims and an invention disclosure. It adapts the document to a chosen jurisdiction, such as the US, Europe, or China.

wanshuiyin/Auto-claude-code-research-in-sleep · 49 tokens

regulatory-research-fallback

Fallback workflow for regulatory research when web extraction tools fail on government PDFs.

HKUDS/OpenSpace · 20 tokens

x-scorecard

OpenSSF Scorecard for assessing open source project security. Check security best practices and compliance. Dependency: This is an x-cmd module. Install x-cmd first (see x-cmd skill for installation options). see x-cmd skill for installation.

x-cmd/x-cmd · 57 tokens

gesellschaftsrechtliche-satzungen-agb

Für Gesellschaftsrechtliche Satzungen AGB Abgrenzung: ordnet Norm, Beweislast und Gegenargument; Ergebnis: Prüfprodukt mit Risiko und nächstem Schritt. Fachgebiet: AGB-Recht-Prüfer. Route: gesellschaftsrechtliche-satzungen-agb.

Klotzkette/claude-fuer-deutsches-recht · 69 tokens

memstack-business-gdpr

Use this skill when the user says 'GDPR', 'data protection', 'privacy compliance', 'DPA', 'DSAR', 'data subject request', 'cookie consent', 'privacy audit', 'CCPA', or asks 'do I need GDPR for this repo'. Scans the repository to detect what personal data is collected, classifies sensitivity, determines whether GDPR…

cwinvestments/memstack · 121 tokens

nda-review

Use when the user uploads or pastes a non-disclosure agreement and asks for review, redline, risk assessment, or a recommendation on whether to sign. Identifies missing standard protections, one-sided or unusual provisions, and operational issues; produces a structured report with severity ratings and citations to…

LegalQuants/lq-ai · 79 tokens