Mode B Patent Plain Reading: Automated Patent-to-Summary Pipeline Explained

Mode B (Patent Plain Reading) is a six-stage automated workflow in the handsomestWei/patent-disclosure-skill repository that transforms raw patent documents into plain-language Obsidian notes and visual Mermaid graphs.

The patent-disclosure-skill project provides specialized LLM-driven tools for patent analysis. Mode B, documented as entry "B · 专利通俗解读" in SKILL.md, implements the Patent Plain Reading pipeline that converts complex patent PDFs, URLs, or raw text into human-readable summaries and structured visualizations.

What Is Mode B Patent Plain Reading?

Mode B is the plain-reading pipeline that automates the extraction, summarization, and visualization of patent documents. According to SKILL.md, it serves as the "B" mode selector in the skill's feature matrix, specifically designed to generate accessible summaries for China public-access patents. The workflow handles everything from document retrieval to final storage in an Obsidian vault, producing both a textual summary and a graphical representation of the invention's core concepts.

The Six-Stage Pipeline Architecture

The Patent Plain Reading workflow executes sequentially through six distinct stages, each handled by specific modules in the repository.

Stage A – Gate: Input Validation

The pipeline begins by validating the input source. The system checks whether the input is a public-access URL, a local PDF path, or raw patent text. This gate logic is defined in prompts/reader/patent_plain_reader.md, which determines if the plain-reading pipeline should activate based on the input type.

Stage B – Fetch: Document Retrieval

Once validated, the system retrieves the patent document. The module tools/patent_reader/extract/fetch_patent_pdf.py handles HTTP downloads from public patent databases or loads files from local filesystem paths. This stage ensures the raw binary content is available for text extraction.

Stage C – Extract: Content Parsing

The extraction stage parses the fetched document using tools/patent_reader/extract/extract_patent_text.py. This module processes PDF or HTML formats to isolate the full text, claims section, abstract, and embedded figures. The output is a structured text corpus ready for LLM consumption.

Stage D – Plain-Read: LLM Generation

The core transformation occurs in this stage. The extracted data is fed into the LLM prompt defined in prompts/reader/patent_plain_reader.md. The model generates three critical outputs:

  • A plain-language summary translating technical jargon into accessible language
  • A status flag set to status=agent_fetched indicating successful retrieval
  • A graph-ready JSON structure encoding the invention's key entities and relationships

Stage E – Store: Vault Persistence

The generated content is persisted to storage via tools/patent_reader/vault/write_patent_obsidian_note.py. This module writes the LLM output into an Obsidian-compatible note structure, typically targeting the configured vault location. The note includes the plain-text summary and metadata flags.

Stage F – Graph: Visualization Rendering

Finally, tools/shared/mermaid_render.py converts the JSON graph data into a Mermaid diagram. This visual "patent graph" attaches to the Obsidian note, providing a schematic view of the invention's components and their interactions.

How to Invoke Mode B Patent Plain Reading

Triggering the pipeline requires invoking the skill's Read command with the plain-reader prompt. The mode selector in SKILL.md automatically routes to Mode B when this prompt is specified.

Prepare your input as a public patent URL, local PDF path, or raw text block, then execute:

python skill.py Read \
    --prompt prompts/reader/patent_plain_reader.md \
    --input https://patents.google.com/patent/CN1123456A/en

The system logs progress to stdout as it progresses through fetch, extract, and generation stages. Upon completion, the resulting note appears in your Obsidian vault containing the plain-language summary, the agent_fetched status flag, and the rendered Mermaid graph.

Programmatic Integration

You can also invoke Mode B components directly from Python for custom workflows:

from tools.patent_reader.extract.fetch_patent_pdf import fetch_pdf
from tools.patent_reader.extract.extract_patent_text import extract_text
from tools.patent_reader.vault.write_patent_obsidian_note import write_note
from prompts.reader.patent_plain_reader import plain_reader_prompt
from utils.llm import call_llm

# Fetch patent document

pdf_path = fetch_pdf('https://patents.google.com/patent/CN1123456A/en')

# Extract structured text

raw_text = extract_text(pdf_path)

# Build and send LLM prompt

prompt = plain_reader_prompt.format(input_text=raw_text)
response = call_llm(prompt)  # Returns summary + graph JSON

# Persist to Obsidian vault

write_note(patent_id='CN1123456A', llm_output=response)

This approach allows integration into larger automation systems while maintaining the fullplain-reading functionality.

Key Configuration Files

Understanding these source files is essential for customizing Mode B behavior:

Summary

  • Mode B Patent Plain Reading is a specialized workflow in handsomestWei/patent-disclosure-skill that automates patent document simplification.
  • The pipeline executes six stages: Gate, Fetch, Extract, Plain-Read, Store, and Graph, orchestrated through SKILL.md configuration.
  • Input sources include public patent URLs, local PDFs, or raw text, processed via fetch_patent_pdf.py and extract_patent_text.py.
  • Output consists of Obsidian vault notes containing plain-language summaries, status=agent_fetched metadata, and Mermaid visualizations generated by mermaid_render.py.
  • Invocation occurs via CLI using skill.py Read --prompt prompts/reader/patent_plain_reader.md or programmatically through the Python API.

Frequently Asked Questions

What input formats does Mode B Patent Plain Reading support?

Mode B accepts three input types: public-access patent URLs (such as Google Patents links), local PDF file paths, and raw patent text strings. The Gate stage in patent_plain_reader.md automatically detects the input type and routes it to fetch_patent_pdf.py for remote retrieval or direct processing for local files.

Where does Mode B store the generated summaries?

The write_patent_obsidian_note.py module persists output to a configured Obsidian vault. By default, the system writes to the vault's structured storage layer, embedding the plain-language summary in the note's summary field alongside the Mermaid graph visualization and the status=agent_fetched flag indicating successful processing.

Can I customize the plain-language output style?

Yes. Edit prompts/reader/patent_plain_reader.md to adjust the LLM's tone, technical depth, or output structure. This prompt file controls the generation of both the narrative summary and the graph JSON schema. Changes apply immediately on the next invocation of the Read command without requiring code modification.

What is the status=agent_fetched flag?

The status=agent_fetched value is a metadata flag injected by the Plain-Read stage to indicate that the LLM successfully processed fetched patent data rather than returning cached or synthetic content. The write_patent_obsidian_note.py tool preserves this flag in the final Obsidian note, enabling downstream workflows to verify data provenance and freshness.

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 →