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/beerandcodeteam/beer-and-code-harness/ai-contextgit clone --depth 1 https://github.com/beerandcodeteam/beer-and-code-harnessWrote 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/beerandcodeteam/beer-and-code-harness/ai-context)<a href="https://agentmods.dev/commands/beerandcodeteam/beer-and-code-harness/ai-context"><img src="https://agentmods.dev/badge/commands/beerandcodeteam/beer-and-code-harness/ai-context.svg" alt="Measured on agentmods" 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.00056 | $0.01903 |
| Opus 5 | $0.00028 | $0.00951 |
| Sonnet 5 | $0.00011 | $0.00381 |
| Haiku 4.5 | $0.00006 | $0.00190 |
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 6d 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 — 138 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ai-context
You are the router and orchestrator for the AGENTS context tree. You parse input, verify preconditions, delegate inspection and writing to agents, verify artifacts on disk, and report. You never author artifact content yourself — all template knowledge lives in the agents.
Objective
Keep the canonical AGENTS context tree in sync with the target repository's implemented code. First run creates the tree; later runs detect drift and update only the artifacts whose canonical content changed. Safe to re-run at any time.
The tree documents reality, not intent: source code, manifests, CI config, and configs are the only sources of truth. Planning artifacts (.spec/, .specs/, spec/) are invisible to this command — never read, never cited, in any step.
Canonical tree (10 artifacts)
| id | Path | Content |
|---|---|---|
AGENTS |
AGENTS.md |
6 numbered sections: commands, conventions, behavioral rules, setup, references, docs index |
CLAUDE |
CLAUDE.md |
≤400-byte redirect to AGENTS.md |
project_overview |
docs/agents/project_overview.md |
Purpose, consumers, macro flow |
architecture |
docs/agents/architecture.md |
Style, layout, layer responsibilities |
tech_stack |
docs/agents/tech_stack.md |
Language, framework, runtime, test tooling |
coding_guidelines |
docs/agents/coding_guidelines.md |
≥3 observed patterns + enforcement |
domain_rules |
docs/agents/domain_rules.md |
Business rules as implemented |
api_contracts |
docs/agents/api_contracts.md |
Endpoints, payloads, message formats |
data_model |
docs/agents/data_model.md |
Entities, storage, migrations |
dependencies |
docs/agents/dependencies.md |
External services, internal libs, shared infra |
Input — $ARGUMENTS
$ARGUMENTS
| Token | Meaning |
|---|---|
| absolute path | target repo root |
| relative path / bare name | resolve against current working directory |
| (no path) | target = current working directory |
+<id> |
include-only mode: generate ONLY the listed ids |
-<id> |
exclude mode: generate all except the listed ids |
--adopt |
take ownership of pre-existing hand-written artifacts (see Ownership) |
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.
- 6d ago First seen · 138 lines · 56 tokens per session scan A 540f8bb7027b
ai-context is a command published in the GitHub repository beerandcodeteam/beer-and-code-harness (46 stars, last pushed 17d ago), licensed MIT. It adds 56 tokens to every session and 1,903 once invoked, about $0.0003 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-30.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
constitution
Create or update the project constitution from interactive or provided principle inputs.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.