Agent skill

Patent Download

by cat-xierluo in cat-xierluo/legal-skills

专利 PDF 批量下载工具。当用户需要下载专利全文 PDF、查询专利信息、批量导出专利文件时使用。支持多平台(Google Patents 优先),自动处理申请号和公告号格式。

MITAuto-check: notesLegal & Compliance

Install Patent Download

skills CLI
$ npx skills add cat-xierluo/legal-skills --skill patent-download -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cat-xierluo/legal-skills patent-download --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cat-xierluo/legal-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/patent-download .claude/skills/patent-download && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
patent-download
GitHub stars
720
Token cost
~951 tokens
SKILL.md length
210 words
Files
20 (incl. scripts, references)
Skills in repo
62
Repo updated
First seen
Licence
MIT

At a glance

专利 PDF 批量下载工具。当用户需要下载专利全文 PDF、查询专利信息、批量导出专利文件时使用。支持多平台(Google Patents 优先),自动处理申请号和公告号格式。

  • Works in 4 steps: cp config/.env.example config/.env → 编辑 config/.env,填入你注册的账号(已 .gitignore,不入库) → 账号自动从环境变量 / .env… → …
  • Tasks that involve Intellectual property
  • SKILL.md covers 何时用 / 何时不用, 推荐通道, 专利号格式(关键) and 使用方法, plus 5 more sections
  • Runs Python and Shell scripts from its folder; calls python, pip and playwright

What it does

Patent Download is an agent skill from cat-xierluo/legal-skills. 专利 PDF 批量下载工具。当用户需要下载专利全文 PDF、查询专利信息、批量导出专利文件时使用。支持多平台(Google Patents 优先),自动处理申请号和公告号格式。

Its SKILL.md is about 950 tokens, which your agent loads only when the skill is triggered. The skill folder holds 23 other files, including scripts and reference files (for example `CHANGELOG.md`, `references/accounts-setup.md` and `references/examples.md`).

It sits in Legal & Compliance, covering Intellectual property. It works with Playwright and Python. The licence is MIT.

When your agent uses it

  • Tasks that involve Intellectual property

Example prompts

  • “/patent-download”

Requirements

  • Python 3
  • A Bash shell

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. cp config/.env.example config/.env
  2. 编辑 config/.env,填入你注册的账号(已 .gitignore,不入库)
  3. 账号自动从环境变量 / .env 加载(scripts/platforms/_creds.py,无需额外依赖)
  4. 安全自检:python scripts/platforms/_creds.py —— 检查 .env 是否被误提交到 git,并显示各平台账号是否就绪(不打印密码)

What it can do on your machine

Read from SKILL.md and the folder at commit db2c58c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 9 files in scripts/ (Python and Shell, from the files we listed), which the agent can run.

    Shell commands in SKILL.md call:

    • python
    • pip
    • playwright

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Patent Download loads about 951 tokens when it runs, and up to ~3.6k if it reads all its reference files. Until then it costs about 26 tokens; SKILL.md has 210 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~26
When it runs · the whole SKILL.md, loaded when a task matches
~951
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:68
    1. `cp config/.env.example config/.env`
  • NoteMentions a .env fileSKILL.md:69
    2. 编辑 `config/.env`,填入你注册的账号(已 .gitignore,不入库)
  • NoteMentions a .env fileSKILL.md:70
    3. 账号自动从环境变量 / `.env` 加载(`scripts/platforms/_creds.py`,无需额外依赖)
  • NoteMentions a .env fileSKILL.md:71
    thon scripts/platforms/_creds.py` —— 检查 `.env` 是否被误提交到 git,并显示各平台账号是否就绪(不打印密码)
  • NoteMentions a .env fileSKILL.md:125
    ME` / `PATENT_<平台>_PASSWORD`)或本地 `config/.env` 读取(见「凭证」章节)。凭证仅用于登录下载,不硬编码、不打印密码。

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from cat-xierluo/legal-skills at commit db2c58c, republished under its MIT licence (© cat-xierluo). 210 words, ~951 tokens.

Download SKILL.mdSave it as .claude/skills/patent-download/SKILL.md (or your agent's skills folder). This skill also uses 19 other files; get the full folder from GitHub.
name
patent-download
description
专利 PDF 批量下载工具。当用户需要下载专利全文 PDF、查询专利信息、批量导出专利文件时使用。支持多平台(Google Patents 优先),自动处理申请号和公告号格式。
version
2.7.1
license
MIT
author
杨卫薪律师(微信 ywxlaw)
homepage
https://github.com/cat-xierluo/legal-skills

patent-download - 专利下载工具

根据专利号从多个平台下载专利文本(PDF / 摘要 / 全文)。

何时用 / 何时不用

用:下载专利全文 PDF、批量导出专利文件、查询专利基本信息。 不用:专利侵权比对 / 权利要求分析 / 有效性核查等,请用专用分析工具。

推荐通道

Google Patents(API、免费免登录)为首选,度衍专利(浏览器)为备选。各平台实测状态、推荐度与接入方式见 references/platform-status.md。

专利号格式(关键)

用户给的往往是申请号(如 202421964517.8),Google Patents 用公告号(如 CN223081266U)索引。两者无数学对应关系,google_patents.py 会尝试自动匹配但不保证成功。

完整的申请号/公告号结构、种类代码(A/B/U/S)、发明 A vs B 区别、默认下载规则见 references/patent-number-formats.md。

使用方法

统一入口(推荐)
bash
# 进入脚本目录(相对 skill 根)
cd scripts

# 查看支持的平台及状态
python cli.py --list

# Google Patents 下载(推荐,免费免登录)
python cli.py google CN223081266U
python cli.py google 202421964517.8      # 申请号自动匹配

# 仅查询专利信息,不下载
python cli.py google CN223081266U --info

# 度衍浏览器自动化(账号自动从环境变量读取)
python cli.py uyanip CN223081266U -m browser

# 批量下载
python cli.py google CN223081266U CN118198150A CN118198150B
直接调用平台脚本
bash
python platforms/google_patents.py CN223081266U
python platforms/google_patents.py 202421964517.8 -o ~/Downloads
python platforms/uyanip.py 2024214535561

凭证(环境变量,公开发布版)

各平台账号通过环境变量配置,代码不硬编码、仓库不存储任何账号密码。

命名:PATENT_<平台>_USERNAME / PATENT_<平台>_PASSWORD(如 PATENT_UYANIP_USERNAME)。

配置流程:

  1. cp config/.env.example config/.env
  2. 编辑 config/.env,填入你注册的账号(已 .gitignore,不入库)
  3. 账号自动从环境变量 / .env 加载(scripts/platforms/_creds.py,无需额外依赖)
  4. 安全自检:python scripts/platforms/_creds.py —— 检查 .env 是否被误提交到 git,并显示各平台账号是否就绪(不打印密码)

各平台账号获取方式与 ToS 合规提示见 references/accounts-setup.md。Google Patents 与 CNIPA epub 为公开免登录,无需配置。

参数说明

参数说明
-m, --method下载方式:api 或 browser
-u, --username用户名(默认从环境变量读)
-p, --password密码(默认从环境变量读)
-o, --output输出目录(默认当前目录)
--headless无头模式(浏览器方式)
--info仅查询信息,不下载(仅 Google Patents)

依赖

开箱即用(无需安装)
  • Google Patents 信息查询:python cli.py google <号> --info 仅用标准库,零依赖
  • 凭证自检:python cli.py --list、python platforms/_creds.py 零依赖
  • 缺少下述可选依赖时,脚本会打印清晰提示并退出,不会抛晦涩的 ImportError
需安装依赖

首次下载前按所用通道安装(统一命令:pip install -r scripts/requirements.txt):

通道依赖安装命令
Google Patents 下载(推荐)patent-downloaderpip install patent-downloader
度衍/粤港澳/PSS 浏览器自动化playwright + 浏览器pip install playwright && playwright install chromium
PatentStar/epub API 等requestspip install requests

一条命令装全部:pip install -r scripts/requirements.txt。

所需权限与安全说明

本技能会执行本地脚本完成专利下载,涉及以下能力边界,请在使用前知悉:

运行时自动安装依赖(请留意)
  • scripts/patent-download.sh 包装脚本在缺少依赖时会自动执行 pip install 与 playwright install chromium:
    • 首个参数为 google 时,若未装 patent-downloader 会自动 pip install patent-downloader;
    • 其他参数走老版路径时,若未装 playwright 会自动 pip install -r requirements.txt 并下载 Chromium 浏览器二进制。
  • 该自动安装没有固定版本(unpinned),会从网络拉取最新包,存在供应链风险。请知悉:自动安装前建议人工审查 scripts/requirements.txt,或改为手动安装(pip install -r scripts/requirements.txt)。
  • 直接调用 python cli.py <平台> <专利号> 不会触发自动安装,缺依赖时只会打印清晰提示并退出。
网络访问
  • 按用户指定的专利号向外部平台发起网络请求下载专利全文/PDF:Google Patents(API)、度衍、粤港澳、PSS、PatentStar、CNIPA epub 等。请求对象由用户输入的专利号决定,不会上传本地文档内容。
  • 使用 requests / patent-downloader / playwright(浏览器自动化)等依赖完成下载。
凭证访问
  • 各平台账号通过环境变量(PATENT_<平台>_USERNAME / PATENT_<平台>_PASSWORD)或本地 config/.env 读取(见「凭证」章节)。凭证仅用于登录下载,不硬编码、不打印密码。
  • 凭据等同账号密码,请勿截图、分享或提交到任何仓库。
浏览器自动化
  • 部分平台(度衍/粤港澳/PSS)使用 Playwright 驱动 Chromium,支持 --headless 无头模式。会在本机启动浏览器进程执行登录与下载操作。
文件访问
  • 在用户指定输出目录(-o,默认当前目录)写入下载的 PDF/文件。

更多

  • 使用示例与故障排除:references/examples.md
  • 变更历史:CHANGELOG.md

© cat-xierluo, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 19 other files (scripts, references) in skills/patent-download of cat-xierluo/legal-skills.

  • SKILL.md
  • CHANGELOG.md
  • LICENSE.txt
  • config/.env.example
  • references/accounts-setup.md
  • references/examples.md
  • references/patent-number-formats.md
  • references/platform-status.md
  • scripts/cli.py
  • scripts/download.py
  • scripts/patent-download.sh
  • scripts/platforms/_creds.py
  • scripts/platforms/epub.py
  • scripts/platforms/google_patents.py
  • scripts/platforms/gpic.py
  • scripts/platforms/patentstar.py
  • scripts/platforms/patentstar_browser.py
  • … and 3 more

Open the folder on GitHubat commit db2c58c

Compare with similar skills

Patent Download next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Patent Download compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Patent Download this skillcat-xierluo/legal-skills720—~951Automated safety check: NotesMIT
USPTO Patent and Trademark Datadavila7/claude-code-templates33k11 repos~4.6kAutomated safety check: PassMIT
Web Application Testinganthropics/skills180k51 repos~966Automated safety check: PassApache-2.0
Paper to Chinese Patent DrafterYuan1z0825/nature-skills47k1 repos~1.1kAutomated safety check: PassApache-2.0
Merge Dependabot PRsonyx-dot-app/onyx32k1 repos~2.2kAutomated safety check: PassMIT
Trigger.dev Configurationpapermark/papermark9.2k—~1.2kAutomated safety check: PassCustom licence

Similar skills

  • USPTO Patent and Trademark Data

    davila7/claude-code-templates

    Searches USPTO patent and trademark data through its APIs: patent search, PEDS examination history, assignments, citations, office actions and TSDR status.

    33k GitHub starsUsed in 11 repos~4.6k tokens
    Legal & ComplianceAuto-check passed
  • Web Application Testing

    anthropics/skills

    Official

    Tests local web applications with Python Playwright scripts, checking frontend behavior, capturing screenshots and reading browser console logs.

    180k GitHub starsUsed in 51 repos~966 tokens
    Testing & QAAuto-check passed
  • Paper to Chinese Patent Drafter

    Yuan1z0825/nature-skills

    Drafts Chinese invention patent applications and technical disclosures from research papers or inventor materials, tying each claim feature to source evidence.

    47k GitHub starsUsed in 1 repo~1.1k tokens
    Legal & ComplianceAuto-check passed
  • Merge Dependabot PRs

    onyx-dot-app/onyx

    Triages and lands a batch of open Dependabot PRs in the Onyx repo, where main is gated exclusively by GitHub's merge queue: approves and enqueues green PRs, closes superseded duplicates, fixes…

    32k GitHub starsUsed in 1 repo~2.2k tokens
    DevelopmentAuto-check passed
  • Trigger.dev Configuration

    papermark/papermark

    Configures Trigger.dev projects through trigger.config.ts, with build extensions for Prisma, Playwright, Puppeteer, FFmpeg, Python and system packages.

    9.2k GitHub stars~1.2k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • AI Search Hub

    minsight-ai-info/AI-Search-Hub

    Run the AI Search Hub browser automation scripts for Yuanbao, LongCat, Doubao, Qwen, Gemini, Grok, and MiniMax.

    1.3k GitHub stars~1.3k tokensUpdated 5 mo ago
    Productivity & AutomationAuto-check passed

More from cat-xierluo/legal-skills

All 62 skills in this repo
  • Elements-Style Complaint Generator

    cat-xierluo/legal-skills

    Converts a lawyer's ordinary complaint or a described case into the Supreme People's Court's elements-style Word template, with layout checks on the result.

    721 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check: notes
  • Lecture Performance Review

    cat-xierluo/legal-skills

    Analyzes raw lecture transcripts for verbal tics, pacing, time use and promise follow-through, with optional slide-by-slide comparison and cross-session tracking.

    721 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • De-AI Polish for Chinese Articles

    cat-xierluo/legal-skills

    Detects and rewrites machine-sounding patterns in the body text of Chinese articles while keeping the author's facts, headings and legal terms intact.

    721 GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • GitHub Star Manager

    cat-xierluo/legal-skills

    Finds GitHub projects mentioned in articles or screenshots and stars them, tracks updates to your starred repos, and builds an HTML dashboard to browse them.

    721 GitHub stars~2k tokensUpdated yesterday
    Auto-check: notes
  • Legal Harness Initializer

    cat-xierluo/legal-skills

    Sets up or incrementally updates AGENTS.md and CLAUDE.md for legal professionals, with a minimal safety baseline and a check that a new session loads and follows the rules.

    721 GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed
  • Moot Court Simulation Builder

    cat-xierluo/legal-skills

    Chinese-language skill that organizes a case file into a multi-role mock trial with judge, parties and clerk, producing a transcript, issue review and a to-strengthen list.

    721 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed

Questions about Patent Download

What does Patent Download do?

专利 PDF 批量下载工具。当用户需要下载专利全文 PDF、查询专利信息、批量导出专利文件时使用。支持多平台(Google Patents 优先),自动处理申请号和公告号格式。. Patent Download is an agent skill from cat-xierluo/legal-skills.

When should I use Patent Download?

Patent Download fits situations like: tasks that involve Intellectual property.

How do I install Patent Download in Claude Code?

Run `npx skills add cat-xierluo/legal-skills --skill patent-download -a claude-code`. Or copy the skill folder (skills/patent-download in cat-xierluo/legal-skills) into .claude/skills/patent-download in your project. Claude Code loads it when a task matches its description.

How do I install Patent Download in Codex?

Run `npx skills add cat-xierluo/legal-skills --skill patent-download -a codex`. Or copy the skill folder (skills/patent-download in cat-xierluo/legal-skills) into .agents/skills/patent-download in your project. Codex loads it when a task matches its description.

Can I use Patent Download in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cat-xierluo/legal-skills --skill patent-download -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/patent-download, .gemini/skills/patent-download, .github/skills/patent-download and .opencode/skills/patent-download in your project.

What does Patent Download need to run?

Going by SKILL.md and its folder, Patent Download needs Python and a shell for the scripts in its folder and the command-line tools its instructions call (python, pip and playwright). Our summary lists: Python 3; A Bash shell.

Does Patent Download access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Patent Download safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Patent Download use?

Patent Download is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Patent Download use?

About 951 tokens (SKILL.md is roughly 3.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.7k tokens, read only when the agent opens those files.

What are the alternatives to Patent Download?

Skills that share tags, products or a category with Patent Download: USPTO Patent and Trademark Data (davila7/claude-code-templates, 33k stars), Web Application Testing (anthropics/skills, 180k stars), Paper to Chinese Patent Drafter (Yuan1z0825/nature-skills, 47k stars) and Merge Dependabot PRs (onyx-dot-app/onyx, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Patent Download?

cat-xierluo (a GitHub user) maintains it in cat-xierluo/legal-skills, which has 720 GitHub stars. The repository holds 62 skills in this directory. The repository was last updated on October 10, 2026.

Source: cat-xierluo/legal-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.