# How to Install the Patent-Disclosure-Skill: A Complete Setup Guide for Claude and Cursor

> Install the patent-disclosure-skill with this complete guide. Clone the repo, install dependencies, and set up Playwright browsers for Claude and Cursor.

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

---

**To install the patent-disclosure-skill, clone the repository into your agent's skills directory (e.g., `~/.claude/skills/` or `~/.cursor/skills/`), install Python dependencies with `pip install -r requirements.txt`, and verify the Playwright browser setup with `python tools/shared/browser.py --probe`.**

The **patent-disclosure-skill** is an open-source AgentSkills project maintained in the `handsomestWei/patent-disclosure-skill` repository. It automates invention disclosure drafting, prior art searches, and patent document conversion for AI coding agents. Because it follows the standard AgentSkills layout, installation requires placing files in specific directories, installing Python runtime dependencies, and configuring optional components like headless browsers and CAD environments.

## Step 1: Placing the Skill in the Correct Directory

The skill must reside in a recognized skills folder so Claude or Cursor can load the [`SKILL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/SKILL.md) manifest. According to [`INSTALL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/INSTALL.md), the placement depends on your platform:

**For Claude-based agents:**
- Place the repository under `.claude/skills/`
- Set the environment variable `CLAUDE_SKILL_DIR` to point to the folder containing [`SKILL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/SKILL.md)

**For Cursor:**
- **Windows:** `%USERPROFILE%\.cursor\skills\patent-disclosure-skill\`
- **macOS/Linux:** `~/.cursor/skills/patent-disclosure-skill/`
- **Project-local:** `<project-root>/.cursor/skills/patent-disclosure-skill/`
- Set `CURSOR_SKILL_DIR` to the skill root

Clone the repository to the appropriate location:

```bash
mkdir -p ~/.claude/skills
git clone https://github.com/handsomestWei/patent-disclosure-skill.git \
    ~/.claude/skills/patent-disclosure-skill

```

## Step 2: Installing Python Dependencies

The repository uses modular requirement files to keep optional dependencies separate. Navigate to the skill root and install the core packages first:

```bash
cd ~/.claude/skills/patent-disclosure-skill
pip install -r requirements.txt

```

The core [`requirements.txt`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/requirements.txt) includes essential libraries such as `python-docx`, `latex2mathml`, `PyYAML`, `playwright`, `mammoth`, and `python-pptx`. For extended functionality, install optional dependency sets:

```bash

# CNIPA crawler for prior art searches (Step 5 workflows)

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

# Office-action (OA) support for mode D workflows

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

```

## Step 3: Configuring the Browser Environment

The skill relies on **Playwright** to render Mermaid diagrams and scrape the CNIPA website. After installing Python packages, verify that a system browser is accessible:

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

```

If the probe returns `ok=true`, Playwright can detect your system Chrome or Edge. If not, install the bundled Chromium:

```bash
python -m playwright install chromium

```

The [`tools/shared/browser.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/tools/shared/browser.py) module handles browser discovery and launch configuration for both diagram generation and web scraping tasks.

## Step 4: Optional Components

Depending on your workflow, you may need to configure additional environments.

### CAD Environment for STEP File Parsing

If you need to parse mechanical CAD files, prepare the isolated CAD virtual environment. The tools require Python 3.10–3.12 and reside in `tools/shared/cad-env`:

```bash

# Detect existing environment

python tools/shared/cad_venv.py

# Create or activate if missing

python tools/shared/bootstrap_cad_venv.py

```

The skill will prompt before enabling these tools; they are not installed automatically to keep the footprint minimal.

### Obsidian Vault for Reading Mode

For full-featured patent reading and case-library support, configure the Obsidian vault path:

```bash
python tools/patent_reader/vault/check_obsidian_env.py --auto-accept

```

This helper script validates and sets the vault location used by the patent reader mode defined in [`SKILL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/SKILL.md).

## Verifying Your Installation

Confirm that all components are functional by running the browser probe again:

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

```

You should see `ok=true` indicating Playwright can launch. Test the conversion pipeline by rendering a Mermaid diagram to PNG:

```bash
python tools/shared/mermaid_render.py -i outputs/case/3.4.mermaid -o outputs/case/3.4.png

```

Or generate a Word document with math rendering:

```bash
python tools/shared/md_to_docx.py -i final.md -o final.docx --math-render

```

If you installed the CNIPA crawler, test it with:

```bash
python tools/crawl/cnipa_epub_search.py --type utility_model "电动汽车"

```

## Summary

- **Clone** the repository into `~/.claude/skills/` (Claude) or `~/.cursor/skills/` (Cursor) so the agent can locate [`SKILL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/SKILL.md).
- **Install** core dependencies via [`requirements.txt`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/requirements.txt), then add [`requirements-cnipa.txt`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/requirements-cnipa.txt) or [`requirements-oa.txt`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/requirements-oa.txt) for optional features.
- **Verify** the Playwright setup using `python tools/shared/browser.py --probe` and install Chromium if system browsers are unavailable.
- **Configure** optional components (CAD virtualenv, Obsidian vault) only when needed for STEP parsing or advanced reading workflows.

## Frequently Asked Questions

### What is the difference between Claude and Cursor installation paths?

Claude requires the skill to live under `.claude/skills/`, while Cursor supports both user-global paths (`~/.cursor/skills/` or `%USERPROFILE%\.cursor\skills\`) and project-local paths (`<project-root>/.cursor/skills/`). Both agents use environment variables—`CLAUDE_SKILL_DIR` and `CURSOR_SKILL_DIR`—to locate the skill root containing [`SKILL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/SKILL.md), but Cursor offers more flexibility for per-project customization.

### Do I need to install Chromium if I already have Chrome or Edge?

No. If `python tools/shared/browser.py --probe` returns `ok=true`, Playwright will use your existing Chrome or Edge installation. You only need to run `python -m playwright install chromium` if the probe reports that no system browser is discoverable.

### What Python version is required for the CAD environment?

The CAD tools in `tools/shared/cad-env` require **Python 3.10–3.12**. These tools are isolated in a separate virtual environment created by [`tools/shared/bootstrap_cad_venv.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/tools/shared/bootstrap_cad_venv.py) to avoid conflicts with the core skill dependencies. The main skill supports other Python versions, but CadQuery-based STEP parsing specifically needs 3.10–3.12.

### How do I enable the CNIPA prior art search feature?

Install the crawler dependencies with `pip install -r tools/crawl/requirements-cnipa.txt`, then ensure Playwright is configured (Step 3). The search functionality is implemented in [`tools/crawl/cnipa_epub_search.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/tools/crawl/cnipa_epub_search.py) and requires a working browser environment to scrape the Chinese National Intellectual Property Administration's EPUB archive.