cnipa-patent-writer

cnipa-patent-writer is a skill for Claude Code, Codex from fnjialun/cnipa-patent-writer. It costs 297 tokens per session (4,138 once invoked), scanned B, original, MIT.

A Chinese patent-application writing skill that creates a formatted DOCX document, including the abstract, claims, description, and technical drawings. CNIPA is China’s government agency for patent applications.

In plain words
What is it for?
Use it to draft a new Chinese invention patent from a technical description, codebase, project materials, or an existing formatting template.
Why use it?
It turns a technical solution into a structured application while keeping a provided template’s layout separate from its technical content.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: names the AskUserQuestion tool.

Good fit Use it to draft a new Chinese invention patent from a technical description, codebase, project materials, or an existing formatting template.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fnjialun/cnipa-patent-writer/cnipa-patent-writer
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 fnjialun/cnipa-patent-writer --skill cnipa-patent-writer
Clone the repo
git clone --depth 1 https://github.com/fnjialun/cnipa-patent-writer

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 cnipa-patent-writer

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/fnjialun/cnipa-patent-writer/cnipa-patent-writer"><img src="https://agentmods.dev/badge/skills/fnjialun/cnipa-patent-writer/cnipa-patent-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 297 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,138 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00297 $0.04138
Opus 5 $0.00148 $0.02069
Sonnet 5 $0.00059 $0.00828
Haiku 4.5 $0.00030 $0.00414

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

Security

Grade B, and why

cnipa-patent-writer scanned grade B 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

外**还需系统二进制 `dot`**:`sudo apt-get install -y graphviz`,否则渲染报错。不画 graphviz 图则无需安装。
SKILL.md · 139 lines

How it starts

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

中国发明专利撰写(套用模板格式 / 无模板按 CNIPA 标准)

帮助撰写一篇新的发明专利申请文档(.docx):套用页眉/页脚、分节、字体字号、缩进行距、分页与附图编排 等版式,但内容据待保护的技术方案重新写——模板只提供格式与行文风格,其技术内容一律不抄

何时用 / 输入

  • 有模板:用户给一份模板专利 .docx(作格式参照)+ 一个要写成专利的"技术方案/系统/项目"(代码库、设计 文档或口头描述)。→ 用克隆装配器 build_patent.py,版式 100% 继承模板。
  • 无模板:用户只给技术方案。→ 用兜底装配器 build_patent_cnipa.py,按 CNIPA 标准版式生成。
  • 目标产物:一篇排版规范的 .docx(含配图),可直接提交/继续打磨。

依赖(缺则先装;装包注意 proxy)

  • 必装:python-docxmatplotlibPillowpip install python-docx matplotlib Pillow)。
  • 可选:graphviz(用 gen_figures_graphviz.py 画复杂流程/架构图时)——除 pip install graphviz(python 封装) 外还需系统二进制 dotsudo apt-get install -y graphviz,否则渲染报错。不画 graphviz 图则无需安装。
  • CJK 字体:matplotlib/graphviz 画中文必须有中文字体(如 Noto Sans CJK / 宋体),否则中文渲染成豆腐块。
  • 可视化校验工具(强烈建议):libreoffice-writer(提供 soffice,docx→pdf)+ poppler-utils (提供 pdftoppm,pdf→png)+ 中文字体(如 fonts-noto-cjk,或把 Windows 宋体/黑体拷进 ~/.fontsfc-cache -f)。这些一般需 sudo apt-get install;无 sudo 时请用户手动装。

