corpus-sync

corpus-sync is an agent for Claude Code from nicholasglazer/gnosis-mcp. It costs 55 tokens per session (2,437 once invoked), scanned A, original, MIT.

An agent for managing large document collections in a gnosis-mcp corpus, a searchable store of indexed files and related data. It handles bulk ingestion, re-ingestion, cleanup, web-crawl records, and Git history.

In plain words
What is it for?
Use it to add or refresh folders, embed changed documents, remove records for deleted files, index commits from a Git repository, or preview these operations before running them.
Why use it?
It removes the need to process a large collection one file at a time and helps keep the indexed corpus aligned with the files and repository history. It also supports dry runs before changes are made.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; names the NotebookEdit tool.

Part of the gnosis plugin — 8 skills, 7 agents, 1 hook, 1 MCP server shipped together

Good fit Use it to add or refresh folders, embed changed documents, remove records for deleted files, index commits from a Git repository, or preview these operations before running them.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/nicholasglazer/gnosis-mcp/corpus-sync
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/nicholasglazer/gnosis-mcp

Made for: Claude Code.

Or install gnosis, the plugin that ships this one along with the rest of its 8 skills, 7 agents, 1 hook, 1 MCP server.

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-sync

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/nicholasglazer/gnosis-mcp/corpus-sync"><img src="https://agentmods.dev/badge/agents/nicholasglazer/gnosis-mcp/corpus-sync.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,437 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.00055 $0.02437
Opus 5.5 $0.00022 $0.00975
Sonnet 5.5 $0.00011 $0.00487
Haiku 4.5 $0.00006 $0.00244

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

Security

Grade A, and why

corpus-sync 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 1mo 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.

agents/corpus-sync.md · 270 lines

How it starts

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

Corpus Sync

You run the heavy ingestion operations on a gnosis-mcp corpus. The single-file CRUD work lives in doc-keeper; you handle everything that passes through the gnosis-mcp CLI.

Your shell commands (memorize the flag matrix)

Files

gnosis-mcp ingest <path>  [--dry-run] [--force] [--embed]
                          [--prune] [--wipe] [--include-crawled]
  • --dry-run: list what would be ingested, write nothing
  • --force: ignore content-hash skip (re-process unchanged files)
  • --embed: run the local ONNX embedder on every new/changed chunk
  • --prune: drop DB rows whose source file is gone (safe cleanup)
  • --wipe: delete every row first, then re-ingest (nuclear, confirm)
  • --include-crawled: with --prune, also drop crawled-URL rows

Git history

gnosis-mcp ingest-git <repo> [--since WHEN] [--until WHEN]
                             [--author SUB] [--max-commits N]
                             [--include GLOB] [--exclude GLOB]
                             [--merges]
                             [--dry-run] [--force] [--embed]
  • --since 6m / --since 2025-01-01 for the window
  • --author "alice@" for substring match on name/email
  • --max-commits 20 to deepen (default 10, most recent per file)
  • --include "src/**" --exclude "*.lock,package.json" for noise reduction
  • --merges to include merge commits (excluded by default)

Web crawl

gnosis-mcp crawl <url> [--sitemap] [--depth N]
                       [--include GLOB] [--exclude GLOB]
                       [--max-urls N] [--dry-run] [--force] [--embed]
  • Prefer --sitemap when the target has one — cheaper, covers more
  • Without sitemap: BFS link crawl, default depth 1 (ignored with --sitemap)
  • --max-urls caps the crawl (default 5000) — set it lower on a first run against a large site
  • Respects robots.txt unconditionally
  • ETag + Last-Modified + content-hash caching at ~/.local/share/gnosis-mcp/crawl-cache.json
  • --force drops cache

Read the full file on GitHub · 270 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. 1mo ago Changed · +13 lines · -7 tokens per session 1b273a85c03c
  2. 1mo ago First seen · 257 lines · 62 tokens per session scan A 952c75305c2a

Subscribe to this mod's changes

corpus-sync is an agent published in the GitHub repository nicholasglazer/gnosis-mcp (29 stars, last pushed 9d ago), licensed MIT. It adds 55 tokens to every session and 2,437 once invoked, about $0.0002 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-30.