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/setup-knowledge-sync.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/setup-knowledge-sync)<a href="https://agentmods.dev/commands/everyone-needs-a-copilot/claude-copilot/setup-knowledge-sync"><img src="https://agentmods.dev/badge/commands/everyone-needs-a-copilot/claude-copilot/setup-knowledge-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.
<a href="https://agentmods.dev/commands/everyone-needs-a-copilot/claude-copilot/setup-knowledge-sync"><img src="https://agentmods.dev/badge/commands/everyone-needs-a-copilot/claude-copilot/setup-knowledge-sync.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.01196 |
| Opus 5.5 | $0.00000 | $0.00478 |
| Sonnet 5.5 | $0.00000 | $0.00239 |
| Haiku 4.5 | $0.00000 | $0.00120 |
Grade A, and why
setup-knowledge-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.
How it starts
The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Setup Knowledge Sync
Install a project Git hook that updates product Knowledge after release tags.
1. Resolve prerequisites
Use the nearest configured Knowledge tier; do not assume ~/.claude/knowledge is configured.
eval "$(cc env)"
KNOWLEDGE_REPO_PATH="${CC_KNOWLEDGE_REPOS%%,*}"
if [[ -n "$KNOWLEDGE_REPO_PATH" && -f "$KNOWLEDGE_REPO_PATH/knowledge-manifest.json" ]]; then
echo "FOUND: $KNOWLEDGE_REPO_PATH"
else
echo "MISSING"
fi
git rev-parse --is-inside-work-tree 2>/dev/null && echo "GIT_OK" || echo "NOT_GIT"
- On
MISSING, tell the user to run/knowledge-copilot, then stop. - On
NOT_GIT, explain that tag-based sync requires a Git repository, then stop.
Resolve project identity:
PROJECT_ROOT="$(git rev-parse --show-toplevel)"
PROJECT_NAME="$(basename "$PROJECT_ROOT")"
2. Check for an existing install
test -f "$PROJECT_ROOT/.git/hooks/post-tag" && echo HOOK_EXISTS || echo HOOK_MISSING
test -f "$PROJECT_ROOT/.git/hooks/sync-knowledge.sh" && echo SCRIPT_EXISTS || echo SCRIPT_MISSING
If both exist, ask whether to Reinstall, Test, or Cancel. Cancel stops. Test runs the dry-run command in step 4 without copying files.
3. Install
mkdir -p "$PROJECT_ROOT/.git/hooks"
cp ~/.claude/copilot/scripts/knowledge-sync/sync-knowledge.sh "$PROJECT_ROOT/.git/hooks/"
cp ~/.claude/copilot/scripts/knowledge-sync/extract-release-changes.sh "$PROJECT_ROOT/.git/hooks/"
cp ~/.claude/copilot/scripts/knowledge-sync/update-product-knowledge.sh "$PROJECT_ROOT/.git/hooks/"
cp ~/.claude/copilot/templates/hooks/post-tag "$PROJECT_ROOT/.git/hooks/"
# Git hooks run outside an env-hydrated shell. Bake in the tier selected above.
sed -i.bak "s|--tag \"\$TAG\"|--tag \"\$TAG\" --knowledge-repo \"$KNOWLEDGE_REPO_PATH\"|" "$PROJECT_ROOT/.git/hooks/post-tag"
rm -f "$PROJECT_ROOT/.git/hooks/post-tag.bak"
chmod +x "$PROJECT_ROOT/.git/hooks/post-tag" \
"$PROJECT_ROOT/.git/hooks/sync-knowledge.sh" \
"$PROJECT_ROOT/.git/hooks/extract-release-changes.sh" \
"$PROJECT_ROOT/.git/hooks/update-product-knowledge.sh"
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.
- 1mo ago First seen · 111 lines · 0 tokens per session scan A c6326900093e
setup-knowledge-sync 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 1,196 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
publish
Publish oh-my-opencode to npm via GitHub Actions workflow.
changelog
Create engaging changelogs for recent merges to main branch.
get-unpublished-changes
Compare HEAD with the latest published npm versions and list all unpublished changes by release layer.
release
Release guide version (CHANGELOG + VERSION + README + landing sync + commit + push).
update-infos-release
Update Claude Code releases tracking (guide + landing + version bump).
quality
A command for temporarily clearing a release quality gate or one named check, while recording the reason and expiry time. A quality gate is a required check that normally blocks completion or release.