context-economy

A default reading policy for coding-agent sessions that limits file reading to the smallest useful context. It uses file changes, searches, and nearby tests to decide what to inspect.

In plain words
What is it for?
Reviewing changed files, finding related tests and dependencies, inspecting targeted code sections, and keeping technical details such as commands and error messages intact.
Why use it?
It reduces unnecessary context and keeps sessions focused on the files and code relevant to the task.

Agent

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 agents/aksoftcode/aicrew/context-economy
Clone the repo
git clone --depth 1 https://github.com/AKSoftCode/aicrew
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 276 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.00276
Opus 5 $0.00000 $0.00138
Sonnet 5 $0.00000 $0.00055
Haiku 4.5 $0.00000 $0.00028

Measured yesterday against content hash 202f7127b124, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

context-economy 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.

skills/agents/context-economy.md · 36 lines

What it actually says

context-economy (default read policy)

Default: apply on every session. Not opt-in via /lean on.

Combine with ~/Agents/agents/terse.md default output style unless user disables with /normal or /lean off.

Read policy (always on by default)

  • Use diff/tree/search before reading file contents.
  • Prefer changed files first: git diff --name-only, then nearest related tests and dependencies.
  • Prefer targeted reads over whole-file reads.
  • Read only the smallest useful slice around a symbol, match, error, or changed region.
  • Reuse prior summaries unless the file changed.
  • Read full files only when the file is small, the task is structural, or partial context is insufficient.
  • Keep tree views compact and filtered; avoid generated, vendored, or build output paths unless required.
  • Compact context between major phases so stale exploration does not accumulate.

Never compress or summarize away:

  • Code blocks
  • Commands
  • File paths
  • Flags
  • URLs
  • Error messages
  • Version numbers
  • Explicit constraints, invariants, and acceptance criteria

Disable

  • /normal or /lean off → relax read policy; fuller exploration and explanations OK for the session

Reinforce (optional)

  • /lean on → explicit boost; behavior matches default unless user previously disabled
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. yesterday First seen · 36 lines · 0 tokens per session scan A 202f7127b124

Subscribe to this mod's changes

context-economy is an agent published in the GitHub repository AKSoftCode/aicrew (3 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 276 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-31.