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.
npx agentmods add commands/philngt/contextd/readmegit clone --depth 1 https://github.com/philngt/contextdWhat 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 | $0.00000 | $0.02718 |
| Opus 5 | $0.00000 | $0.01359 |
| Sonnet 5 | $0.00000 | $0.00544 |
| Haiku 4.5 | $0.00000 | $0.00272 |
Grade A, and why
README 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 2d 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 — 137 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Slash Commands — Index
Đây là slash commands cho workflow contextd-aware. Trong migration window chúng vẫn cài dưới .claude/commands, nhưng canonical engine/config là contextd CLI + <cwd>/.contextd/config.json. Pipeline kiến trúc tổng thể: agents/pipeline/README.md.
Quy tắc chung:
- Mỗi command có Bước 0 resolve workspace +
knowledge_rootbằng shared resolver trước khi làm bất cứ gì. - Mọi knowledge access scope CHỈ trong workspace active (không cross-workspace).
- Command edit knowledge docs (update-contextd, rebase-contextd, evidence-apply) delegate qua
contextd-curatorsubagent + main agent verify path sau khi curator return.
Workspace setup & navigation
| Command | Purpose | When to use |
|---|---|---|
/contextd-setup |
Bootstrap .contextd/config.json |
Lần đầu tích hợp contextd vào codebase mới, hoặc đổi workspace |
/contextd-detect |
Validate config/workspace + scan dependency để propose update | Sanity check sau khi setup, hoặc khi /use-contextd lỗi resolve |
/switch-workspace {name} |
Đổi workspace field trong config hiện tại, ưu tiên .contextd/config.json |
Khi cùng codebase phục vụ nhiều domain workspace, hoặc khi clone codebase nội bộ |
/new-workspace {name} |
Scaffold workspace mới trong {knowledge_root}/workspaces/{name}/ từ template |
Khi join công ty/dự án mới, cần knowledge sandbox riêng |
/list-workspaces |
In bảng mọi workspace + đánh dấu workspace của codebase hiện tại | Khám phá workspace nào có sẵn trước khi /switch-workspace |
Context Usage (per-task pipeline)
| Command | Purpose | When to use |
|---|---|---|
/use-contextd |
Gọi canonical contextd context để sinh .contextd/context/current-task.json + markdown render + materialized pack |
Trước MỌI task implement_feature / fix_bug / design / incident / review |
/find <keywords> |
Advisory fuzzy discovery patterns + contracts + services + packs — không override artifact deterministic | Quick lookup khi đã biết mình cần gì; trước khi mở /use-contextd đầy đủ |
/update-contextd |
Sync knowledge docs với code đã thay đổi (git diff → curator áp dụng) | Sau khi code merge để knowledge không drift; tự detect engine vs workspace scope |
/rebase-contextd |
Quét knowledge docs vs codebase thực tế để vá mọi chỗ docs nói khác code chạy | Định kỳ (hằng tuần/tháng) hoặc khi nghi knowledge lỗi thời lớn |
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.
- 2d ago First seen · 137 lines · 0 tokens per session scan A e90ec34f34fa
README is a command published in the GitHub repository philngt/contextd (29 stars, last pushed 12d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,718 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-08-30.
Other commands, from other repositories
OPSX: Continue
Continue working on a change - create the next artifact (Experimental).
update-changelog-and-tag
You are preparing a release. Follow these steps precisely.
OPSX: Fast Forward
Create a change and generate all artifacts needed for implementation in one go.
vitaecontext-github
Audit or improve GitHub profile and repository SEO.
vitaecontext-x
Audit or improve X/Twitter profile and posting strategy.
help
Category: System Syntax: /help [command|topic].