核心原则(先读这几条,避免返工)

  1. 只借格式、绝不抄技术内容(最重要的红线):模板提供版式、行文风格、分节/页眉页脚/分页等通用 架构;它的技术方案、技术架构、层级划分、模块名、步骤编排、配图的数量与种类(哪怕看着很"通用")一律 不得搬进新专利——因为换一个用户就是另一套技术,照搬既写错又涉抄袭。一切文本与配图都据用户提供的 材料/项目代码实际生成;模板里出现的具体技术(某种特定级联结构、某种模型分工、某些字段/JSON 示例等)只 能当"格式长什么样"的参照,不能当内容来源。动笔与画图前先自问:这句话/这张图是不是来自用户的真实方案?
  2. 结构校验 ≠ 视觉校验(最容易栽的坑):python-docx 查到"样式名/字号全对",用户在 Word/WPS 打开仍可能 错(页眉错、图越界、中文豆腐块、标题当正文)。完稿必须渲染成页面逐页看(见下"第7步")。这是本技能 反复返工后总结出的第一教训。
  3. 权利要求一律宽泛,真实参数/产品名只进实施例:claims 用上位概念(如"预设阈值""通信通道""存储模块"), 具体数值/角度/距离/倍率/型号/接口/消息通道(你这篇方案里的真实值)只在"实施例"里以"例如/优选"出现。
  4. 正文 solo 写、术语锁定:claim N ↔ 发明内容里对应的"进一步地" ↔ 实施例里的实现,三处用词必须一致。 先定一份术语表再写,全篇复用;不要并行分写正文(会术语漂移)。
  5. 创新点放进权利要求1:把最硬的发明点(解决的关键技术问题)写进独立权利要求1,不要藏在从属里。

工作流

1. 学习格式基准(务必先做)

references/docx-format.md(克隆复刻法)与 references/cnipa-format-spec.md(CNIPA 精确版式)。然后:

  • 有模板:跑 python scripts/inspect_template.py 模板.docx 一次扒出全部版式——分节数与分节符、各节页眉 文字、页脚是否有 PAGE 域页码及起始页、页面尺寸/页边距、各类段落(标题/正文/权项/发明名称/实施例子标题/ 图号)的字体字号对齐缩进段距、正文段长分布。逐项对齐(尤其确认 4 节 4 页眉:说明书摘要 / 权利要求书 / 说明书 / 说明书附图,以及附图节页码怎么处理)。这一步决定 build_patent.py 能否 1:1 复刻。
  • 无模板:直接采用 cnipa-format-spec.md 的标准参数(已内置进 build_patent_cnipa.py),跳到写作。
  • 注意:inspect_template.py 只读模板的版式不读取也不复制模板的技术内容

Read the full file on GitHub · 139 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 · 139 lines · 297 tokens per session scan B ec8d0aa96315

Subscribe to this mod's changes

cnipa-patent-writer is a skill published in the GitHub repository fnjialun/cnipa-patent-writer (9 stars, last pushed 3mo ago), licensed MIT. It adds 297 tokens to every session and 4,138 once invoked, about $0.0015 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

deepread-pii

Redact PII from documents before sharing or sending to LLMs. 14 PII types (names, SSN, credit cards, medical records, etc.) detected with context-aware AI — not regex. Knows patient vs. doctor, personal vs. institutional. Black bar redaction on PDFs, scanned images, and text files. Free tier: 2,000 pages/month.

deepread-tech/skills · 0 tokens

deepread-legal

Extract structured data from contracts, legal agreements, court filings, and compliance documents. Pre-built schemas for parties, clauses, dates, obligations. PII redaction for privilege review. 97%+ accuracy. Free 2,000 pages/month.

deepread-tech/skills · 55 tokens

deepread-insurance

Extract structured data from insurance claims, policies, EOBs, and loss reports. Pre-built schemas for claimant info, coverage, damages, adjuster notes. PII redaction for compliant sharing. 97%+ accuracy. Free 2,000 pages/month.

deepread-tech/skills · 59 tokens

deepread-id-documents

Extract structured data from passports, driver's licenses, and national ID cards for KYC/onboarding — name, document number, dates, nationality — as typed JSON. Vision AI reads scans and photos. Per-field confidence flags. PII redaction built in for compliant storage. Free 2,000 pages/month.

deepread-tech/skills · 68 tokens

docx-template-translator

Adaptive conversion of LaTeX, PDF, or Markdown sources into a complete Word .docx that follows a user-supplied .docx template. Use when pandoc --reference-doc alone is not enough — for thesis, dissertation, report, or institutional Word formatting that needs cover pages, declarations, TOC, heading numbering, captions…

zouchenzhen/docx-template-translator-skill · 87 tokens

patent-application

A patent-application document workflow that turns supplied invention materials into claims, a description, an abstract, and black-and-white drawings. It can also produce Markdown and Word files.

handsomestWei/patent-disclosure-skill · 95 tokens