How to Install the patent-disclosure-skill for Claude Code: Complete Setup Guide
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:
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. Set up an isolated environment and install them:
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 file to Claude's tool system:
- Open Claude Code's Skills interface
- Click Add New Skill
- Enter a display name (e.g., "Patent Disclosure")
- Set Skill Directory to the full path of your cloned
patent-disclosure-skillfolder - Save the configuration
Once registered, Claude Code automatically reads skills/patent-application/SKILL.md to discover available prompts (such as specification_builder.md and 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.pyfetches data from the CNIPA database - Parse:
cnipa_parse.pyprocesses returned XML/HTML - Report:
emit_search_report.pygenerates structured output - Optional:
write_patent_obsidian_note.pysaves 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:
# 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
# Generate patent specification draft
from skills.patent-application.prompts.specification_builder import build_specification
spec = build_specification(
title="基于深度学习的医学影像诊断系统",
abstract="本发明提供一种利用深度卷积网络进行肺部CT影像自动诊断的方法……"
)
print(spec)
# 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— Detailed environment setup and optional dependenciesrequirements.txt— Core Python package requirementsskills/patent-application/SKILL.md— Skill definition consumed by Claude Codeskills/patent-search/tools/cnipa_search.py— Primary CNIPA search implementationskills/patent-reader/tools/vault/write_patent_obsidian_note.py— Obsidian integrationskills/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 located at 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 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 changed, and restart Claude Code to reload the skill definition.
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 →