agent-context

agent-context is a skill for Claude Code, Codex from cote-star/agent-chorus. It costs 57 tokens per session (6,483 once invoked), scanned A, original, MIT.

A workflow for creating, checking, and maintaining an .agent-context directory in a code repository. This directory stores project structure, file maps, change checklists, failure warnings, operating notes, and machine-readable navigation rules for coding agents.

In plain words
What is it for?
Use it when preparing a repository for AI-assisted development, refreshing its guidance after code changes, or checking whether its agent documentation is complete and accurate.
Why use it?
It gives agents a reliable map of a codebase before they start changing it. This reduces aimless searching and helps them follow the repository's required files, checks, and reporting rules.

Skill for Claude CodeCodex

Part of the agent-chorus plugin — 2 skills shipped together

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 skills/cote-star/agent-chorus/agent-context
Any agent
npx skills add cote-star/agent-chorus --skill agent-context
Clone the repo
git clone --depth 1 https://github.com/cote-star/agent-chorus

Made for: Claude Code, Codex.

Or install agent-chorus, the plugin that ships this one along with the rest of its 2 skills.

Wrote 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.

agentmods badge for agent-context

README.md
[![agentmods](https://agentmods.dev/badge/skills/cote-star/agent-chorus/agent-context.svg)](https://agentmods.dev/skills/cote-star/agent-chorus/agent-context)
Your own site
<a href="https://agentmods.dev/skills/cote-star/agent-chorus/agent-context"><img src="https://agentmods.dev/badge/skills/cote-star/agent-chorus/agent-context.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,483 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.00057 $0.06483
Opus 5 $0.00028 $0.03241
Sonnet 5 $0.00011 $0.01297
Haiku 4.5 $0.00006 $0.00648

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

Security

Grade A, and why

agent-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 4d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (tools/check_freshness.sh, tools/pre-push-hook.sh, tools/verify_agent_context.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/agent-context/SKILL.md · 471 lines

How it starts

The opening of the file, as written. The whole thing — 471 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Context

Create, validate, and maintain a structured .agent-context/ directory for a repository. This is the single most impactful thing you can do to improve how AI agents work on a large codebase.

How It Works — The Big Picture

What gets created

A .agent-context/ directory in the repo root with three layers:

  • Content (5 markdown files) — architecture, code map with risk ratings, change checklists with explicit file paths, silent failure modes, operations. Readable by humans and all agents.
  • Authority (3 JSON files, tier 3) — task routing, completeness contracts ("these files MUST be in your answer"), reporting rules. Used by Claude and similar agents that trust structured guidance.
  • Navigation (1 JSON file) — search scopes ("search HERE, not THERE"), verification shortcuts with line ranges. Used by Codex, Cursor, and similar agents that verify everything against code.

Plus 2-3 sentence routing blocks in CLAUDE.md / AGENTS.md / GEMINI.md / .cursorrules (~90 tokens each) that tell agents to read the pack before opening any repo files.

Tiers

Not every repo needs the full pack. Choose a tier based on complexity:

Tier Files Best for
Tier 1 (minimal) 20_CODE_MAP.md + search_scope.json Quick adoption, 50-100 file repos
Tier 2 (standard) + 00_START_HERE.md, 30_BEHAVIORAL_INVARIANTS.md, manifest.json, acceptance_tests.md Most repos, 100-500 files
Tier 3 (full) + all 5 markdown + authority layer (routes.json, completeness_contract.json, reporting_rules.json) Complex repos, 500+ files, multi-agent workflows

If using the CLI: agent-context init --tier 1|2|3 . --install-hook (default: tier 3).

First time setup

You ask an agent: "set up agent context for this repo"

The agent reads the entire repo, fills the pack files describing the architecture, key paths, change patterns, and search boundaries, copies the helper tools, installs the advisory freshness hook when safe, validates everything, runs acceptance tests with grep verification, and commits. Takes ~15-20 minutes for a large repo.

Read the full file on GitHub · 471 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. 4d ago First seen · 471 lines · 57 tokens per session scan A 5be1aa4b70a1

Subscribe to this mod's changes

agent-context is a skill published in the GitHub repository cote-star/agent-chorus (13 stars, last pushed 2mo ago), licensed MIT. It adds 57 tokens to every session and 6,483 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.