Borrowing it
Nothing to install: this file belongs to Everyone-Needs-A-Copilot/claude-copilot. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Everyone-Needs-A-Copilot/claude-copilot/main/.claude/commands/knowledge-copilot.mdgit clone --depth 1 https://github.com/Everyone-Needs-A-Copilot/claude-copilotWrote 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.
[](https://agentmods.dev/commands/everyone-needs-a-copilot/claude-copilot/knowledge-copilot)<a href="https://agentmods.dev/commands/everyone-needs-a-copilot/claude-copilot/knowledge-copilot"><img src="https://agentmods.dev/badge/commands/everyone-needs-a-copilot/claude-copilot/knowledge-copilot/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.
<a href="https://agentmods.dev/commands/everyone-needs-a-copilot/claude-copilot/knowledge-copilot"><img src="https://agentmods.dev/badge/commands/everyone-needs-a-copilot/claude-copilot/knowledge-copilot.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00733 |
| Opus 5.5 | $0.00000 | $0.00293 |
| Sonnet 5.5 | $0.00000 | $0.00147 |
| Haiku 4.5 | $0.00000 | $0.00073 |
Grade A, and why
knowledge-copilot 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 7d 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.
How it starts
The opening of the file, as written. The whole thing — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Knowledge Copilot — Bootstrapper
Locates the Knowledge Copilot repository on this machine, then hands off to the methodology inside it. This command is a thin bootstrapper; the substantive KMS-building methodology lives in the repo at docs/00-knowledge-copilot/01-build-a-kms.md.
Step 1 — Hydrate env vars
eval "$(cc env)"
This populates CC_KNOWLEDGE_REPO (and CC_SHARED_DOCS) if the machine config has a path set.
Step 2 — Locate the Knowledge Copilot repo
Resolve REPO_PATH by checking these sources in order; stop at the first hit:
# 1. Canonical env var (set via cc env)
echo "${CC_KNOWLEDGE_REPO:-}"
# 2. Config lookup (in case env wasn't hydrated this session)
cc config get paths.knowledge_repo 2>/dev/null && echo "FOUND_CONFIGURED"
# 3. Generic install location (symlink at ~/.claude/knowledge)
readlink -f ~/.claude/knowledge 2>/dev/null
Set REPO_PATH to the first resolved path. If none resolve, proceed to Step 3.
Step 3 — If repo not found: guide the user
The canonical GitHub repo during transition:
- Current name:
https://github.com/Everyone-Needs-A-Copilot/knowledge-copilot - Future canonical:
https://github.com/Everyone-Needs-A-Copilot/knowledge-copilot
Ask the user (use AskUserQuestion):
Question: "No Knowledge Copilot repo found on this machine. What would you like to do?" Header: "Setup" Options:
- "Clone the canonical repo" — ask where to put it (default: a sibling directory next to this project), then
git clone https://github.com/Everyone-Needs-A-Copilot/knowledge-copilot.git "$REPO_PATH"(the repo is public, so this works anonymously over HTTPS with no sign-in or SSH key) - "Create a new knowledge repo" — start fresh with guided discovery
- "Link an existing local repo" — provide a path
After cloning or creating, set REPO_PATH and register it:
cc config set paths.knowledge_repo "$REPO_PATH"
cc config set paths.shared_docs "$REPO_PATH"
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.
- 7d ago Changed 4da1d2ea607e
- 1mo ago First seen · 83 lines · 0 tokens per session scan A 4fbc12cb6ee2
knowledge-copilot is a command published in the GitHub repository Everyone-Needs-A-Copilot/claude-copilot (14 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 733 tokens. 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-09-04.
Other commands, from other repositories
instinct-import
Import instincts from external sources.
learn
Extract patterns and learnings from current session.
context-save
Save project context, decisions, and progress for a later session.
export-closedloop-learnings
Exports pending ClosedLoop learnings to global location with deduplication.
recall-save
Generate / overwrite .recall/context.md with Recall's local offline summarizer.
cleanup
Sweep /.claude disk hygiene to stated retentions, clean up stale plans from repos, audit plugin health, and compact agent memory files.