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/littlebearapps/contextdocs/ai-contextgit clone --depth 1 https://github.com/littlebearapps/contextdocsWhat 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.00039 | $0.01154 |
| Opus 5 | $0.00019 | $0.00577 |
| Sonnet 5 | $0.00008 | $0.00231 |
| Haiku 4.5 | $0.00004 | $0.00115 |
Grade A, and why
ai-context 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.
How it starts
The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/ai-context
Generate lean context files that help AI coding assistants understand your project's non-obvious conventions and constraints. ContextDocs now treats AGENTS.md as the canonical shared context, then emits tool-specific bridge files that reference or subset it plus add only tool-unique behaviour. Applies the Signal Gate principle — excludes discoverable content (directory listings, file trees, architecture overviews) that research shows reduces AI task success.
Behaviour
- Load the
ai-contextskill for templates, the Signal Gate, and the codebase analysis workflow - Load the
context-qualityrule for quality criteria - Run the codebase analysis: detect language, framework, test runner, linter, conventions
- For
all,init, andupdate, generate or refreshAGENTS.mdas the canonical shared context - Generate the requested bridge file(s) from the same analysis, keeping them thin and limited to tool-specific additions. Single-tool modes (
claude,cursor,copilot,windsurf,cline,gemini) update only the requested bridge; useagentswhen you want to refreshAGENTS.mditself.
Arguments
Generate
- No arguments /
all: GenerateAGENTS.mdplus all applicable bridge files (CLAUDE.md,.cursor/rules/agents.mdc,.windsurfrules,.clinerules/agents.md,GEMINI.md). Copilot bridge is optional — only generated when project needs Copilot-specific scoping (Copilot loads AGENTS.md natively). claude: Generate CLAUDE.md onlyagents: Generate AGENTS.md onlycursor: Generate.cursor/rules/agents.mdc(modern format). Legacy.cursorruleskept only if already present.copilot: Generate .github/copilot-instructions.md onlywindsurf: Generate .windsurfrules onlycline: Generate.clinerules/agents.md(directory mode). Flat.clineruleskept only if already present.gemini: Generate GEMINI.md only
Single-tool generate modes leave AGENTS.md unchanged so targeted bridge refreshes stay predictable.
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.
- yesterday First seen · 76 lines · 39 tokens per session scan A 3be3185b59d9
ai-context is a command published in the GitHub repository littlebearapps/contextdocs (5 stars, last pushed 1mo ago), licensed MIT. It adds 39 tokens to every session and 1,154 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.
Other commands, from other repositories
compact-prep
Ask the agent to prepare for conversation compaction by updating any relevant state and providing guidance for the compaction agent and to kick off the session there after.
score
Run bun-sticky on the current directory to check FAF score.
test
Run the championship-grade test suite and report results.
save
Save this conversation as a new or existing reusable context.
brownfield-map
Run a complete brownfield analysis on the codebase and generate MASTER.md, summaries, risk scores, and all derived analytics.
checklist
Generate a custom checklist for the current feature based on user requirements.