index-manager

index-manager is a skill for Claude Code from RobThePCGuy/Claude-Patent-Creator. It costs 20 tokens per session (1,095 once invoked), scanned C, original, MIT.

A manager for the search indexes used by the Manual of Patent Examining Procedure, the United States guide for patent examination. It handles the documents and indexes needed to search that material.

In plain words
What is it for?
Use it to download and verify MPEP PDF files, extract and parse their contents, generate embeddings, build FAISS and BM25 search indexes, and perform maintenance or optimization.
Why use it?
It organizes the otherwise lengthy process of downloading patent manuals, extracting their text, creating embeddings, and building search indexes. It also supports checking and maintaining an existing index.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is # Or: python mcp_server/server.py --rebuild-index.

Part of the claude-patent-creator-standalone plugin — 17 skills, 16 commands, 13 agents, 2 hooks shipped together

Good fit Use it to download and verify MPEP PDF files, extract and parse their contents, generate embeddings, build FAISS and BM25 search indexes, and perform maintenance or optimization.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/RobThePCGuy/Claude-Patent-Creator
agentmods
npx agentmods add skills/robthepcguy/claude-patent-creator/index-manager

Made for: Claude Code.

Or install claude-patent-creator-standalone, the plugin that ships this one along with the rest of its 17 skills, 16 commands, 13 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for index-manager

README.md
[![agentmods](https://agentmods.dev/badge/skills/robthepcguy/claude-patent-creator/index-manager/github.svg)](https://agentmods.dev/skills/robthepcguy/claude-patent-creator/index-manager)
Your own site
<a href="https://agentmods.dev/skills/robthepcguy/claude-patent-creator/index-manager"><img src="https://agentmods.dev/badge/skills/robthepcguy/claude-patent-creator/index-manager/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for index-manager

Your own site · 80×15
<a href="https://agentmods.dev/skills/robthepcguy/claude-patent-creator/index-manager"><img src="https://agentmods.dev/badge/skills/robthepcguy/claude-patent-creator/index-manager.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,095 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00020 $0.01095
Opus 5 $0.00010 $0.00548
Sonnet 5 $0.00004 $0.00219
Haiku 4.5 $0.00002 $0.00110

Measured 10d ago against content hash 7df015cd06c3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade C, and why

index-manager scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf mcp_server/index_backup_*

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

wget https://www.uspto.gov/web/offices/pac/mpep/mpep-2900.pdf -O pdfs/mpep-2900.pdf
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/index-manager/SKILL.md · 174 lines

How it starts

The opening of the file, as written. The whole thing — 174 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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()
print(f'Chunks: {len(index.chunks)}')
results = index.search('claim definiteness', top_k=3)
print(f'Search results: {len(results)}')
"

Read the full file on GitHub · 174 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 174 lines · 20 tokens per session scan C 7df015cd06c3

Subscribe to this mod's changes

index-manager is a skill published in the GitHub repository RobThePCGuy/Claude-Patent-Creator (180 stars, last pushed yesterday), licensed MIT. It adds 20 tokens to every session and 1,095 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

plagiarism-checker

Scans lyrics for phrases that may match existing songs using web search and LLM knowledge. Use before release to check for unintentional borrowing.

bitwize-music-studio/claude-ai-music-skills · 35 tokens

compensation-and-leveling

Builds and maintains the leveling framework and pay structure — level definitions, salary bands, benchmarking, pay equity, and how raises and promotions are decided. Use this to design or revise leveling, set or adjust salary bands, benchmark against market, handle a compensation request or counteroffer, run a review…

cbrock84/headcount · 75 tokens

employment-compliance

Covers the employment rules that carry real penalties — exempt and non-exempt classification, overtime and hours, employee versus contractor status, work authorization and recordkeeping, accommodation requests, and the notices and retention obligations that go with them. Use this to classify a role, review a…

cbrock84/headcount · 87 tokens

sanity-best-practices

Sanity development best practices for schema design, GROQ queries, TypeGen, Visual Editing, images, Portable Text, Studio structure, localization, migrations, Sanity Functions, webhooks, Blueprints, and framework integrations such as Next.js, Nuxt, Astro, Remix, SvelteKit, Angular, Hydrogen, and the App SDK. Use this…

sanity-io/agent-toolkit · 164 tokens

video-perception

Use when the user mentions a video file (.mp4, .mov, .avi, .mkv, .webm), a YouTube URL, asks to watch/analyze/review a video, or references video content in conversation.

jordanrendric/claude-video-vision · 51 tokens

tax-ebookkeeping-context

Background information about Japan’s Electronic Bookkeeping Act, which sets rules for storing accounting records, scanned documents, and data received through electronic transactions.

kazukinagata/shinkoku · 75 tokens