How the Patent‑Disclosure‑Skill Solves the "Know‑How But Not How to Write Patents" Problem

The patent‑disclosure‑skill bridges the gap between technical expertise and patent drafting by automating an eight‑step workflow that transforms raw engineering knowledge into a complete, legally‑formatted Chinese patent disclosure without requiring users to learn patent law or writing conventions.

Engineers and developers often possess deep technical know‑how but struggle to articulate their inventions in the structured, formal language required by patent offices. The handsomestWei/patent‑disclosure‑skill eliminates this barrier through a deterministic, tool‑driven pipeline that guides users from initial concept to submission‑ready document. Every step is backed by reusable prompts, automated tooling, and CNIPA‑compliant templates.

The Eight‑Step Solution Architecture

The skill operates as a deterministic workflow rather than an open‑ended conversation. Each step is implemented through specific files in the repository, ensuring reproducible results across different technical domains.

Step 1: Intake and Boundary Definition

The workflow begins with prompts/intake.md, which captures the project's domain, desired patent type (invention, utility model, or design), and contact information through a concise questionnaire. If the user omits the patent type, the system defaults to invention—the most common and comprehensive protection type.

This forced articulation makes the hidden inventive concept explicit. Users must distill their technology into a single sentence, which the system then uses to anchor all subsequent analysis.

Step 2: Automatic Project Scanning

The project_scan.md module reads source files—including code, documentation, and presentation materials—and converts them to Markdown. From this unified representation, the skill extracts technical elements such as modules, algorithms, data flows, and system architectures.

This automation removes the manual "inventory" phase that typically stalls non‑patent professionals.

Step 3: Patent‑Point Mining

For each patent category, dedicated prompt sets enumerate candidate inventive points:

  • prompts/invention/ — for technical solutions solving technical problems
  • prompts/utility_model/ — for structural improvements with practical utility
  • prompts/design/ — for ornamental appearances of industrial products

These candidate points are merged into a coherent set of inventive concepts that form the backbone of the disclosure.

Step 4: Line‑Art and CAD Generation

Visual assets are mandatory for utility models and design patents. The skill generates clean line drawings through two specialized gates:

The pipeline can ingest user‑provided assets or invoke a built‑in CAD‑to‑vector renderer when source files are unavailable.

The tools/crawl/cnipa_epub_search.py module executes a two‑stage search of the China National Intellectual Property Administration (CNIPA) e‑publication site via Playwright:

  1. First stage: Issues 2–8 keyword queries, retrieving one page per keyword
  2. Second stage: Refines results using IPC/LOC classification codes extracted from first‑stage hits

This mimics the search strategy of experienced patent searchers without requiring users to understand classification systems.

Step 6: Disclosure Drafting

The prompts/disclosure_builder.md module populates pre‑crafted Markdown templates with:

  • Mined inventive points from Step 3
  • Generated line‑art from Step 4
  • Prior‑art citations from Step 5

Templates are split into mandatory sections: technical field, background art, summary of invention, detailed description, and claims framework—all structured to meet CNIPA standards.

Step 7: Self‑Check and Iteration

The prompts/iteration_context.md module runs automated sanity checks for:

  • Logical consistency between problems and solutions
  • Proper formatting of formulas and equations
  • Correct numbering of figures and embodiments

Corrections and supplemental materials are stored as new timestamped files via tools/iteration_dialog_log.py, preserving complete audit trails.

Step 8: Output Packaging

The final tools/md_to_docx.py module renders the Markdown disclosure into a polished Word document (DOCX) with proper styling, plus companion Mermaid diagrams for system flows. Files are named with the case name and timestamp for version control.

Why This Solves the Core Problem

The "know‑how but not how to write patents" challenge manifests in five specific friction points—each addressed by the skill's design:

Friction Point Skill Solution
Inability to articulate the inventive concept Forced single‑sentence articulation in intake prompts
Lack of search expertise Automated two‑stage CNIPA search with IPC/LOC extraction
Unfamiliarity with visual requirements Scripted line‑art generation for all patent types
Ignorance of formal structure Template‑driven drafting with mandatory section enforcement
Risk of technical errors Automated self‑check with timestamped iteration logging

Practical Workflow Example

The following commands demonstrate how an Agent invokes the full disclosure pipeline:


# 1. Ensure browser engine is available for web crawling

python skills/patent-disclosure/tools/browser.py --probe

# 2. Execute prior-art search for distributed scheduling technology

python skills/patent-disclosure/tools/crawl/cnipa_epub_search.py \
    --type invention \
    分布式 调度 任务队列

# 3. Convert final disclosure to submission-ready Word document

python skills/patent-disclosure/tools/md_to_docx.py \
    -i outputs/patent-disclosure/<timestamp>.md \
    -o outputs/patent-disclosure/<timestamp>.docx

The search tool outputs a JSON line prefixed with EPUB_HITS_JSON: containing deduplicated prior‑art references, which the drafting module consumes automatically.

Key Implementation Files

File Purpose
SKILL.md Entry point mapping eight steps to concrete prompts and tools
prompts/intake.md Patent type selection and core technology articulation
prompts/prior_art_search.md Two‑stage CNIPA search protocol with Google Patents fallback
tools/crawl/cnipa_epub_search.py Playwright‑driven search implementation with JSON output contract
tools/md_to_docx.py Markdown-to-Word conversion with CNIPA‑compliant styling
prompts/iteration_context.md Self‑check logic and correction handling
tools/structure_lineart_gate.py / tools/design_lineart_gate.py Automated line‑art generation

Summary

  • Structured conversation through forced‑choice intake eliminates ambiguous starting points
  • Automated heavy‑lifting covers search, visualization, and formatting that non‑experts cannot perform manually
  • Template enforcement guarantees CNIPA compliance without user knowledge of patent formalities
  • Modular isolation allows users to invoke only the disclosure flow without contamination from other patent tasks
  • Deterministic reproducibility ensures consistent output quality across different technical domains

Frequently Asked Questions

Does the skill support English patent applications?

The current implementation targets Chinese patent disclosure (交底书) for CNIPA submission. The templates, search tools, and output formatting are optimized for Chinese patent practice. English support would require parallel prompt sets and jurisdiction‑specific templates.

What technical domains work best with the automated project scan?

The project_scan.md module handles source code repositories, technical documentation, and presentation files universally. It performs particularly well on software architectures, mechanical CAD assemblies, and electrical system diagrams—domains where structural elements map cleanly to patent claims.

How does the prior‑art search compare to professional patent search services?

The cnipa_epub_search.py tool provides lightweight, automated coverage of CNIPA's open publication database. It matches the retrieval depth of a preliminary search but lacks the interpretive analysis of a professional searcher. Users should treat results as a starting point; critical filings may warrant supplemental professional search.

Can the skill handle design patents for non‑mechanical products?

Yes. The tools/design_lineart_gate.py module accepts any product category supported by the user's input assets or CAD files. The LOC (Locarno Classification) extraction in the prior‑art search adapts to ornamental designs across all industrial product classes.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →