index-manager
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "index-manager":https://skillpi.com/zh/skills/deepskill-dc8602d2be11bf89d177ab53e1bbc8a6847ab3306c2c9ecbe135d23848c2e59e。安装前核对上游来源和版本:https://github.com/RobThePCGuy/Claude-Patent-Creator。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
用于管理 MPEP 索引的生命周期,包括索引的下载、构建、维护与优化。
介绍来源: third_party · RobThePCGuy · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 适合谁
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: index-manager
description: Manages MPEP index lifecycle including downloads, building, maintenance, and optimization.Index Manager Skill
Expert system for managing MPEP search index lifecycle: PDF downloads, index building, maintenance, updates, optimization.
FOR CLAUDE: All dependencies installed, system operational.
- Go directly to appropriate phase
- Scripts/tools in mcp_server/
- Use patent-creator CLI when available
- Only run diagnostics if operations fail
When to Use
Building/rebuilding MPEP index, corruption/missing files, optimization, adding content, troubleshooting.
Index Lifecycle
PDFs Not Present -> Download (2-5 min, 500MB)
-> Extract & Parse (500MB data)
-> Generate Embeddings (5-10 min GPU, 35-65 min CPU)
-> Build FAISS + BM25 Indexes
-> Index Ready (mcp_server/index/)
-> Maintenance (Verify -> Optimize -> Update)
Phase 1: PDF Management
Check Status:
ls pdfs/ # Should show mpep-*.pdf, consolidated_laws.pdf, consolidated_rules.pdf
Download PDFs:
patent-creator download-mpep
# Or: python install.py (Select "Download MPEP PDFs")
Verify Integrity:
python -c "
import fitz
from pathlib import Path
for pdf in Path('pdfs').glob('*.pdf'):
try:
doc = fitz.open(pdf)
print(f'[OK] {pdf.name}: {len(doc)} pages')
doc.close()
except Exception as e:
print(f'[X] {pdf.name}: ERROR - {e}')
"
Phase 2: Index Building
patent-creator rebuild-index
# Or: python mcp_server/server.py --rebuild-index
Timeline:
- Load PDFs: 30s
- Extract text: 1-2 min
- Chunk text (500 tokens): 30s
- Generate embeddings: 5-10 min (GPU) or 35-65 min (CPU)
- Build FAISS/BM25: 1 min
- Save to disk: 10s
Total: 5-15 min (GPU) or 35-65 min (CPU)
Custom Build:
from mcp_server.mpep_search import MPEPIndex
index = MPEPIndex(use_hyde=False)
index.build_index(
chunk_size=500,
overlap=50,
batch_size=32 # Reduce to 16/8 if OOM
)
Phase 3: Verification
# Check files
ls -lh mcp_server/index/
# Expected: mpep_index.faiss (~150MB), mpep_metadata.json (~80MB), mpep_bm25.pkl (~60MB)
# Verify health
patent-creator health
# Should show: [OK] MPEP Index: Ready (12,543 chunks)
# Manual test
python -c "
from mcp_server.mpep_search import MPEPIndex
index = MPEPIndex()
index.build_index()
print(f'Chunks: {len(index.chunks)}')
results = index.search('claim definiteness', top_k=3)
print(f'Search results: {len(results)}')
"
Phase 4: Maintenance
When to Rebuild:
- MPEP updates (quarterly check uspto.gov)
- Index corruption
- After adding new PDFs
- Performance degradation
- Machine migration
Rebuild Process:
# Backup (optional)
cp -r mcp_server/index mcp_server/index_backup_$(date +%Y%m%d)
# Rebuild
patent-creator rebuild-index
# Verify
patent-creator health
# Remove backup if successful
rm -rf mcp_server/index_backup_*
Phase 5: Content Updates
# Download new PDF
wget https://www.uspto.gov/web/offices/pac/mpep/mpep-2900.pdf -O pdfs/mpep-2900.pdf
# Rebuild (includes new section)
patent-creator rebuild-index
Note: Incremental updates not supported. Full rebuild required.
Troubleshooting
- OOM errors during build
- Build taking too long
- Corrupted index files
- Search returning no results
Performance Tuning
- Embedding generation speed (GPU vs CPU)
- Search latency optimization
- Index size reduction
- Batch size tuning
Quick Reference
| Command | Purpose |
|---|---|
patent-creator download-mpep |
Download MPEP PDFs |
patent-creator rebuild-index |
Build/rebuild search index |
patent-creator health |
Check index health |
ls -lh mcp_server/index/ |
View index files |
Best Practices:
- Backup before rebuild
- Verify PDFs before building
- Use GPU for 10x faster builds
- Test after rebuild
- Keep PDFs until verified
- Weekly health checks
版本历史
-
v0.3.3
GitHub ↗
原版更新说明
### Changed - EPO OPS is a patent-search fallback when Google Patents (SerpApi) is not ready: `search_epo_patents` covers worldwide titles and abstracts (CQL `ta=`) and classes (`cpc=`, `ic=`), and `get_epo_patent` reads claims and description where OPS holds full text (EP, WO and selected national publications). The campaign, search skills, agents and commands check `check_epo_api_status` and count EPO as a searched patent outlet. A free SerpApi plan ran out mid-campaign, and the instructions offered only BigQuery, where a keyword search uses about a third of the free month. - `search_uspto_api` is described as US application metadata search and used as a supplement only, never as the patent outlet. - EPO tool descriptions no longer claim EP-only search or full text for every result, and drop the unsupported `cl=` example.
-
v0.3.2
GitHub ↗
原版更新说明
### Fixed - Patent-class (CPC) searches no longer need BigQuery. `search_patents_google` accepts `CPC=<code>` (child classes included), verified live; `cpc:` is matched as plain text through SerpApi and finds almost nothing, so the tool says so. The BigQuery CPC tool points to this route when BigQuery is not set up, and the campaign, prior-art skill, searcher agent and command no longer say class searches need BigQuery. A real sweep had run 24 keyword searches and no class search, reporting class search unavailable. - Query guidance: 2-5 terms per query, since every word must match.
-
v0.3.1
GitHub ↗
原版更新说明
### Added - `check_web_history`: when a web page was first public, from the Internet Archive's capture index. Disclosure audits can date the inventor's own pages without a manual Wayback Machine lookup; web fetch tools are often refused by web.archive.org. ### Changed - The campaign skill's intake finds facts in the material before asking the inventor for them.
-
v0.3.0
GitHub ↗
原版更新说明
This version collects everything merged since 0.2.0. From here on, every change to the installed tools raises the version (CI enforces it) and each version gets a release tag, so an installed copy can tell whether it is current: `patent-creator --version`, `mcp_server.__version__` and the MCP handshake's server version all report it, from `pyproject.toml` alone. ### Fixed (since #126) - Google Patents readiness counts extra SerpApi credits, not only the monthly plan (#127). - Diagram labels: subscripts, zero offsets, kerning, Graphviz styled runs and table cells read as drawn, so reference numbers land (#127). - Multiple-dependent claims ("any one of claims 1 or 2") check every parent for support and antecedent basis; measurements and counts after a claim reference are not read as claim numbers (#127). ### Added - `search_non_patent_literature`: papers and preprints as prior art, from OpenAlex, arXiv and Semantic Scholar at once, free with no key. Filters by publication date (set `published_before` to the priority date), folds the same paper found by several sources into one result, and reports per source whether it was searched, so a busy source never reads as "no prior art". Optional free keys `OPENALEX_API_KEY` and `SEMANTIC_SCHOLAR_API_KEY`. The gap was pointed out by @JuampiHernandez in #104. - Paper dates are cross-checked with Crossref (free, no key) whenever a priority-date cutoff is set. Indexes sometimes list the wrong year (seen live: a 2026 paper listed as 2016); a result whose DOI was registered after the cutoff and long after its listed date, or whose publisher gives a later date, now carries a `date_check` telling the user to confirm it. Papers from before 2000 are not flagged for late DOIs (DOIs did not exist yet), and the earliest publisher date counts, since online-first is public. Every result says where its date came from (`date_source`), and the note counts dates that could not be cross-checked. Also flagged: 1970-01-01 (a missing date in disguise, caught on 2020-2021 papers), publisher dates years apart including the journal issue's, a year inside the DOI later than the listed date, and sources that disagree on a merged paper's date. Older papers whose DOI came after the cutoff, and whose age rests only on the publisher's print date, get a `date_note` saying so. - Optional stdio handshake workaround and troubleshooting guidance for the Claude Code `-32022` negotiation error (#102, reported by @DanielTillett). - Consolidated utility-patent-reviewer into Claude-Patent-Creator - GitHub issue templates (bug report, feature request, question) and PR template - Code quality tooling config (Ruff lint rules, isort, mypy, pytest, coverage, bandit) - Spell checking config (`.typos.toml`) - CONTRIBUTING.md and SECURITY.md ### Changed - MPEP search results now cite the exact section, for example `mpep_section: "2173.02"` with its title, instead of only the chapter ("MPEP 2100"). The section comes from the heading and revision tag the USPTO prints above each section, including headings split across a page break; checked against the section marker on every page of all 29 chapters, it matches on 2,864 of 2,912 pages, and the rest are pages whose marker names an empty "[Reserved]" section. Indexes built before this version keep chapter-only labels until `patent-creator setup --rebuild`. `get_mpep_section` now also accepts deeper numbers such as `2106.04(a)(2)`, and finds headings whose titles wrap onto a line starting with a number ("112(f) ...", "2012 [R-...]"), which it used to miss. ### Removed - `/setup-patent-creator`, a second name for `/setup-patent-system`. One setup command is easier to find. ### Fixed - The patent tools now connect in about 0.4 seconds instead of 3.7. Startup had loaded the AI search libraries and run a full health check (both models plus calls to HuggingFace) before answering Claude Code, so a question asked right after opening Claude Code was answered without the patent tools. The libraries now load on first use, the server runs only the two checks it reports in the background, and an installed-but-broken library gives the install steps instead of a raw error. Apple Silicon is no longer told to install CUDA; it reports that CPU is the faster default there. - With no SerpApi key and no BigQuery, prior-art workflows no longer stop dead. They point at the free key and meanwhile run a web first screen (Google Patents pages found by web search, then read in full), labelled as a first screen that cannot show an absence of prior art. - The plugin listing no longer says no MCP server is needed; search and checks come from the companion tool. - The settings window's "Tkinter not installed" message now gives the `brew install [email protected]` fix on Homebrew Python. - Setup no longer crashes with `EOFError` on Windows when stdin is NUL (#85). - Docs, agents and skills no longer name APIs that don't exist (#86). - `get_patent_bigquery` finds patents again and no longer scans about 1.4 TiB per lookup (#87). - `PATENT_MPEP_USE_HYDE` is honored and HyDE is off by default, saving about 3.5 s per search (#88). - PyMuPDF is imported as `pymupdf`, so its deprecation warning no longer corrupts the server's stdio (#89). Reports for #85–#89 by @eoffermann. - Plugin docs no longer promise checks the tools don't run (antecedent basis, corresponding structure, description support, best mode, physical page checks), and analyzer result fields are documented as returned. - EPO and PCT guidance corrected against the EPC, EPO Guidelines and PCT Regulations: abstract length is a preference, two-part claims are "where appropriate", deleted EPC Rule 46 is no longer cited, the PCT abstract figure is chosen on the request form, and legal-reference maps point to the right rules. Static fee tables now point to the official fee schedules. - European patent search docs say what the integration returns: OPS results are worldwide unless filtered, and register and in-force status must be checked in the European Patent Register. - BigQuery searches keep OR as OR, honour every prior-art filter, and read saved settings; cost guidance reflects real scan sizes. - Setup and the download commands report a failed required download as a failure. An optional supplement that fails is named as missing. - Diagnostic scripts test what they claim; diagram labels that don't match are reported; the settings window reads yes/on/1 and an empty batch size correctly; health-check commands work in PowerShell and with spaces in paths. - Workflows use SerpApi first and treat BigQuery as optional; Windows commands are valid PowerShell; docs name files and commands that exist. - The old installers (`install.py`, `scripts/install-gpu.*`) are removed; the pip install and `patent-creator setup` replace them. - Mac output no longer starts with PyTorch's "Redirects" note, and an unavailable EPO Guidelines PDF is no longer shown as an error when the website copy downloads instead. - Public unmerged code is no longer treated as undisclosed; history mining requires public-access and date evidence, with unknowns preserved. - PCT calendars use the priority date, put US/JP entry at 30 months and EP at 31, and state the alternative Chapter II demand deadline, with WIPO sources. - Agents that need MCP tools inherit the connected session's tools instead of excluding them through built-in-only allowlists. - EPO/PCT formalities now expose checks run/skipped and scoped verdicts like the US checker. Missing inputs, failed checks, and PCT's unverified physical requirements cannot produce readiness; unavailable checkers report no checks. - US/EPO specification review checks dependent claims and includes them in support coverage instead of reporting only independent-claim coverage. - Claims-review scores no longer authorize filing. Enabling antecedent basis requires a server/Claude Code restart and an actual claims result naming `antecedent_basis` in `checks_run` before the workflow can proceed. - EPO drafting uses Article 54(5) purpose-limited product claims for new second-medical-use filings, with the Swiss-type cutoff and EPO sources. - Setup registered the wrong Python on venv installs: it followed the venv's `python` link back to the system interpreter, which cannot import `mcp`, so Claude Code failed to connect while setup, `health` and `verify-config` all reported success. Registration keeps the venv path, and setup and `verify-config` now start the server and complete a real MCP handshake before saying it is connected. Found by a fresh-user install walk. - `health` and `serve` refused to run after the PDF cleanup that setup itself offers; they now need only the built index, and setup no longer re-downloads and rebuilds when the PDFs were removed on purpose. - Setup asks before installing Graphviz with the system package manager and never installs it unattended; the diagram tools' error gives the exact install command. - `check_formalities` no longer reports `ready_to_file` when parts were not supplied or a component check failed, and lists checks run and skipped. `review_patent_claims` leads with skipped checks and no longer calls claims "compliant" when the antecedent-basis check did not run. - Setup looked frozen for over half an hour: the CLI imports the server stack under a stderr capture, and the logger kept writing into that buffer, so every index-build message vanished. Logs now follow the live terminal, the build prints a plain progress line with time left every few percent, and the time estimate matches the device (25-40 min without an NVIDIA GPU). - The missing SerpApi key message gives the exact `config set` command for this install instead of a project `.env`, and BigQuery is offered as a ready fallback only when it is configured. Commands setup prints name the installed executable, so they work from a virtual environment. - A short abstract is advice, not a failure: under 50 words is MPEP 608.01(b)'s preference. Over 150 words still fails (37 CFR 1.72(b)). - Status no longer marks 35 USC, 37 CFR and Updates `[X]` after the offered PDF cleanup; their text is in the index. - The plugin's setup command installs into the same `~/patent-creator-venv` folder as the README (a normal install, so plugin updates can't break it) and walks through turning on patent search. - European Patent Convention articles were indexed as Implementing Regulations (0 article chunks, 4,927 rule chunks): an amendment table on page 1 mentions "Implementing Regulations" and the extractor switched there. The split now follows the PDF's own bookmarks (1,306 article and 1,794 rule chunks on the real PDF), so an EPC-only search finds Article 84. Indexes built before this are detected; `health` says a rebuild is needed and re-running `setup` rebuilds automatically. - `get_mpep_section` found nothing for a subsection like 608 because labels are chapter-level. It now finds the section's heading inside its chapter, returns the content in order, and says when boundaries are approximate. - The EPO Guidelines download uses the current published PDF with a verified fallback, and `search_patent_law` says which sources it didn't search even when others returned results. - Saved settings now apply at startup in both the CLI and the server, so a saved `GOOGLE_CLOUD_PROJECT`, `PATENT_DATA_DIR` or `PATENT_LOG_FORMAT` takes effect (real environment variables and `.env` still win), and `config list` reports saved values as saved. - EPO Guidelines results from the HTML download keep their official page link (`source_url`) and Part/Chapter/section locator on every chunk, not only the first one of each page. - The Guidelines HTML download reports progress at least every 20 seconds instead of going silent for minutes during a large batch. - Every recovery message (settings notes, law-search coverage warnings, index warnings) names the installed `patent-creator` command, so it runs from an unactivated virtual environment. - Stale command suggestions (`scripts/setup_bigquery_auth.py`, `install.py`, `status --verbose`) point at commands that exist. - Paper search spaces its Semantic Scholar requests at least 1.1 s apart across the whole server and retries a refused one with exponential backoff (1, 2, 4 s plus jitter), as Semantic Scholar requires, so back-to-back searches stay under the 1 request/second key limit instead of losing that source's results. - Reject invalid explicit BigQuery spending caps before any query instead of silently substituting the 350 GiB default (#101). - Bind patent family IDs as strings for the BigQuery public-data schema (#97). - Annotate project-local diagram outputs while retaining path confinement (#98). - Parse multi-hit EPO search wrappers and prefer family docdb country/kind fields (#99, #100). Reports and detailed reproductions for #97–#101 by @DanielTillett. - `downloaders`: MPEP/USPTO downloads now verify TLS against the bundled `certifi` CA store, fixing `SSL: CERTIFICATE_VERIFY_FAILED` on python.org macOS Python (#23) - `utils/device`: honor the documented `PATENT_MPEP_DEVICE` env var (`cpu`/`gpu`/ `mps`), which was referenced in docs but never read; `FORCE_CPU` still works (#23) - `utils/device`: detect Apple Silicon (MPS) and stay on CPU by default — MPS runs the BGE embedding workload ~50x slower; opt in with `PATENT_MPEP_DEVICE=mps` (#23) - `hardware_detect`/`auto_setup`: when `nvidia-smi` can't report compute capability (older drivers), select the CUDA wheel by GPU product name so legacy cards still get cu126 without forcing Blackwell onto cu126; add `PATENT_TORCH_CUDA=cu126|cu128` manual override; correct the cu126 Maxwell/Windows kernel-coverage claim (#26 follow-up) - `analyzer_base`: WARNING/INFO severity levels now in SEVERITY_ORDER (prevents KeyError) - `base_index`: Guard against FAISS returning -1 for unfound results - `base_index`: Guard against empty candidates in reranker - `claims_analyzer`: Circular dependency guard prevents infinite recursion - `claims_analyzer`: Self-referencing claim prevention - `claims_analyzer`: Fixed `_singularize()` and `_pluralize()` edge cases - `claims_analyzer`: Normalized compliance scoring per claim count - `claims_analyzer`: Better preamble and limitation location detection - `specification_analyzer`: State reset on each analysis call (prevents stale data) - `specification_analyzer`: Word-boundary matching prevents false positives - `specification_analyzer`: Coverage calculated on independent claims only - `specification_analyzer`: Expanded element extraction patterns - `formalities_checker`: Word-boundary regex for forbidden term detection - `formalities_checker`: Better figure reference regex (handles FIGS, sub-figures, ranges) - `evaluation`: Division-by-zero protection in comparison - `downloaders`: URL scheme validation (HTTP/HTTPS only) - `downloaders`: Partial file cleanup on download failure - `patent_corpus`: Safe integer parsing for TSV fields - `diagram_generator`: defusedxml for SVG parsing, quoted node IDs, tspan handling ### Changed - README Quick Start rewritten for first-time users: prerequisites first, a virtual-environment install with copyable Mac/Linux and Windows lines, the plugin as its own step, and a free SerpApi key for patent search. One supported Python range (3.10-3.13) across the README, setup command and skills. Removed two settings nothing reads (`PATENT_ENABLE_METRICS`, `PATENT_OPERATION_TIMEOUT`).
当前收录版本
0.0.1
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 针对专利领域高频刚需场景,直接解决 MPEP 索引管理的核心任务痛点
- 显著提升专利信息检索效率,具有高实用价值
亮点
- 触发描述精准完整,覆盖下载、构建、维护、优化等多种操作场景
- 边界清晰,不易与其他 Skill 重叠
亮点
- Phase 划分清晰,步骤详细,包含端到端示例和出口条件
- frontmatter 完整,文档结构规范,易于理解和执行
亮点
- 工具来源明确,参数配置合理,覆盖主要异常场景
- 不可逆操作提供备份建议,执行流程可靠
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
-
删除文件
先确认绝对路径及作用范围,保留可恢复备份;不要直接对重要目录运行示例命令。
主文档提及 · 第 130 行
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- www.uspto.gov
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。