cite-citadel: Instructions file for Claude Code

CLAUDE.md

cite-citadel CLAUDE.md is an instructions file for Claude Code from MarkusNeusinger/cite-citadel. It costs 17,101 tokens per session, scanned A, a copy of cite-citadel copilot-instructions.md, MIT.

Project instructions for cite-citadel, a Python tool that turns source files into a linked, searchable personal wiki with citations.

In plain words
What is it for?
Use them when developing, testing, or reviewing cite-citadel and its command-line or wiki-generation features.
Why use it?
They explain how the project is structured, how to run its commands, and how to test changes reliably.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; positional $N argument.

This is MarkusNeusinger/cite-citadel's own configuration. It tells Claude Code how to work on cite-citadel itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything cite-citadel configures →

Reuse

Borrowing it

Nothing to install: this file belongs to MarkusNeusinger/cite-citadel. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/MarkusNeusinger/cite-citadel/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/MarkusNeusinger/cite-citadel

Made for: Claude Code.

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 cite-citadel CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/markusneusinger/cite-citadel/claude-md/github.svg)](https://agentmods.dev/instructions/markusneusinger/cite-citadel/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/markusneusinger/cite-citadel/claude-md"><img src="https://agentmods.dev/badge/instructions/markusneusinger/cite-citadel/claude-md/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 cite-citadel CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/markusneusinger/cite-citadel/claude-md"><img src="https://agentmods.dev/badge/instructions/markusneusinger/cite-citadel/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17,101 This file is loaded in full into every session.
When invoked 17,101 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 91% copy Near-identical to another mod 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.17101 $0.17101
Opus 5.5 $0.06840 $0.06840
Sonnet 5.5 $0.03420 $0.03420
Haiku 4.5 $0.01710 $0.01710

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

Security

Grade A, and why

cite-citadel CLAUDE.md 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 14d 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.

Origin

This is a copy

91% identical to cite-citadel copilot-instructions.md — 9 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

CLAUDE.md · 762 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

What this is

cite-citadel (CLI: citadel, PyPI package: cite-citadel) is an LLM-maintained, fully-cited personal wiki in Google's Open Knowledge Format, with an MCP server so an AI can search and read it. It implements Karpathy's LLM-Wiki pattern: drop arbitrary text-bearing files into raw/, and one agentic CLI session per source folds each into a cross-linked OKF wiki under wiki/. Pure Python 3.12, KISS. Runtime deps are only mcp, pyyaml, pypdf, and rich (all pure-Python, no native weight) — there is no LLM SDK and no API key: ingest shells out to a coding-agent CLI you already have logged in (claude/copilot/agy).

Commands

Setup: uv sync (creates .venv, installs deps + the dev group + the citadel script).

Use the portable invocation everywhere — it works identically on Linux/macOS/Windows and needs no .exe (the uv run citadel … shorthand often breaks on Windows because AV quarantines uv's generated citadel.exe):

uv run python -m citadel <subcommand>

Subcommands: init [DIR] (scaffold a workspace: citadel.toml marker, .env, raw/, wiki/; idempotent), ingest [paths…] (fold raw/ into the wiki; --verbose/-v streams the agent session, --log-dir DIR writes a transcript per agent session (named after how the source was read — pdf-text/pdf-native/office-text — shortened by path segment), --quiet drops the live progress display, --jobs N/-j folds N sources in CONCURRENTLY (default 1 = serial; CITADEL_JOBS), --full-rescan distrusts the manifest's stat cache and re-hashes every tracked source, --force <paths> deliberately re-reads already-ingested sources as a reconcile — it requires explicit paths and is refused without them, --reingest <paths> goes one step further: each named tracked source is re-imported FRESH — a kind="delete" cleanup session strips its previous facts (manifest entry dropped), then the same run ingests it as a brand-new source under the current model + rules — the full re-think reconcile's keep-the-existing-treatment rule deliberately avoids (requires explicit paths like --force; the two flags and --retry refuse to combine; a failed cleanup blocks that source's fresh session), --retry re-runs everything STUCK without naming paths: every failed source still on disk plus every ingested source no wiki page cites — the zero-entry sources the run report flags as no_pages and status marks NO PAGES — as forced reconciles; it refuses paths/--force and exits 0 when nothing is stuck, --guidance TEXT hands this ONE run a free-text steer ("create one machine registry from the maintenance lists") appended to each source-reading session's prompt — within the rules, never overriding citations; max 2000 chars, CITADEL_INGEST_GUIDANCE is the env twin, the MCP wiki_ingest takes it as a per-call argument, and the steer joins the resume checkpoint identity), refresh [--limit N] [--min-age-days D] [--stale-rules] [--dry-run] [--jobs N] (the THIRD lifecycle: re-verify the least-recently-checked sources — ordered by the manifest's ingested_at stamp, oldest/stampless first — through forced reconcile sessions on an explicit per-run budget of N sources; the sustainable alternative to regenerating the wiki after a model upgrade; --stale-rules narrows the queue to the (stale) sources — the one command that clears that marker after a rules edit), curate [--dry-run] [--limit N] [--stale-rules] [--diff PATH] [--retry] [--guidance TEXT] [paths…] (the SECOND lifecycle: improve EXISTING pages — re-sort/split/re-ground/resolve contradictions/fix locators — against a recomputed findings checklist; --guidance is the curate twin of ingest's steer — it directs structure and may ground an uncited sentence but never changes a cited fact, carried in the cluster's findings file, and the paths it names (a page, a folder, a glob) are curated even when no detector flagged them), status (read-only per-source state table: ingested / failed / skipped-duplicate / ignored / oversized / pending; MCP twin wiki_status), doctor (read-only setup health check — OK/WARN/FAIL lines for workspace / rules / config-parse fallbacks / agent CLI / the configured ingest model / raw roots / wiki placement (the wiki nested inside a raw root) / child paths (the UNC-vs-drive-letter cwd) / manifest / billing / agent instructions (instruction files in/above the workspace a NON-isolated session would load, per backend — llm._INSTRUCTION_FILES) / the MCP SDK (mcp.server.mcpserver imports, version inside the mcp>=2,<3 pin; CI's mcp-floor job runs the server tests on exactly 2.0.0) / the HTTP-serve posture / wiki-git state / a best-effort PyPI update check / workspace coherence; every check runs isolated, so one that raises is its own FAIL line, never a traceback; needs no workspace, exits 1 only on a FAIL; --probe ADDS one tiny paid session per configured model — llm.probe_session, production argv + hermetic flags, claude also --tools ""/--max-budget-usd/--no-session-persistence when advertised, in a throwaway temp dir with a ≤120 s timeout, following ingest's --bare retry rule — so a credential-stripping --bare, a CLI not logged in for -p, or a rejected model id shows before the first source pays), adopt (record THIS workspace root in the manifest's meta.workspaces after a move or a writer-machine switch — no agent session, under the run lock, refuses a re-keyed key space (manifest.workspace_rekeyed) and never rewrites a corrupt manifest; the free fix for the "written by a workspace rooted at" warning, which names it, as does doctor's manifest line; CLI-only, never on a read-only mirror), serve [--http [--host H] [--port P] [--path /mcp] [--read-only]] (the MCP server — stdio by default; --http serves the SAME surface over MCP's Streamable HTTP transport for a client that is not on this machine, mandatory bearer token, loopback default, optional read-only), capture <text> [--from WHO] [--topic T] (append one attributed note from a conversation to the raw/ capture log raw/captures/YYYY-MM.md; - reads stdin; the next ingest folds it in — the conversational-capture bridge, MCP twin wiki_capture), search <query> [--tag T] [--limit N], define <term> / read <rel_path> / raw <key> [--locator L] / neighbors <rel_path> / index / sources (CLI twins of the wiki_define/wiki_read/wiki_raw/wiki_neighbors/wiki_index/wiki_sources MCP tools — full CLI↔MCP parity), tags [tag], lint [--stale-days N] (exit 3 when the report is not clean — its own code, distinct from the usage/no-workspace exit 2), check [paths…], view [--out PATH] [--no-open] [--obsidian] [--lang CODE] (--lang overrides CITADEL_WIKI_LANG for the viewer's UI chrome + <html lang>), rules list|show|eject. citadel --version prints the version and (like --help) needs no workspace.

Read the full file on GitHub · 762 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. 14d ago Changed · +76 lines · +2,096 tokens per session 2dc89332ca34
  2. 20d ago Changed · +9 lines · +215 tokens per session 820a87c348ba
  3. 24d ago Changed · +4 lines · +154 tokens per session 61880d82af59
  4. 2mo ago First seen · 673 lines · 14,636 tokens per session scan A 660c03cd7ef2

Subscribe to this mod's changes

cite-citadel CLAUDE.md is an instructions file published in the GitHub repository MarkusNeusinger/cite-citadel (3 stars, last pushed 16d ago), licensed MIT. It adds 17,101 tokens to every session, about $0.0684 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 91% identical to cite-citadel copilot-instructions.md, differing in 9 lines, and is treated as a copy.

Related

cite-citadel CLAUDE.md compared with instructions from other repositories

cite-citadel CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cite-citadel CLAUDE.mdMarkusNeusinger/cite-citadelInstructions file316d agoMITA17,101Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode ai-customization.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA1,907GitHub Copilot