patent-diagram-drawing

patent-diagram-drawing is a skill for Claude Code from jiutuhky/my-super-capsule. It costs 122 tokens per session (1,296 once invoked), scanned A, original, MIT.

A tool for generating black-and-white patent diagram PNGs that follow China’s CNIPA filing standards. CNIPA is China’s national intellectual-property authority.

In plain words
What is it for?
Use it to create method flowcharts, device block diagrams, system architecture drawings, and hardware cross-sections for patent documents.
Why use it?
It turns a patent description and its component numbering into diagrams with the required engineering-drawing style and labels.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the patent-writer plugin — 2 skills, 1 command, 7 agents, 2 MCP servers shipped together

Good fit Use it to create method flowcharts, device block diagrams, system architecture drawings, and hardware cross-sections for patent documents.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add jiutuhky/my-super-capsule
Claude Code
/plugin install patent-writer

Made for: Claude Code.

Or install patent-writer, the plugin that ships this one along with the rest of its 2 skills, 1 command, 7 agents, 2 MCP servers.

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-drawing

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/jiutuhky/my-super-capsule/patent-diagram-drawing"><img src="https://agentmods.dev/badge/skills/jiutuhky/my-super-capsule/patent-diagram-drawing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 122 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,296 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.00122 $0.01296
Opus 5 $0.00061 $0.00648
Sonnet 5 $0.00024 $0.00259
Haiku 4.5 $0.00012 $0.00130

Measured 12d ago against content hash 46a77101346d, 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-drawing 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 12d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/generate.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.

patent-writer/skills/patent-diagram-drawing/SKILL.md · 113 lines

How it starts

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

专利附图 PNG 生成

通过 Google Gemini Image API 生成符合中国国家知识产权局(CNIPA)标准的纯黑白工程制图风格专利附图。

前置条件

环境变量

变量名 必需 说明
GEMINI_API_KEY 是(优先) Gemini API 密钥
GOOGLE_API_KEY 备选 GEMINI_API_KEY 未设置时使用
GEMINI_BASE_URL 否(优先) 自定义 API 端点
GOOGLE_API_BASE_URL 备选 GEMINI_BASE_URL 未设置时使用

Python 依赖:pip install google-genai

Workflow

Step 1: 读取风格规范

Read ${CLAUDE_PLUGIN_ROOT}/skills/patent-diagram-drawing/references/patent-diagram-spec.md to load CNIPA diagram standards (line weights, numbering formats, layout rules). Strictly follow all rules defined there.

Step 2: 读取项目输入

Locate the project working directory (output/temp_[uuid]/). If invoked as /write-patent Step 2, reuse the directory from Step 1. Read:

  • 04_content/description.md — 具体实施方式全文
  • 03_outline/structure_mapping.json — 结构映射(图号、模块编号对应关系)

Step 3: 确定附图列表

Based on description content and structure mapping, identify all diagrams to generate:

类型 触发条件 编号
方法流程图 每个方法权利要求对应一张 S101, S102...
装置结构框图 每个装置权利要求对应一张 201, 202...
系统架构图 涉及多组件交互时 301, 302...
硬件截面图 涉及物理结构时 引出线编号

Step 4: 逐一生成附图

Read ${CLAUDE_PLUGIN_ROOT}/skills/patent-diagram-drawing/references/prompt-templates.md to get prompt templates. Select the template matching the diagram type (flowchart, apparatus, system, cross-section) and fill in placeholders from description.md and structure_mapping.json.

Create output directories, then execute for each diagram:

mkdir -p {PROJECT_DIR}/05_diagrams/{flowcharts,structural_diagrams,cross_sections}

GEMINI_API_KEY="${GEMINI_API_KEY:-$GOOGLE_API_KEY}" \
GEMINI_BASE_URL="${GEMINI_BASE_URL:-$GOOGLE_API_BASE_URL}" \
python3 "${CLAUDE_PLUGIN_ROOT}/skills/patent-diagram-drawing/scripts/generate.py" \
  "<PROMPT>" --ratio 3:4 -o "<OUTPUT_PATH>" --size 2K -v
  • <PROMPT>: Full English prompt constructed from template with placeholders filled
  • <OUTPUT_PATH>: Absolute path to output PNG (e.g., 05_diagrams/flowcharts/method_flow.png)

Read the full file on GitHub · 113 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. 12d ago First seen · 113 lines · 122 tokens per session scan A 46a77101346d

Subscribe to this mod's changes

patent-diagram-drawing is a skill published in the GitHub repository jiutuhky/my-super-capsule (11 stars, last pushed 6mo ago), licensed MIT. It adds 122 tokens to every session and 1,296 once invoked, about $0.0006 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.

Related

Other skills, from other repositories

accessibility-compliance-accessibility-audit

You are an accessibility expert specializing in WCAG compliance, inclusive design, and assistive technology compatibility. Conduct audits, identify barriers, and provide remediation guidance.

sickn33/agentic-awesome-skills · 40 tokens

ss-review

Review UI code for design system compliance, accessibility, and best practices.

bitjaru/styleseed · 16 tokens

ada-plan-view-accessibility

Use when checking simplified ADA-derived plan-view bathroom accessibility constraints such as turning space, door clear width, toilet centerline, grab bars, and lavatory knee/toe clearance.

benchflow-ai/skillsbench · 41 tokens

auditing-wcag

Perform formal WCAG 2.2 A/AA conformance audits and assign Pass/Fail/NT/NA to every success criterion with evidence. Use reviewing-a11y instead for issue discovery and improvement feedback.

masuP9/a11y-specialist-skills · 49 tokens

mqc-litigation-visual-redraw

Redraw a litigation diagram into a restrained, court-ready presentation graphic (SVG + PNG) WITHOUT changing any text or legal meaning. Use this whenever the user supplies a case timeline, a legal process flowchart, OR a party/relationship diagram and wants it cleaned up, beautified, redrawn, made professional…

MiaoQichuan/new-litigation-visualization · 257 tokens

kit-tipo

Define a tipografia do site como decisão — e, principalmente, resolve se dá para ENTREGAR. Confere licença (site de marca paga por tipo, e acervo montado a partir de site de marca vem cheio de fonte comercial que não se pode servir), propõe substituto livre com critério de desenho, monta o par display + corpo, gera a…

harebeats/cannonball · 199 tokens