sources

A command for registering folders that contain source material for a wiki. The wiki can read these folders in place, so the files do not need to be copied into its own source folder.

In plain words
What is it for?
Use it to connect external note or research directories to the wiki and control which files they provide.
Why use it?
It removes duplicate copies of research files and lets one wiki use sources stored in existing projects. You can add, list, or remove registered folders.

Command

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/doneyli/claude-code-plugins/sources
Clone the repo
git clone --depth 1 https://github.com/doneyli/claude-code-plugins
Per session 30 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 875 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.00030 $0.00875
Opus 5 $0.00015 $0.00438
Sonnet 5 $0.00006 $0.00175
Haiku 4.5 $0.00003 $0.00088

Measured yesterday against content hash 35a327101ff1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sources 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 yesterday.

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.

llm-wiki/commands/sources.md · 91 lines

How it starts

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

Manage registered source directories for this wiki. Sources let you point the wiki at folders that already exist in your projects — the wiki reads from them directly without copying files into raw/.

Parse arguments

Split $ARGUMENTS into a subcommand:

  • add <path> — register a new source directory
  • list — show all registered sources
  • remove <name> — unregister a source (does NOT delete wiki pages compiled from it)

Source storage

Sources are stored in sources.yaml at the wiki root. Read it if it exists; create it on first add.

Schema:

sources:
  - name: research          # unique key (derived from path basename if not given)
    path: /absolute/path    # resolved to absolute
    pattern: "**/*.md"      # glob pattern for files to include
  - name: signals
    path: /absolute/path/to/signals
    pattern: "**/*.md"

Subcommand: add

/llm-wiki:sources add ~/content-system/.claude/research
/llm-wiki:sources add ~/content-system/ideas/signals --name signals
  1. Resolve the path to absolute (expand ~).
  2. Verify the directory exists. If not, error: "Directory not found: "
  3. Derive a name from the last path component if --name wasn't given. If the name already exists in sources.yaml, error: "Source '' already registered. Use a different --name."
  4. Detect what file types exist in the directory. Set pattern accordingly:
    • Only .md files → "**/*.md"
    • Mixed formats (md + pdf + csv + json etc.) → "**/*" (Claude can read most formats natively)
  5. Read existing sources.yaml (or start with {sources: []}), append the new entry, write back atomically.
  6. Count matching files. Print:
    Added source 'research' → /Users/doneyli/content-system/.claude/research
    22 files matching pattern **/*.md
    Run /llm-wiki:ingest --all to compile these into the wiki.
    

Subcommand: list

/llm-wiki:sources list

Read sources.yaml. For each entry, count matching files on disk. Print a table:

Read the full file on GitHub · 91 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. yesterday First seen · 91 lines · 30 tokens per session scan A 35a327101ff1

Subscribe to this mod's changes

sources is a command published in the GitHub repository doneyli/claude-code-plugins (4 stars, last pushed 4mo ago), licensed MIT. It adds 30 tokens to every session and 875 once invoked, about $0.0002 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.