README

A reference guide for slash commands in a contextd-aware development workflow. It explains commands for setting up, checking, switching, and maintaining project knowledge across workspaces.

In plain words
What is it for?
Use it to find the right contextd command for setup, workspace navigation, configuration checks, or updating project knowledge.
Why use it?
It helps the agent use the correct workspace and configuration, reducing the risk of reading or editing knowledge from the wrong project.

Command for Claude Code

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/philngt/contextd/readme
Clone the repo
git clone --depth 1 https://github.com/philngt/contextd

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,718 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.00000 $0.02718
Opus 5 $0.00000 $0.01359
Sonnet 5 $0.00000 $0.00544
Haiku 4.5 $0.00000 $0.00272

Measured 2d ago against content hash e90ec34f34fa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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.

.claude/commands/README.md · 137 lines

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_root bằ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-curator subagent + 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

Read the full file on GitHub · 137 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. 2d ago First seen · 137 lines · 0 tokens per session scan A e90ec34f34fa

Subscribe to this mod's changes

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.