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 instructions/yvgude/lean-ctx/agents-mdgit clone --depth 1 https://github.com/yvgude/lean-ctxWhat 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.02223 | $0.02223 |
| Opus 5 | $0.01111 | $0.01111 |
| Sonnet 5 | $0.00445 | $0.00445 |
| Haiku 4.5 | $0.00222 | $0.00222 |
Grade A, and why
lean-ctx AGENTS.md 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 3d 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 — 201 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context Engineering Layer
lean-ctx optimizes LLM context by compressing file reads, shell output, and search results.
Mandatory Multi-Agent Delivery
For every substantive task in this repository, load and follow
docs/internal/skills/agent-orchestration.md before taking task actions.
Use a coordinated Codex CLI swarm of 2 to 15 agents for the work; do not
silently fall back to a single-agent workflow. Fifteen agents is a hard
concurrent maximum; choose the smallest effective swarm and give every agent a
distinct role.
This rule is owned by the orchestration lead. Agents with a concrete delegated subtask are swarm workers: they coordinate through lean-ctx and complete their assigned role, but do not recursively launch another swarm unless the lead explicitly asks them to do so.
- Runtime: every Codex CLI agent MUST use
--model gpt-5.6-lunaand-c 'model_reasoning_effort="max"'. - LeanCTX coordination: every agent registers on the lean-ctx agent bus, checks directives, and uses lean-ctx context tools; the lead records the integrated decision and progress through lean-ctx.
- Topology: assign independent, non-duplicative roles. Use a mapper or reviewer alongside the implementer; for non-parallel changes, the reviewer validates the implementer's result after it is ready.
- Safe ownership: only one agent may edit a given file or shared worktree at a time. Parallel agents investigate, test, or review in isolation unless explicit file ownership or separate worktrees are assigned.
- Completion: the lead integrates the findings, runs the relevant quality gates, and reports the agents' evidence. A task is not complete merely because an agent returned successfully.
Direct conversational answers, status updates, and clarification questions are not substantive tasks and do not require a swarm. The user may explicitly request a different runtime or a single-agent exception.
Integration Mode: Replace
Native Read/Grep/Glob/Shell are denied by policy. lean-ctx MCP tools are the only path for reading files and running commands:
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.
- 3d ago First seen · 201 lines · 2,223 tokens per session scan A 6e41fa034d2e
lean-ctx AGENTS.md is an instructions file published in the GitHub repository yvgude/lean-ctx (3,696 stars, last pushed today), licensed Apache-2.0. It adds 2,223 tokens to every session, about $0.0111 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 instructions, from other repositories
entroly CLAUDE.md
Instructions for juyterman1000/entroly, covering claude.md, gstack operating protocol, default workflow, entroly trust invariants and review checklist.
aghub AGENTS.md
Instructions for AkaraChen/aghub, covering aghub knowledge base, structure, where to look, conventions and rust.
cyrus copilot-instructions.md
Copilot instructions for cyrusagents/cyrus: Note, there is a need to maintain the use of '--print' when running the claude exec commands because that is what makes it non-interactive.
agentic-playwright skill-creator.instructions.md
Instructions for idavidov13/agentic-playwright, covering skill creator, communicating with the user, creating a skill, capture intent and interview and research.
agent-toolkit AGENTS.md
Instructions for ulises-jeremias/agent-toolkit, covering agents.md — ai agent contract, what this toolkit does, repository structure, operating rules and how to add a skill.
domain-experts CLAUDE.md
Instructions for wonsukchoi/domain-experts, covering domain experts — session bootstrap, non-negotiables when adding or editing roles, dual-graph context policy, mandatory: always follow this order and token usage.