# How to Install the patent-disclosure-skill for Claude Code: Complete Setup Guide

> Easily install the patent-disclosure-skill for Claude Code by cloning the repository, installing dependencies, and registering the skill. Follow our complete setup guide for a smooth process.

- Repository: [handsomestWei/patent-disclosure-skill](https://github.com/handsomestWei/patent-disclosure-skill)
- Tags: how-to-guide
- Published: 2026-09-05

---

**To install the patent-disclosure-skill for Claude Code, clone the repository, install Python dependencies, and register the skill directory in Claude Code's Skills UI.**

The **patent-disclosure-skill** from `handsomestWei/patent-disclosure-skill` equips Claude Code with specialized tools for searching Chinese patent databases (CNIPA), extracting technical information, and generating patent disclosure documents. This guide walks through the exact installation steps based on the repository's source code and configuration files.

## Clone the Repository

Start by pulling the complete codebase to your local machine:

```bash
git clone https://github.com/handsomestWei/patent-disclosure-skill.git
cd patent-disclosure-skill

```

This retrieves all skill definitions, helper tools, and configuration files needed for operation.

## Install Python Dependencies

The skill requires several third-party packages defined in [`requirements.txt`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/requirements.txt). Set up an isolated environment and install them:

```bash
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

pip install -r requirements.txt

```

Key dependencies include **requests** for HTTP requests, **beautifulsoup4** for HTML/XML parsing, and **pydantic** for data validation. Installing these prevents import errors when the skill executes its crawling and parsing operations.

## Register the Skill with Claude Code

Claude Code discovers skills through a dedicated UI workflow. The registration process connects the skill's [`SKILL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/SKILL.md) file to Claude's tool system:

1. Open Claude Code's **Skills** interface
2. Click **Add New Skill**
3. Enter a display name (e.g., "Patent Disclosure")
4. Set **Skill Directory** to the full path of your cloned `patent-disclosure-skill` folder
5. Save the configuration

Once registered, Claude Code automatically reads [`skills/patent-application/SKILL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-application/SKILL.md) to discover available **prompts** (such as [`specification_builder.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/specification_builder.md) and [`claims_builder.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/claims_builder.md)) and **tools** (including `cnipa_search` and `emit_search_report`).

## Verify Installation

Test the skill by invoking it directly in Claude Code:

```

@patent-disclosure search CNIPA for "AI-assisted diagnosis"

```

A successful installation triggers this execution chain:

- **Crawl**: [`cnipa_crawler.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/cnipa_crawler.py) fetches data from the CNIPA database
- **Parse**: [`cnipa_parse.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/cnipa_parse.py) processes returned XML/HTML
- **Report**: [`emit_search_report.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/emit_search_report.py) generates structured output
- **Optional**: [`write_patent_obsidian_note.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/write_patent_obsidian_note.py) saves results to an Obsidian vault

## Optional Configuration Steps

Enhance functionality with these additional setups:

| Step | Command | Purpose |
|------|---------|---------|
| **Obsidian vault setup** | `python -m skills.patent-reader.tools.vault.setup_obsidian_vault /path/to/vault` | Enables automatic note generation for patent research |
| **Vector index rebuild** | `python -m skills.patent-oa.tools.rebuild_vectors` | Optimizes semantic search across previous disclosures |
| **Chinese NLP extras** | `pip install -r skills/patent-search/tools/requirements-cnipa.txt` | Improves tokenization for CNIPA-specific text |

## Code Examples for Direct Use

Access skill functionality programmatically or via CLI:

```python

# Search CNIPA and get markdown report

from skills.patent-search.tools.cnipa_search import CNIPASearch

search = CNIPASearch()
report_md = search.run(query="机器学习", max_results=5)
print(report_md)  # Ready for Claude or Obsidian

```

```python

# Generate patent specification draft

from skills.patent-application.prompts.specification_builder import build_specification

spec = build_specification(
    title="基于深度学习的医学影像诊断系统",
    abstract="本发明提供一种利用深度卷积网络进行肺部CT影像自动诊断的方法……"
)
print(spec)

```

```bash

# One-line CLI usage

patent-disclosure search --source cnipa --query "区块链溯源" --limit 10

```

## Key Source Files

Understanding the repository structure helps with troubleshooting and customization:

- **[`INSTALL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/INSTALL.md)** — Detailed environment setup and optional dependencies
- **[`requirements.txt`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/requirements.txt)** — Core Python package requirements
- **[`skills/patent-application/SKILL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-application/SKILL.md)** — Skill definition consumed by Claude Code
- **[`skills/patent-search/tools/cnipa_search.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-search/tools/cnipa_search.py)** — Primary CNIPA search implementation
- **[`skills/patent-reader/tools/vault/write_patent_obsidian_note.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-reader/tools/vault/write_patent_obsidian_note.py)** — Obsidian integration
- **[`skills/patent-oa/tools/rebuild_vectors.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-oa/tools/rebuild_vectors.py)** — Semantic search index management

## Summary

- **Clone** the repository from `handsomestWei/patent-disclosure-skill`
- **Install** dependencies via `pip install -r requirements.txt`
- **Register** the skill directory in Claude Code's Skills UI
- **Verify** with a test query to confirm tool availability
- **Optionally configure** Obsidian vault, vector embeddings, or Chinese NLP extras

## Frequently Asked Questions

### Where does Claude Code find the skill definition?

Claude Code reads [`SKILL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/SKILL.md) located at [`skills/patent-application/SKILL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-application/SKILL.md) within the registered directory. This file defines prompts, tools, and metadata that Claude exposes in its interface.

### What Python version is required?

The repository does not specify a minimum version in the analyzed files, but the dependencies in [`requirements.txt`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/requirements.txt) suggest Python 3.8+ compatibility. Use a virtual environment to isolate the skill's packages from system Python.

### Can I use the skill without Claude Code?

Yes. The Python modules in `skills/patent-search/tools/` and related packages can be imported directly or invoked via CLI commands, though you lose the integrated prompt templates and UI conveniences that Claude Code provides.

### How do I update the skill after installation?

Pull the latest changes with `git pull origin main`, reinstall dependencies if [`requirements.txt`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/requirements.txt) changed, and restart Claude Code to reload the skill definition.