corpus

corpus is a command for Claude Code from cwensel/arcaneum. It costs 12 tokens per session (3,148 once invoked), scanned A, original, MIT.

A command set for managing searchable content collections that use both vector search, which finds similar meaning, and full-text search, which matches exact words. It can create, update, sync, check, repair, and remove these collections.

In plain words
What is it for?
Use it to create and inspect corpora for code, PDFs, or Markdown, index directories, check search health, restore matching data, and automatically sync a repository after commits.
Why use it?
It keeps the two search indexes for the same content aligned and helps find incomplete or damaged indexing. It also avoids having to manage each search system separately.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions Claude Code.

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

Good fit Use it to create and inspect corpora for code, PDFs, or Markdown, index directories, check search health, restore matching data, and automatically sync a repository after commits.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/cwensel/arcaneum/corpus
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/cwensel/arcaneum

Made for: Claude Code.

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 corpus

README.md
[![agentmods](https://agentmods.dev/badge/commands/cwensel/arcaneum/corpus/github.svg)](https://agentmods.dev/commands/cwensel/arcaneum/corpus)
Your own site
<a href="https://agentmods.dev/commands/cwensel/arcaneum/corpus"><img src="https://agentmods.dev/badge/commands/cwensel/arcaneum/corpus/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 corpus

Your own site · 80×15
<a href="https://agentmods.dev/commands/cwensel/arcaneum/corpus"><img src="https://agentmods.dev/badge/commands/cwensel/arcaneum/corpus.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,148 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.00012 $0.03148
Opus 5.5 $0.00005 $0.01259
Sonnet 5.5 $0.00002 $0.00630
Haiku 4.5 $0.00001 $0.00315

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

Security

Grade A, and why

corpus 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 6d 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.

plugin/commands/corpus.md · 289 lines

How it starts

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

Recommended for most users. Manage corpora that combine vector search and full-text search for the same content. Full-text search comes from a text index in the corpus's Qdrant collection (the qdrant text backend, the default for a new install) or, on an install that runs MeiliSearch, from a MeiliSearch index of the same name (meili).

IMPORTANT: You must specify a subcommand.

Subcommands:

  • create: Create the Qdrant collection (and a MeiliSearch index for a meili corpus)
  • list: List all corpora with text coverage (qdrant) or parity (meili) status
  • update: Update corpus metadata without reindexing
  • delete: Delete the Qdrant collection and any MeiliSearch index of the corpus
  • sync: Index a directory into the corpus (Qdrant, plus MeiliSearch on a meili corpus)
  • repair: Selectively repair verifier-selected unhealthy files and PDF duplicates, then restore text coverage (qdrant) or parity (meili)
  • migrate-text: Move a corpus's text search between MeiliSearch and Qdrant; --all --to qdrant moves every corpus on MeiliSearch (see docs/guides/qdrant-only-text.md)
  • hook: Install a git hook that auto-syncs a repo on every commit
  • jobs: List running syncs, repairs, and hook drains, plus queued hook work (read-only; takes no locks)
  • info: Show corpus details
  • items: List indexed items (with parity status on a meili corpus)
  • parity: Check and restore the text index; Qdrant/MeiliSearch parity applies to meili corpora only
  • verify: Verify corpus health (and Qdrant/MeiliSearch parity for a meili corpus)
  • doctor: Check all corpora (or the named ones) read-only and list the commands that fix each problem

Common Options:

  • --json: Output in JSON format
  • --details: Show extended list columns, including exact item counts

Create Options:

  • name: Corpus name (required)
  • --type: Corpus type - code, pdf, or markdown (required)
  • --models: Embedding models, comma-separated (default inferred from --type: arctic-m for pdf/markdown, jina-code for code)

Delete Options:

  • name: Corpus name (required)
  • --confirm: Skip confirmation prompt
  • --json: Output in JSON format

Sync Options:

  • name: Corpus name (required, first positional argument)
  • directories: One or more directory paths to index (required)
  • --models: Embedding models (default: use corpus metadata)
  • --file-types: File extensions to index (e.g., .py,.md)
  • --gpu: Opt into accelerator embedding (CPU is the stable default)
  • --remote-embed: Also send on-request models (e.g. qwen3-embed) to the configured remote embedding workers for this run
  • --local-embed: Embed every model locally for this run, ignoring configured remote embedding workers
  • --background: Run below interactive work (compilers, tests) for continuous indexing; nice 10 on macOS, SCHED_IDLE on Linux
  • --changed-since REV: Sync only what a git commit or range touched (e.g. HEAD, ORIG_HEAD..HEAD), removing the files it deleted
  • --order: Process files by path (default), newest modification first, or oldest modification first; this changes processing order, not search ranking
  • --include-stale-policy: Also re-index otherwise unchanged files whose indexing policy is stale or missing
  • --from-index SELECTOR: Instead of paths, re-extract the indexed files whose stored metadata matches SELECTOR (e.g. method=pymupdf_normalized, version<0.10.0); shorthand keys are method, fallback, ocr, warning, version; !key selects files that do not record key
  • --no-wait: Fail instead of queueing when another sync of this corpus is running
  • --lock-timeout: Seconds to wait for the corpus write lock (default: 600)

Repair Options:

  • name: Corpus name (required)
  • --quality-threshold: Text quality threshold (0.0-1.0, default: 0.9)
  • --dry-run: Preview what would be repaired without making changes
  • --include-stale-policy: Also re-index files whose only issue is stale or missing indexing policy
  • --gpu: Opt into accelerator embedding (CPU is the stable default)
  • --remote-embed / --local-embed: Route this repair's document embedding as for sync (remote embedding workers)
  • --background: Run below interactive work, as for sync
  • --verbose: Show per-file quality scores and details
  • --json: Output in JSON format

Read the full file on GitHub · 289 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. 6d ago Changed · +6 lines · +4 tokens per session badc16ca3453
  2. 8d ago Changed · +4 lines b997d96de1bd
  3. 24d ago Changed d264399a1ae4
  4. 1mo ago Changed · +13 lines 518e2f29bc89
  5. 1mo ago Changed · +6 lines 450de9399874
  6. 1mo ago Changed · +3 lines 2cb7b2cdc5db
  7. 1mo ago Changed · +4 lines 5c6c00a121a0
  8. 1mo ago Changed · +22 lines 36826f53211a
  9. 2mo ago Changed · +28 lines 2fad11cdee8d
  10. 3mo ago First seen · 203 lines · 8 tokens per session scan A bba8dee4e3ea

Subscribe to this mod's changes

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

Related

corpus compared with commands from other repositories

corpus next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
corpuscwensel/arcaneumCommand83d agoMITA12Claude Code
ingestGalbaz1/video-research-mcpCommand2310d agoMITA10Claude Code
vector.batch_existsstratalab/strata-coreCommand5todayApache-2.0A0Claude Code
vector.batch_upsertstratalab/strata-coreCommand5todayApache-2.0A0Claude Code
vector.collection.liststratalab/strata-coreCommand5todayApache-2.0A0Claude Code
vector.collection.statsstratalab/strata-coreCommand5todayApache-2.0A0Claude Code
vector.batch_deletestratalab/strata-coreCommand5todayApache-2.0A0Claude Code