# Prerequisites for Running patent-disclosure-skill: Complete Setup Guide

> Learn the essential prerequisites for running patent-disclosure-skill. Discover required software like Python 3.9+, pip, and a Chromium browser for successful setup.

- Repository: [handsomestWei/patent-disclosure-skill](https://github.com/handsomestWei/patent-disclosure-skill)
- Tags: getting-started
- Published: 2026-09-01

---

**To run patent-disclosure-skill successfully, you need Python 3.9 or newer, pip, a Chromium-based browser (Chrome, Edge, or Playwright-installed Chromium), and optionally separate virtual environments for CAD STEP parsing and Obsidian vault integration.**

The *patent-disclosure-skill* is an **AgentSkills**-based automation framework designed for patent drafting, prior-art search, and Office Action (OA) assistance. Before invoking the skill from hosts like Claude or Cursor via [`SKILL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/SKILL.md), you must configure a Python-centric environment with specific browser dependencies and optional tooling extensions as documented in [`INSTALL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/INSTALL.md).

## Core Runtime Requirements

The foundation of the skill is a standard Python installation with package management capabilities.

- **Python 3.9+ (64-bit)**: All scripts, prompts, and skill orchestration logic are pure Python. The runtime requires version 3.9 or higher according to [`INSTALL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/INSTALL.md).
- **pip**: Required to install dependencies from the various [`requirements.txt`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/requirements.txt) files located throughout the repository.

## Essential Python Dependencies

The skill uses multiple requirement files to separate core functionality from optional tools. You must install at least the core dependencies, then add others based on your use case.

**Core dependencies** ([`requirements.txt`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/requirements.txt)):

```bash
pip install -r requirements.txt

```

This installs critical packages including `python-docx` for Word document generation, `playwright` for browser automation, and `latex2mathml` for formula rendering.

**Optional tool-specific dependencies**:

```bash

# For CNIPA EPUB prior-art search

pip install -r tools/crawl/requirements-cnipa.txt

# For Office Action (OA) case handling and RAG workflows

pip install -r tools/oa/requirements-oa.txt

# For PDF patent extraction

pip install -r tools/patent_reader/requirements.txt

```

## Browser Engine and Playwright Configuration

The skill requires a **Chromium-based browser** for rendering Mermaid diagrams, extracting PDF content, and performing CNIPA-EPUB searches. Without a browser, the skill can still generate Markdown, but images and Word document diagrams will be missing.

**Option 1**: Use existing system browsers (Google Chrome or Microsoft Edge installed on the host).

**Option 2**: Install Chromium via Playwright:

```bash
python -m playwright install chromium

```

**Verify your setup** using the browser probe utility:

```bash
python tools/shared/browser.py --probe

```

This command reports whether Chrome, Edge, or Playwright Chromium is available. Run the install command above only if the probe returns `ok=false`.

## Optional Advanced Components

### CAD STEP File Processing

To enable ingestion of `.step` or `.stp` files for utility-model patents (producing multi-view isometric projections), you need a **separate virtual environment** with **CadQuery** (Python 3.10–3.12) plus system Cairo libraries.

Run the bootstrap scripts:

```bash
python tools/shared/cad_venv.py
python tools/shared/bootstrap_cad_venv.py

```

### Obsidian Vault Integration

For the "Patent Reader" mode that provides rich knowledge-graph and Canvas features, you need a local **Obsidian** vault with optional community plugins like Dataview.

Set the environment variable and verify:

```bash
export PATENT_READER_OBSIDIAN_VAULT="$HOME/Obsidian/MyVault"
python tools/patent_reader/vault/check_obsidian_env.py --auto-accept

```

Without Obsidian, the skill falls back to writing output to the `outputs/patent_reader/` folder.

### OA Vector Store and Embeddings

For the RAG-style "审查答复" (OA) workflow that retrieves similar past cases, configure an API key in [`tools/oa/config.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/tools/oa/config.py). Supported services include ZhipuAI, DashScope, OpenAI, and MiniMax, or you can use a local embedding model.

## Step-by-Step Installation Workflow

Follow this sequence to prepare the environment:

```bash

# 1️⃣ Clone the repo into your skills folder

git clone https://github.com/handsomestWei/patent-disclosure-skill.git ~/.cursor/skills/patent-disclosure-skill

# 2️⃣ Install core Python dependencies

pip install -r requirements.txt

# 3️⃣ Verify browser availability; install Chromium if needed

python tools/shared/browser.py --probe
python -m playwright install chromium  # Only if probe reports no browser

# 4️⃣ (Optional) Install CNIPA crawler for prior-art search

pip install -r tools/crawl/requirements-cnipa.txt

# 5️⃣ (Optional) Setup CAD environment for STEP files

python tools/shared/cad_venv.py
python tools/shared/bootstrap_cad_venv.py

# 6️⃣ (Optional) Configure Obsidian vault path

export PATENT_READER_OBSIDIAN_VAULT="$HOME/Obsidian/MyVault"

```

Once satisfied, invoke the skill via your AgentSkills host using the entry point defined in [`SKILL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/SKILL.md). The skill automatically locates prompts, executes Python tools from the `tools/` directory, and outputs artifacts to `outputs/` or directly into your Obsidian vault.

## Summary

- **Python 3.9+** and **pip** are mandatory for all skill operations.
- **Chromium-based browser** (Chrome, Edge, or Playwright Chromium) is required for diagram rendering and PDF extraction; verify with [`tools/shared/browser.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/tools/shared/browser.py).
- **Core dependencies** live in [`requirements.txt`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/requirements.txt), while specialized tools have their own requirement files in `tools/crawl/`, `tools/oa/`, and `tools/patent_reader/`.
- **Optional CAD support** requires Python 3.10–3.12 in an isolated virtual environment managed by [`tools/shared/cad_venv.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/tools/shared/cad_venv.py).
- **Optional Obsidian integration** requires the `PATENT_READER_OBSIDIAN_VAULT` environment variable and the check script [`tools/patent_reader/vault/check_obsidian_env.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/tools/patent_reader/vault/check_obsidian_env.py).
- **OA RAG functionality** requires embedding service configuration in [`tools/oa/config.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/tools/oa/config.py).

## Frequently Asked Questions

### Can I run patent-disclosure-skill without installing a browser?

Yes, but with degraded functionality. Without Chrome, Edge, or Playwright Chromium, the skill cannot render Mermaid diagrams to PNG, extract content from certain PDFs, or perform CNIPA-EPUB searches. It will still generate Markdown text and Word documents, but visual diagrams will be missing according to the [`INSTALL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/INSTALL.md) documentation.

### What Python version is required for CAD STEP file processing?

The CAD STEP parsing feature requires **Python 3.10 to 3.12** specifically, distinct from the core Python 3.9+ requirement. This runs in an isolated virtual environment created by [`tools/shared/cad_venv.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/tools/shared/cad_venv.py) and initialized via [`tools/shared/bootstrap_cad_venv.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/tools/shared/bootstrap_cad_venv.py) to avoid dependency conflicts with the main skill environment.

### How do I verify my browser setup before running the skill?

Execute the probe command `python tools/shared/browser.py --probe` from the repository root. This script checks for system Chrome or Edge installations and Playwright status. If it reports `ok=false`, install the fallback with `python -m playwright install chromium` to ensure headless browser automation functions correctly for diagram rendering and crawling tasks.

### Where do I configure API keys for the OA RAG feature?

Embedding service API keys (ZhipuAI, DashScope, OpenAI, or MiniMax) are configured in [`tools/oa/config.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/tools/oa/config.py). This configuration powers the vector-store similarity search for "审查答复" (Office Action) cases, enabling the skill to retrieve relevant historical responses when processing new OA workflows.