index

index is a command for coding agents from cwensel/arcaneum. It costs 9 tokens per session (1,796 once invoked), scanned A, original, MIT.

A command that puts PDFs, Markdown files, text, or source code into searchable collections. A collection is a named group of indexed content.

In plain words
What is it for?
Use it to index documents or code into Qdrant for semantic search, or text into MeiliSearch for keyword search.
Why use it?
It prepares content for later semantic search, which finds related meaning rather than requiring exact keywords.

Command

Part of the arc plugin — 5 skills, 10 commands shipped together

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.

agentmods
npx agentmods add commands/cwensel/arcaneum/index
Clone the repo
git clone --depth 1 https://github.com/cwensel/arcaneum

Or install arc, the plugin that ships this one along with the rest of its 5 skills, 10 commands.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/cwensel/arcaneum/index.svg)](https://agentmods.dev/commands/cwensel/arcaneum/index)
Your own site
<a href="https://agentmods.dev/commands/cwensel/arcaneum/index"><img src="https://agentmods.dev/badge/commands/cwensel/arcaneum/index.svg" alt="Measured on agentmods" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,796 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00009 $0.01796
Opus 5 $0.00005 $0.00898
Sonnet 5 $0.00002 $0.00359
Haiku 4.5 $0.00001 $0.00180

Measured 4d ago against content hash baebf0a9be5b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

index 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 4d 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.

commands/index.md · 204 lines

How it starts

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

Index PDFs, markdown, or source code into Qdrant collections for semantic search.

Note: For most users, /arc:corpus sync is recommended as it indexes to both semantic and full-text search. Use /arc:index when you only need semantic search in a single collection.

IMPORTANT: You must specify a subcommand (pdf, code, markdown, or text) before the path.

Subcommands (required):

  • pdf: Index PDF documents into Qdrant (with OCR support)
  • markdown: Index markdown files into Qdrant (with frontmatter extraction)
  • code: Index source code repositories into Qdrant (git-aware)
  • text: Index content to MeiliSearch for full-text search (has its own pdf/code/markdown subcommands; advanced — prefer /arc:corpus sync or /arc:indexes for full-text)

Common Options:

  • --collection: Target collection (required)
  • --from-file: Read file paths from list (one per line, or "-" for stdin)
  • --model: Embedding model (auto-selected by content type)
  • --workers: Parallel workers (default: 4)
  • --force: Force reindex all files
  • --randomize: Randomize file processing order (useful for parallel indexing)
  • --gpu: Opt into accelerator embedding (CPU is the stable default)
  • --streaming: Stream embeddings to Qdrant immediately (lower memory usage)
  • --verbose: Show detailed progress (suppress library warnings)
  • --debug: Show all library warnings including transformers
  • --json: Output in JSON format

PDF Indexing Options:

  • --no-ocr: Disable OCR (enabled by default for scanned PDFs)
  • --ocr-language: OCR language code (default: eng)
  • --ocr-workers: Parallel OCR workers (default: cpu_count)
  • --normalize-only: Skip markdown conversion, only normalize whitespace
  • --preserve-images: Extract images for multimodal search
  • --process-priority: Process scheduling priority (low, normal, high)
  • --embedding-batch-size: Batch size for embeddings (auto-tuned if not specified)
  • --offline: Use cached models only (no network)

Markdown Indexing Options:

  • --chunk-size: Target chunk size in tokens (overrides model default)
  • --chunk-overlap: Overlap between chunks in tokens
  • --recursive/--no-recursive: Search subdirectories recursively (default: recursive)
  • --exclude: Patterns to exclude (e.g., node_modules, .obsidian)
  • --offline: Use cached models only (no network)

Source Code Indexing Options:

  • --depth: Git discovery depth (traverse subdirectories)

Examples:

# Basic indexing (CPU-first stable defaults)
/index pdf ~/Documents/Research --collection PDFs --model arctic-m
/index markdown ~/notes --collection Notes --model arctic-m
/index code ~/projects/myapp --collection MyCode --model jina-code

# Index from file list
/index pdf --from-file /path/to/pdf_list.txt --collection PDFs
/index markdown --from-file /path/to/md_list.txt --collection Notes

# Index from stdin (pipe file paths)
find ~/Documents -name "*.pdf" | /index pdf --from-file - --collection PDFs
ls ~/notes/*.md | /index markdown --from-file - --collection Notes

# With options
/index markdown ~/docs --collection Docs --chunk-size 512 --verbose
/index pdf ~/scanned-docs --collection Scans --no-ocr --offline

# Opt into accelerator embedding
/index pdf ~/Documents/Research --collection PDFs --model stella --gpu

# Streaming mode (lower memory for large collections)
/index pdf ~/Documents/Research --collection PDFs --streaming
/index code ~/projects/myapp --collection MyCode --streaming

# Parallel indexing from multiple terminals (randomize order)
/index pdf ~/Documents/Research --collection PDFs --randomize
/index markdown ~/notes --collection Notes --randomize

# Debug mode (show all warnings)
/index pdf ~/Documents/Research --collection PDFs --model stella --debug

Execution:

arc index $ARGUMENTS

File List Format (--from-file):

When using --from-file, provide a text file with one file path per line:

# Comments are supported (lines starting with #)
/absolute/path/to/file1.pdf
relative/path/to/file2.md
/another/file3.pdf

# Empty lines are ignored

Read the full file on GitHub · 204 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. 4d ago First seen · 204 lines · 9 tokens per session scan A baebf0a9be5b

Subscribe to this mod's changes

index is a command published in the GitHub repository cwensel/arcaneum (7 stars, last pushed 8d ago), licensed MIT. It adds 9 tokens to every session and 1,796 once invoked, about $0.0000 per session on Opus 5. 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-31.