corpus

corpus is a command for coding agents from cwensel/arcaneum. It costs 8 tokens per session (1,766 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

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/corpus
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 corpus

README.md
[![agentmods](https://agentmods.dev/badge/commands/cwensel/arcaneum/corpus.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 8 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,766 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.00008 $0.01766
Opus 5 $0.00004 $0.00883
Sonnet 5 $0.00002 $0.00353
Haiku 4.5 $0.00001 $0.00177

Measured 4d ago against content hash bba8dee4e3ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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/corpus.md · 203 lines

How it starts

The opening of the file, as written. The whole thing — 203 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 both vector search (Qdrant) and full-text search (MeiliSearch) for the same content.

IMPORTANT: You must specify a subcommand.

Subcommands:

  • create: Create both Qdrant collection and MeiliSearch index
  • list: List all corpora with parity status
  • update: Update corpus metadata without reindexing
  • delete: Delete both Qdrant collection and MeiliSearch index
  • sync: Index directory to both systems simultaneously
  • repair: Re-index incomplete or garbled files (text quality detection)
  • hook: Install a git hook that auto-syncs a repo on every commit
  • info: Show corpus details (both systems)
  • items: List indexed items with parity status
  • parity: Check and restore parity between systems
  • verify: Verify corpus health across both Qdrant and MeiliSearch

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)
  • --changed-since REV: Sync only what a git commit or range touched (e.g. HEAD, ORIG_HEAD..HEAD), removing the files it deleted
  • --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
  • --gpu: Opt into accelerator embedding (CPU is the stable default)
  • --verbose: Show per-file quality scores and details
  • --json: Output in JSON format

Hook Options:

hook takes its own subcommand: install, uninstall, or status.

  • name: Corpus name. Omit it on install to be walked through picking or creating a corpus, choosing hook points, and backfilling.
  • --repo: Repository to act on (default: current directory)
  • --hook: Hook point - post-commit (default), post-merge, post-checkout, or post-rewrite. On uninstall, defaults to all of them.
  • --no-spawn: (install) Queue touched paths but start no background worker
  • --yes/-y: (install) Take the defaults instead of prompting
  • --service: Also register/remove an OS watcher that drains the spool after a reboot or a failed spawn
  • --json: Output in JSON format

Info/Items Options:

  • name: Corpus name (required)
  • --json: Output in JSON format

Parity Options:

  • name: Corpus name (optional - if omitted, processes all corpora)
  • --dry-run: Preview what would be backfilled without making changes
  • --verify: Verify chunk counts match between systems
  • --repair-metadata: Update MeiliSearch docs with missing git metadata (code corpora)
  • --create-missing: Create missing MeiliSearch indexes for qdrant_only corpora
  • --confirm: Skip confirmation prompt when processing all corpora
  • --verbose: Show detailed progress
  • --json: Output in JSON format

Examples:

/corpus create MyDocs --type pdf
/corpus create MyDocsQuality --type pdf --models stella
/corpus sync MyDocs ~/Documents
/corpus create CodeBase --type code
/corpus sync CodeBase ~/projects --file-types .py,.js,.md
/corpus sync CodeBase ~/project1 ~/project2 ~/project3
/corpus repair PapersFast
/corpus repair PapersFast --dry-run
/corpus repair PapersFast --quality-threshold 0.5
/corpus sync CodeBase --changed-since HEAD
/corpus hook install
/corpus hook install CodeBase
/corpus hook install CodeBase --hook post-merge
/corpus hook status
/corpus hook uninstall CodeBase
/corpus info MyDocs
/corpus items CodeBase
/corpus parity CodeBase --verify
/corpus parity CodeBase --repair-metadata
/corpus parity --create-missing --dry-run
/corpus parity --create-missing --confirm
/corpus delete OldCorpus
/corpus delete OldCorpus --confirm

Read the full file on GitHub · 203 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 · 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 (7 stars, last pushed 8d ago), licensed MIT. It adds 8 tokens to every session and 1,766 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.