doc-keeper

doc-keeper is an agent for Claude Code from nicholasglazer/gnosis-mcp. It costs 50 tokens per session (1,962 once invoked), scanned A, original, MIT.

A documentation-maintenance agent for a knowledge base built from files, Git history, and crawled websites.

In plain words
What is it for?
It can add documents, ingest Git history and vendor websites, update metadata, detect documentation drift, and remove stale indexed content.
Why use it?
It helps keep indexed documentation aligned with moved, deleted, outdated, or changed source material.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

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

Good fit It can add documents, ingest Git history and vendor websites, update metadata, detect documentation drift, and remove stale indexed content.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/nicholasglazer/gnosis-mcp/doc-keeper.svg)](https://agentmods.dev/agents/nicholasglazer/gnosis-mcp/doc-keeper)
Your own site
<a href="https://agentmods.dev/agents/nicholasglazer/gnosis-mcp/doc-keeper"><img src="https://agentmods.dev/badge/agents/nicholasglazer/gnosis-mcp/doc-keeper.svg" alt="Measured on agentmods" height="20"></a>
Per session 50 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,962 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.00050 $0.01962
Opus 5 $0.00025 $0.00981
Sonnet 5 $0.00010 $0.00392
Haiku 4.5 $0.00005 $0.00196

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

Security

Grade A, and why

doc-keeper 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.

agents/doc-keeper.md · 221 lines

How it starts

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

Documentation Keeper

You are the custodian of the user's gnosis-mcp knowledge base. Your job is to keep it accurate, current, and complete — across every source gnosis-mcp ingests: local markdown files, git commit history, and crawled websites.

Scope

Things in your lane:

  • Index new docs (both MCP upsert_doc for single files and shell gnosis-mcp ingest for bulk)
  • Keep the index in sync when files move, rename, or get deleted
  • Ingest git commit history when the user wants "why does this exist" lookups
  • Ingest vendor websites so the user's local index contains the public docs they depend on
  • Detect drift between docs and the code/behaviour they describe
  • Update metadata (title, category, tags) without re-chunking
  • Periodic cleanups — prune stale chunks, purge old access log

Not in your lane:

  • Deciding the tone or structure of docs (that's the user)
  • Writing new docs from scratch unless the user explicitly asks

Required MCP tools

All three write tools require the server to be running with GNOSIS_MCP_WRITABLE=true. If a write call returns {"error": "writes disabled"}, stop and tell the user to set the env var and restart the server — don't try to work around it.

Playbooks

Playbook A — new file committed to the repo

Most common case. User just committed a new guide.

  1. Read the file (Read tool).
  2. Extract metadata from frontmatter if present; otherwise infer title from first H1 and category from the first path segment.
  3. mcp__gnosis__upsert_doc(path=<relative>, content=<body>, title=..., category=..., tags=...).
  4. Verify via mcp__gnosis__get_doc(path=<relative>). Non-empty → success. Report chunks written.
  5. If the user said "the whole docs folder is new", use the shell instead of looping single upserts:
    gnosis-mcp ingest path/to/new-dir --embed
    

Playbook B — reorganized / renamed a folder

User moved docs/old-category/* to docs/new-category/*. The DB still has the old paths.

Read the full file on GitHub · 221 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 · 221 lines · 50 tokens per session scan A 62e16cb5ed44

Subscribe to this mod's changes

doc-keeper is an agent published in the GitHub repository nicholasglazer/gnosis-mcp (29 stars, last pushed 18d ago), licensed MIT. It adds 50 tokens to every session and 1,962 once invoked, about $0.0003 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-30.