
patent-pipeline
Full patent drafting pipeline from invention description to jurisdiction-formatted filing documents. Supports CN (CNIPA), US (USPTO), EP (EPO). Supports invention patents and utility models. Use when user says "写专利", "patent pipeline", "专利申请", "draft patent", "写权利要求书", or wants to draft a complete patent application.
- Installs
- 508
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/wanshuiyin/auto-claude-code-research-in-sleep --skill patent-pipeline- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads patent-pipeline automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Patent Pipeline: From Invention to Filing
Before each reviewer slot, follow Selectable Reviewers: resolve invocation →
.aris/reviewer.json→ Claude Code default (Codex MCP) withreviewer_route.pythrough the canonical helper resolver, preserving this slot's tier, fresh contexts, source/image inputs and deterministic gates. Codex examples/pins below apply only tobackend=codex; other routes use their own first-call/reply contract. Save the route and actual returned identity; unavailable selections areREVIEW_UNAVAILABLE. Classify acceptance from actual families/completion/scope. Forward invocation reviewer/model/effort overrides to reviewer-bearing children. Generation workers are unchanged.
Draft a complete patent application based on: $ARGUMENTS
Overview
This skill orchestrates the full patent drafting lifecycle -- from prior art search through jurisdiction-formatted filing documents. It chains sub-skills into a patent-specific pipeline:
/prior-art-search → /patent-novelty-check → /invention-structuring → /claims-drafting → /specification-writing → /patent-review → /jurisdiction-format
(search) (verify) (structure) (claims) (description) (examiner) (compile)
├── /figure-description
└── /embodiment-description
This is a parallel branch, not part of the linear research pipeline. After /idea-discovery produces validated ideas, the user can either:
- Go to
/experiment-bridge→/auto-review-loop→/paper-writing(publish track) - Go to
/grant-proposal(funding track) - Go to
/patent-pipeline(patent track) <-- this skill
┌→ /experiment-bridge → /auto-review-loop → /paper-writing (publish track)
/idea-discovery ────┤
├→ /grant-proposal → [get funded] → ... (funding track)
└→ /patent-pipeline → [file patent] (patent track)
Patents are about protecting inventions (legal scope), not publishing results (academic contribution). This skill handles the unique requirements of patent drafting: prior art analysis, claims hierarchy design, specification writing with enablement support, embodiment descriptions, and jurisdiction-specific formatting.
Constants
- JURISDICTION =
CN— Target patent jurisdiction. Options:CN(CNIPA),US(USPTO),EP(EPO),ALL(generate all three). Override via argument (e.g.,/patent-pipeline "invention — US"). - PATENT_TYPE =
invention—invention(发明专利, 20 year protection) orutility_model(实用新型, CN only, 10 year protection, apparatus claims only). Override via argument. - REVIEWER_MODEL =
gpt-6-astra— Model used via Codex MCP for examiner-style review. - MAX_REVIEW_ROUNDS = 2 — Maximum review-revision cycles.
- AUTO_PROCEED = false — At each checkpoint, always wait for explicit user confirmation. Patent applications require inventor judgment at every stage. Set
trueonly if user explicitly requests autonomous mode. - LANGUAGE =
auto— Output language. Auto-detected from jurisdiction: CN->Chinese, US->English, EP->English. Override explicitly if needed. - OUTPUT_DIR =
patent/— Directory for generated patent files. - OUTPUT_FORMAT =
markdown— Draft format.markdownfor review,docxfor filing-ready.
Override defaults via arguments:
/patent-pipeline "invention — US, utility model"or/patent-pipeline "invention — ALL, language: Chinese".
Patent Type Specifications
Invention Patent (发明专利)
| Field | Detail |
|---|---|
| Protection | 20 years from filing date |
| Subject matter | Methods, systems, products, compositions, processes |
| Examination | Substantive examination required |
| Inventive step | High (must involve an inventive step / 创造性) |
| Timeline | 2-4 years to grant (CN); 2-3 years (US); 3-5 years (EP) |
| Claims | Method + system + product claims allowed |
Utility Model (实用新型) — CN Only
| Field | Detail |
|---|---|
| Protection | 10 years from filing date |
| Subject matter | Product shape, structure, or combination thereof only |
| Examination | Formal examination only (no substantive examination) |
| Inventive step | Lower than invention patent |
| Timeline | 6-8 months to grant |
| Claims | Apparatus/device claims only. NO method claims. |
| Restriction | CN jurisdiction only |
State Persistence (Compact Recovery)
Patent drafting is a long task that may trigger context compaction. Persist state to patent/PATENT_STATE.json after each phase:
{
"phase": 3,
"jurisdiction": "CN",
"patent_type": "invention",
"language": "Chinese",
"codex_thread_id": "019cfcf4-...",
"invention_title": "...",
"claims_count": 15,
"status": "in_progress",
"timestamp": "2026-04-10T15:00:00"
}
Write this file at the end of every phase. On invocation, check for this file:
- If absent or
status: "completed"-> fresh start - If
status: "in_progress"and within 24h -> resume from saved phase (read output files to restore context) - If older than 24h -> fresh start (stale state)
On completion, set "status": "completed".
Workflow
Phase 0: Input Parsing & Context Gathering
Parse $ARGUMENTS to extract:
- Invention description — may be structured (references INVENTION_BRIEF.md), conversational with figures, or output from IDEA_REPORT.md
- Jurisdiction — detect from keywords (e.g., "CN" or "中国" -> CN, "US" or "USPTO" -> US, "EP" or "EPO" -> EP, "ALL")
- Patent type — detect from keywords (e.g., "utility model" or "实用新型" -> utility_model, default -> invention)
- Overrides — language, output format, review rounds
Then gather context from the project directory:
- Read
INVENTION_BRIEF.mdif it exists (user filled in the template) - Read
IDEA_REPORT.mdif it exists (from/idea-discovery-- can extract invention from research results) - Read
refine-logs/FINAL_PROPOSAL.mdif it exists - Read
NARRATIVE_REPORT.mdif it exists (research results that may be patentable) - Search for user-provided figures (PNG, JPG, SVG, PDF) in the project directory
- Check for
patent/PATENT_STATE.json(resume from prior interrupted run)
If insufficient context exists:
- No invention description at all -> suggest user describe the invention or fill in
INVENTION_BRIEF.md - Has IDEA_REPORT.md -> extract patentable aspects from the research
- Has figures -> reference them in the invention brief
- No figures -> note that figures will be needed and plan what drawings are required
If the input is conversational (not a structured brief), parse the description into the invention brief structure and write patent/INVENTION_BRIEF.md for downstream phases.
Phase 1: Prior Art Search & Novelty Assessment
1.1 Prior Art Search
Invoke /prior-art-search:
/prior-art-search "patent/INVENTION_BRIEF.md"
This searches patent databases (Google Patents, Espacenet) and academic literature for relevant prior art.
1.2 Novelty Check
Invoke /patent-novelty-check:
/patent-novelty-check "patent/INVENTION_BRIEF.md"
This assesses novelty and non-obviousness against the prior art found in step 1.1.
🚦 Checkpoint: Present the prior art landscape and novelty assessment:
Prior art search complete:
- [X] patent references found
- [Y] non-patent literature references found
- Closest prior art: [reference] -- [why it's closest]
- Novelty assessment: [PATENTABLE / PATENTABLE WITH AMENDMENTS / NOT PATENTABLE]
- Key risk areas: [list]
Ready to proceed with invention structuring?
⛔ STOP HERE and wait for user response. Do NOT auto-proceed unless AUTO_PROCEED=true.
Options:
- Reply "go" -> proceed to Phase 2
- Reply with adjustments -> refine the invention scope and re-check novelty
- Reply "stop" -> save progress to
patent/DRAFT_NOTES.md
State: Write PATENT_STATE.json with phase: 1.
Phase 2: Invention Structuring & Claims Design
2.1 Structure the Invention
Invoke /invention-structuring:
/invention-structuring "patent/INVENTION_BRIEF.md"
This decomposes the invention into core inventive concept, supporting features, and optional features. Produces patent/INVENTION_DISCLOSURE.md.
2.2 Draft Claims
Invoke /claims-drafting:
/claims-drafting "patent/INVENTION_DISCLOSURE.md"
This drafts the claims hierarchy -- the most critical part of the patent. Produces patent/CLAIMS.md.
🚦 Checkpoint: Present the invention structure and claims:
Invention structured:
- Core inventive concept: [summary]
- Claim categories: [method, system, etc.]
- Claims drafted: [X] independent + [Y] dependent = [Z] total
- Independent claim 1 (broadest): [first 50 words of claim 1]
- Examiner review score: [X]/10
The claims define the legal scope of protection. Please review before proceeding to specification.
⛔ STOP HERE and wait for user response. Do NOT auto-proceed unless AUTO_PROCEED=true.
Options:
- Reply "go" -> proceed to Phase 3
- Reply with adjustments (e.g., "broaden claim 1", "add more dependent claims") -> revise claims
- Reply "stop" -> save progress
State: Write PATENT_STATE.json with phase: 2.
Phase 3: Specification Writing
Invoke /specification-writing:
/specification-writing "patent/CLAIMS.md"
This writes the full specification section by section. Internally invokes /figure-description (if user-provided figures exist) and /embodiment-description for the detailed description. The specification-writing skill handles figure processing and embodiment writing as sub-skills.
🚦 Checkpoint: Present the specification overview:
Specification written:
- Title: [title]
- Sections: Technical Field, Background, Summary, Drawings Description, Detailed Description, Abstract
- Embodiments: [X]
- Reference numerals: [Y] components mapped
- Abstract length: [Z] words (limit: [jurisdiction limit])
- Claim support: [all elements covered / X elements missing]
Ready to proceed to review?
⛔ STOP HERE and wait for user response.
State: Write PATENT_STATE.json with phase: 3.
Phase 4: Patent Review
Invoke /patent-review:
/patent-review "patent/"
This runs 2 rounds of examiner-style review via GPT-6-Astra xhigh. The examiner evaluates clarity, written description, enablement, novelty, non-obviousness, and claim scope.
State: Write PATENT_STATE.json with phase: 4 and review score.
Phase 5: Jurisdiction Formatting & Output
Invoke /jurisdiction-format:
/jurisdiction-format "patent/"
This compiles the application into the target jurisdiction format(s).
Final Deliverables
| Output | Location | Description |
|---|---|---|
| CN: 权利要求书 | patent/output/CN/ | Claims in CNIPA format |
| CN: 说明书 | patent/output/CN/ | Description in CNIPA format |
| CN: 说明书摘要 | patent/output/CN/ | Abstract (CN) |
| US: Claims | patent/output/US/ | Claims in USPTO format |
| US: Specification | patent/output/US/ | Description in USPTO format |
| US: Abstract | patent/output/US/ | Abstract (US) |
| EP: Claims | patent/output/EP/ | Claims in EPO format |
| EP: Description | patent/output/EP/ | Description in EPO format |
| EP: Abstract | patent/output/EP/ | Abstract (EP) |
Final Report
## Patent Pipeline Complete
### Application Summary
- Title: [invention title]
- Jurisdiction: [CN/US/EP/ALL]
- Patent Type: [Invention / Utility Model]
- Language: [Chinese/English]
- Total Claims: [X] independent + [Y] dependent
### Pipeline Scores
| Phase | Score |
|-------|-------|
| Prior Art Search | [completeness assessment] |
| Novelty Assessment | [PATENTABLE/PATENTABLE WITH AMENDMENTS/NOT PATENTABLE] |
| Examiner Review Round 1 | [X]/10 |
| Examiner Review Round 2 | [Y]/10 |
| Final | [Z]/10 |
### Output Files
[Table of all generated files with paths]
### Next Steps
- [ ] Have a patent attorney review the application
- [ ] Conduct professional prior art search (this tool's search is preliminary)
- [ ] Prepare formal drawings (if user figures need professional rendering)
- [ ] File with the patent office
- [ ] For utility model (CN): formal examination typically takes 6-8 months
- [ ] For invention patent: substantive examination may take 2-4 years
State: Write PATENT_STATE.json with phase: 5, status: "completed".
Key Rules
- Never fabricate prior art references, patent numbers, or citations.
- Claims must be supported by the specification (written description requirement).
- Each jurisdiction has strict format requirements -- do not mix formats.
- Utility model (实用新型) applies ONLY to CN jurisdiction and ONLY covers apparatus/device claims.
- AUTO_PROCEED defaults to false -- patent applications require human review at every phase. Sub-skills inherit this flag: when AUTO_PROCEED=false, sub-skills present results and wait at their own internal checkpoints too.
- The patent pipeline produces drafts for attorney review, not final filing documents.
- Large file handling: if a Write operation fails, retry with Bash
cat <<'EOF'heredoc. - Never include experimental results or empirical evaluations in the specification.
- Consistent terminology is mandatory -- same word for the same concept throughout.
- If the selected reviewer is unavailable, record
REVIEW_UNAVAILABLE; the draft pipeline may continue explicitly unreviewed, without switching providers.
Composing with Other Workflows
The patent pipeline can start from multiple entry points:
User describes invention directly ──→ /patent-pipeline
/idea-discovery produces IDEA_REPORT.md ──→ /patent-pipeline (extract patentable aspects)
/research-refine produces FINAL_PROPOSAL.md ──→ /patent-pipeline (from refined research idea)
/auto-review-loop produces strong results ──→ /patent-pipeline (patent the method)
Acknowledgements
Built on the ARIS (Auto-claude-code-research-in-sleep) skill architecture. Patent writing principles adapted from MPEP (US), CN Patent Examination Guidelines (CN), and EPO Guidelines for Examination (EP).
FAQ
What does the patent-pipeline skill do?
Full patent drafting pipeline from invention description to jurisdiction-formatted filing documents. Supports CN (CNIPA), US (USPTO), EP (EPO). Supports invention patents and utility models. Use when user says "写专利", "patent pipeline", "专利申请", "draft patent", "写权利要求书", or wants to draft a complete patent application.
How do I install patent-pipeline?
Run npx skills add https://github.com/wanshuiyin/auto-claude-code-research-in-sleep --skill patent-pipeline in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/patent-pipeline/ (personal) or .claude/skills/patent-pipeline/ (project).
Which AI agents can use patent-pipeline?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is patent-pipeline safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains patent-pipeline?
It is published by wanshuiyin in wanshuiyin/auto-claude-code-research-in-sleep. It has 508 recorded installs.
More from wanshuiyin/auto-claude-code-research-in-sleep
paper-figure
wanshuiyin/auto-claude-code-research-in-sleep
Generate publication-quality figures and tables from experiment results. Use when user says "画图", "作图", "generate figures", "paper figures", or needs plots for a paper.
semantic-scholar
wanshuiyin/auto-claude-code-research-in-sleep
Search published venue papers (IEEE, ACM, Springer, etc.) via Semantic Scholar API. Complements /arxiv (preprints) with citation counts, venue metadata, and TLDR. Use when user says "search semantic scholar", "find IEEE papers", "find journal papers", "venue papers", "citation search", or wants published literature beyond arXiv preprints.
research-lit
wanshuiyin/auto-claude-code-research-in-sleep
Search and analyze research papers, find related work, summarize key ideas. Use when user says "find papers", "related work", "literature review", "what does this paper say", or needs to understand academic papers.
idea-discovery
wanshuiyin/auto-claude-code-research-in-sleep
Workflow 1: Full idea discovery pipeline to go from a broad research direction to validated, pilot-tested ideas. Use when user says "找idea全流程", "idea discovery pipeline", "从零开始找方向", or wants the complete idea exploration workflow.
idea-creator
wanshuiyin/auto-claude-code-research-in-sleep
Generate and rank research ideas given a broad direction. Use when user says "找idea", "brainstorm ideas", "generate research ideas", "what can we work on", or wants to explore a research area for publishable directions.
arxiv
wanshuiyin/auto-claude-code-research-in-sleep
Search, download, and summarize academic papers from arXiv. Use when user says "search arxiv", "download paper", "fetch arxiv", "arxiv search", "get paper pdf", or wants to find and save papers from arXiv to the local paper library.
Popular productivity & automation skills
agent-browser
vercel-labs/agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.
lark-doc
open.feishu.cn
飞书云文档(Docx / Wiki)内容操作:读取、创建、编辑文档,插入或下载图片附件,以及操作思维笔记。用户提供文档 URL/token(包括 doubao.com 的 /docx/、/wiki/)时使用;按 URL 路径/token 而非域名路由;/page/ 是妙搭应用,非飞书云文档。文档内嵌资源按读取参考中的统一规则分流。独立评论操作走 lark-drive;随正文读取评论使用 docs +fetch。表格或 Base 内部数据操作不在本 skill。
lark-base
open.feishu.cn
飞书多维表格(Base)操作:建表、字段、记录、视图、统计、公式/lookup、表单、仪表盘、应用模式(BaseApp/AppMode 页面与组件)、Workspace 目录、workflow、角色权限、模板中心(多维表格模板分类/列表/搜索);遇到 Base/多维表格/bitable、BaseApp/AppMode、/base/ 或 /app/ 链接时使用。BaseApp 不走 lark-apps;文件导入/导出转 lark-drive,认证/授权转 lark-shared。
lark-drive
open.feishu.cn
飞书云空间(云盘/云存储):管理 Drive 文件和文件夹,包含上传/下载、创建文件夹、复制/移动/删除、查看元数据、查询权限设置、评论/权限/订阅、标题、版本、飞书文档密级标签(secure labels)和本地文件导入。用户需要整理云盘目录、处理云空间资源 URL/token、判断链接类型/真实 token/标题,或导入 Word/Markdown/Excel/CSV/PPTX/.base 为 docx/sheet/bitable/slides 时使用;doubao.com 云空间 URL/token 也按资源路径和 token 路由,不回退 WebFetch。不负责:文档内容编辑(走 lark-doc)、表格/Base 表内数据操作(走 lark-sheets/lark-base)、知识空间节点/成员管理(走 lark-wiki)、原生 Markdown 文件读写/patch/diff(走 lark-markdown)。
lark-shared
open.feishu.cn
Use for lark-cli setup/auth tasks: auth login/status/logout, user vs bot identity, business-domain permissions (--domain, including all/docs/drive), missing scopes, revoking authorization, or handling notice JSON.
lark-im
open.feishu.cn
飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件、管理表情回复、发送应用内/短信/电话加急、发送和处理交互卡片(Interactive Card)、监听卡片按钮回调(card.action.trigger)。当用户需要发消息、查看或搜索聊天记录、下载聊天中的文件、查看群成员、搜索群、创建群聊或话题群、管理标记数据、管理 Feed 置顶(添加/移除/查询置顶会话)、管理标签数据、处理卡片回调时使用。