pdf-research

pdf-research is a command for Claude Code from hongsw/plugin-for-claude-research. It costs 0 tokens per session (955 once invoked), scanned A, original, MIT.

A command for indexing PDF documents and searching their contents semantically with LightRAG. Semantic search looks for meaning and related ideas, not only exact words.

In plain words
What is it for?
Use it to check the current index status, add PDFs to the index, and search or ask questions about indexed documents. The input mentions hybrid, local, global, and naive search modes.
Why use it?
It helps answer questions across a collection of PDFs without manually opening and reading each document.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths.

Part of the pdf-research plugin — 1 skill, 1 command shipped together

Good fit Use it to check the current index status, add PDFs to the index, and search or ask questions about indexed documents. The input mentions hybrid, local, global, and naive search modes.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/hongsw/plugin-for-claude-research/pdf-research
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/hongsw/plugin-for-claude-research

Made for: Claude Code.

Or install pdf-research, the plugin that ships this one along with the rest of its 1 skill, 1 command.

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 pdf-research

README.md
[![agentmods](https://agentmods.dev/badge/commands/hongsw/plugin-for-claude-research/pdf-research.svg)](https://agentmods.dev/commands/hongsw/plugin-for-claude-research/pdf-research)
Your own site
<a href="https://agentmods.dev/commands/hongsw/plugin-for-claude-research/pdf-research"><img src="https://agentmods.dev/badge/commands/hongsw/plugin-for-claude-research/pdf-research.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 955 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00000 $0.00955
Opus 5 $0.00000 $0.00477
Sonnet 5 $0.00000 $0.00191
Haiku 4.5 $0.00000 $0.00096

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

Security

Grade A, and why

pdf-research scanned grade A with 0 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 8d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/pdf-research/commands/pdf-research.md · 159 lines

How it starts

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

You are a research assistant with access to LightRAG-based PDF indexing and semantic search capabilities.

Core Directive

When this command is invoked, help users index PDF documents and perform semantic searches over their content.

Immediate Action

  1. Check Current Status First

    Always start by checking the current configuration:

    cd ~/.claude/plugins/cache/plugin-for-claude-research/pdf-research/*/skills/pdf-research/scripts
    python pdf_research.py status
    
  2. Report Status to User

    Based on status output, report:

    • ✅ PDF directory configured: [path] or ❌ Not configured
    • ✅ Storage directory: [path] or ❌ Not set
    • ✅ Documents indexed: [count] or ❌ No index found
    • Search mode: [hybrid/local/global/naive]

User Intent Detection

Intent: "Index PDFs" or Provides Path

Actions:

  1. Verify path exists
  2. Run indexing:
    python pdf_research.py index /path/to/pdfs
    
  3. Report results:
    ✅ Indexing complete!
    - Documents indexed: [count]
    - Chunks created: [count]
    - Storage size: [MB]
    - Location: [storage path]
    

Intent: Search/Question About PDFs

Actions:

  1. Check if index exists (via status command)
  2. If no index:
    No indexed documents found. Please provide a PDF directory to index first:
    Example: "Index PDFs from ~/Documents/research"
    
  3. If index exists, run search:
    python pdf_research.py search "user's question" --mode hybrid
    
  4. Format and present results with source references

Intent: Configure Settings

Actions:

python pdf_research.py config --pdf-dir /path/to/pdfs --storage-dir ./rag_storage

Search Modes

Explain when appropriate:

Mode Best For When to Use
hybrid General queries Default, combines local + global
local Specific facts Names, numbers, definitions
global Summaries Themes, trends, overviews
naive Exact terms Simple keyword matching

Read the full file on GitHub · 159 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. 8d ago First seen · 159 lines · 0 tokens per session scan A d0c038d6afd9

Subscribe to this mod's changes

pdf-research is a command published in the GitHub repository hongsw/plugin-for-claude-research (20 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 955 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.