patent-pipeline skill
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.
Is the patent-pipeline skill safe?
Clean: nothing in its files matched our rules. We read 1 file in the folder on 2026-09-28.
No findings.
Install the patent-pipeline skill
A skill is a folder. Copy it into your agent's skills folder and the agent loads it when the task matches its description.
git clone --depth 1 https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep.git /tmp/Auto-claude-code-research-in-sleep mkdir -p ~/.claude/skills cp -r /tmp/Auto-claude-code-research-in-sleep/skills/patent-pipeline ~/.claude/skills/patent-pipeline
In the Claude apps, zip the folder and upload it from the Skills settings. The folder on GitHub
The instructions your agent would load
SKILL.md as published, without the frontmatter. Read it on GitHub
Patent Pipeline: From Invention to Filing
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-descriptionThis 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").
- PATENTTYPE = invention — invention (发明专利, 20 year protection) or utilitymodel (实用新型, CN only, 10 year protection, apparatus claims only). Override via argument.
- REVIEWERMODEL = gpt-6-astra** — Model used via Codex MCP for examiner-style review.
- MAXREVIEWROUNDS = 2 — Maximum review-revision cycles.
- AUTOPROCEED = false — At each checkpoint, always wait for explicit user confirmation**. Patent applications require inventor judgment at every stage. Set true only if user explicitly requests autonomous mode.
- LANGUAGE = auto — Output language. Auto-detected from jurisdiction: CN->Chinese, US->English, EP->English. Override explicitly if needed.
- OUTPUTDIR = patent/** — Directory for generated patent files.
- OUTPUTFORMAT = markdown** — Draft format. markdown for review, docx for filing-ready.
Override defaults via arguments: /patent-pipeline "invention — US, utility model" or /patent-pipeline "invention — ALL, language: Chinese".
Patent Type Specifications
Invention Patent (发明专利)
Utility Model (实用新型) — CN 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: "inprogress" 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 INVENTIONBRIEF.md), conversational with figures, or output from IDEAREPORT.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.md if it exists (user filled in the template)
- Read IDEA_REPORT.md if it exists (from /idea-discovery -- can extract invention from research results)
- Read refine-logs/FINAL_PROPOSAL.md if it exists
- Read NARRATIVE_REPORT.md if 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.
More skills from wanshuiyin/Auto-claude-code-research-in-sleep
- Aablation-plannerUse when main results pass result-to-claim (claim_supported=yes or partial) and ablation studies are needed for paper submission.
- Aablation-plannerUse when main results pass result-to-claim (`claim_supported = yes` or `partial`) and ablation studies are needed for paper submission. A secondary Codex agent designs ablations from a reviewer's perspective; the local executor reviews feasibility and implements.
- AalphaxivQuick single-paper lookup via AlphaXiv LLM-optimized summaries with tiered source fallback. Use when user says "explain this paper", "summarize paper", pastes an arXiv/AlphaXiv URL, or provides a bare arXiv ID for quick understanding - not for broad literature search.
- AalphaxivQuick single-paper lookup via AlphaXiv LLM-optimized summaries with tiered source fallback. Use when user says "explain this paper", "summarize paper", pastes an arXiv/AlphaXiv URL, or provides a bare arXiv ID for quick understanding - not for broad literature search.
- Aanalyze-resultsAnalyze ML experiment results, compute statistics, generate comparison tables and insights. Use when user says "analyze results", "compare", or needs to interpret experimental data.
- Aanalyze-resultsAnalyze ML experiment results, compute statistics, generate comparison tables and insights. Use when user says \"analyze results\", \"compare\", or needs to interpret experimental data.
- AarxivSearch, 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.
- AarxivSearch, 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.
- Aauto-paper-improvement-loopAutonomously improve a generated paper via GPT-6-Astra xhigh review → implement fixes → recompile, for 2 rounds. Use when user says \"改论文\", \"improve paper\", \"论文润色循环\", \"auto improve\", or wants to iteratively polish a generated paper.
- Aauto-paper-improvement-loopAutonomously improve a generated paper via Claude review through claude-review MCP → implement fixes → recompile, for 2 rounds. Use when user says \"改论文\", \"improve paper\", \"论文润色循环\", \"auto improve\", or wants to iteratively polish a generated paper.
- Aauto-paper-improvement-loopAutonomously improve a generated paper via Gemini review through gemini-review MCP → implement fixes → recompile, for 2 rounds. Use when user says \"改论文\", \"improve paper\", \"论文润色循环\", \"auto improve\", or wants to iteratively polish a generated paper.
- Aauto-paper-improvement-loopAutonomously improve a generated paper via GPT-6-Astra xhigh review → implement fixes → recompile, for 2 rounds. Use when user says \"改论文\", \"improve paper\", \"论文润色循环\", \"auto improve\", or wants to iteratively polish a generated paper.