Patent‑Reader Sub‑Skill: How It Delivers AI‑Powered Patent Interpretation in Obsidian
The patent‑reader sub‑skill converts patent documents into interactive Obsidian notes featuring plain‑language summaries, Mermaid claim trees, and optional Canvas graphs through a four‑layer pipeline of extraction, type detection, analysis, and vault integration.
The patent‑reader sub‑skill in the handsomestWei/patent‑disclosure‑skill repository transforms complex patent publications into structured, visually rich Obsidian notes. By combining automated data extraction, LLM‑driven interpretation, and native Obsidian features like Dataview and Canvas, it eliminates the friction of manually parsing technical disclosures.
Four‑Layer Patent Interpretation Pipeline
The sub‑skill organizes its workflow into four logical layers orchestrated by CLI tools and Markdown prompts.
Layer 1: Extraction — Raw Patent Data Acquisition
The extract directory contains tools that pull patent materials from CNIPA and other sources:
fetch_patent_pdf.py— Downloads publication PDFs from CNIPAfetch_design_views.py— Retrieves design patent imagesextract_patent_text.py— Converts PDF text to clean Markdownextract_patent_figures.py— Isolates technical drawings as separate assets
These scripts standardize disparate input formats (PDF, HTML, raw text) into a unified working directory structure under outputs/patent_reader/.
Layer 2: Type‑Specific Schema Selection
The patent type detection system ensures interpretation templates match the document structure:
patent_type.py— Auto‑detects type from publication number patterns (CN…A= invention,CN…U= utility model,CN…S= design)- Writes
structure_schema.json(invention/utility) orappearance_schema.json(design) to guide downstream prompts
The type‑hooks prompt at patent_reader/prompts/type_hooks.md merges these schemas into the LLM context.
Layer 3: Analysis & Visual Rendering
This layer constructs the interpretive elements that appear in the final Obsidian note:
| Tool | Purpose |
|---|---|
analyze/build_claim_mermaid.py |
Generates Mermaid syntax for hierarchical claim trees |
analyze/validate_claim_tree.py |
Ensures Mermaid syntax validity before embedding |
analyze/lint_patent_note.py |
Validates required front‑matter fields (ipc, confidence_speculative) |
The Mermaid diagrams render natively in Obsidian, enabling collapsible, navigable claim structures without external dependencies.
Layer 4: Vault Integration — Obsidian‑Native Output
The vault directory handles final note assembly and environment setup:
check_obsidian_env.py— Validates vault path configuration and installs CSS snippetswrite_patent_obsidian_note.py— Assembles the complete Markdown note with front‑matterbuild_patent_canvas.py— Creates Canvas graphs linking related patentslink_patent_notes.py— Establishes bidirectional backlinks for graph navigation
Step‑by‑Step Patent Interpretation Workflow
Environment Preparation
Before first use, validate your Obsidian vault configuration:
python skills/patent-reader/tools/vault/check_obsidian_env.py --auto-accept
This copies patent-reader.css into .obsidian/snippets/ and confirms the vault path is registered.
Data Acquisition and Type Detection
Fetch a patent PDF and detect its type:
# Download patent from CNIPA
python skills/patent-reader/tools/extract/fetch_patent_pdf.py \
--pub CN119961396A \
-o outputs/patent_reader/run1
# Generate type‑specific schema
python skills/patent-reader/tools/patent_type.py --pub CN119961396A
Complete Pipeline Execution
Run the full interpretation pipeline to generate an Obsidian note:
python skills/patent-reader/tools/vault/write_patent_obsidian_note.py \
--pub CN119961396A \
--vault-path "/path/to/Your Obsidian Vault"
This single command chains extraction → analysis → vault integration, producing a note at Research/Patents/CN119961396A.md.
LLM‑Driven Plain‑Language Interpretation
The core interpretive work happens in prompts/patent_plain_reader.md, which instructs the LLM to generate:
- Plain‑language summary — Technical disclosure translated for non‑specialists
- Claims explanation — Independent and dependent claims with scope analysis
- Low‑confidence clues — Flagged interpretations requiring human verification
- Mermaid claim tree — Hierarchical visualization of claim dependencies
The prompt respects the schema files from Layer 2, ensuring invention patents receive novelty analysis while design patents prioritize visual feature comparison.
Obsidian‑Specific Features and Styling
CSS Class Integration
Every generated note includes front‑matter that activates custom styling:
---
cssclasses: patent-reader
ipc: H01L 21/02
confidence_speculative: medium
---
The patent-reader.css snippet provides:
- Distinctive claim block formatting
- Confidence‑level color coding
- Optimized Mermaid diagram containers
Optional Plugin Enhancements
After note creation, the sub‑skill surfaces obsidian_plugin_guide.md, recommending:
- Dataview — Query patent notes by IPC, confidence level, or publication date
- Canvas — Visualize patent families and prior‑art relationships
- Graph View — Navigate via auto‑generated backlinks from
link_patent_notes.py
Key Source Files and Their Roles
| File Path | Function |
|---|---|
skills/patent-reader/tools/extract/fetch_patent_pdf.py |
CNIPA PDF download |
skills/patent-reader/tools/patent_type.py |
Publication number analysis and schema selection |
skills/patent-reader/tools/analyze/build_claim_mermaid.py |
Mermaid diagram generation |
skills/patent-reader/tools/vault/write_patent_obsidian_note.py |
Final note assembly |
skills/patent-reader/prompts/patent_plain_reader.md |
LLM interpretation instructions |
skills/patent-reader/assets/patent_note_template.md |
Base template with cssclasses front‑matter |
skills/patent-reader/docs/obsidian-setup-guide.md |
User installation and plugin configuration |
Summary
- The patent‑reader sub‑skill converts patents into Obsidian notes through a four‑layer pipeline: extraction, type detection, analysis, and vault integration
- Type‑specific schemas auto‑generated from publication numbers ensure interpretation templates match invention, utility model, or design patent structures
- Mermaid claim trees and Canvas graphs provide visual navigation of complex claim hierarchies
- CSS snippet integration via
cssclasses: patent-readerfront‑matter delivers consistent, polished formatting - Single‑command execution through
write_patent_obsidian_note.pywraps the complete workflow
Frequently Asked Questions
What input formats does the patent‑reader sub‑skill accept?
The sub‑skill accepts publication numbers (auto‑fetched from CNIPA), local PDF files, and raw patent text. The fetch_patent_pdf.py and extract_patent_text.py tools in the extract directory standardize all inputs into a common working directory structure before interpretation begins.
How does the sub‑skill handle different patent types?
patent_type.py detects patent type from publication number suffixes—A for invention patents, U for utility models, and S for design patents—then writes the appropriate JSON schema (structure_schema.json or appearance_schema.json). The LLM prompt incorporates this schema to generate type‑appropriate interpretations.
What Obsidian plugins are recommended for the full experience?
The sub‑skill recommends Dataview for querying patent metadata, Canvas for visual relationship graphs, and native Graph View for backlink navigation. The obsidian_plugin_guide.md prompt provides installation instructions after note generation.
Can I customize the visual styling of generated notes?
Yes. The assets/patent_note_template.md provides the base structure, while patent-reader.css in the snippets directory controls all visual formatting. Modify the CSS or template files to match your vault's theme—changes apply to all subsequently generated patent notes.
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:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →