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 skills/andreagriffiths11/agent-context-system/openclawnpx skills add AndreaGriffiths11/agent-context-system --skill openclawgit clone --depth 1 https://github.com/AndreaGriffiths11/agent-context-systemWrote 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/skills/andreagriffiths11/agent-context-system/openclaw)<a href="https://agentmods.dev/skills/andreagriffiths11/agent-context-system/openclaw"><img src="https://agentmods.dev/badge/skills/andreagriffiths11/agent-context-system/openclaw.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.00012 | $0.01025 |
| Opus 5 | $0.00006 | $0.00513 |
| Sonnet 5 | $0.00002 | $0.00205 |
| Haiku 4.5 | $0.00001 | $0.00103 |
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 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 — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Context System
Agents start from zero every session. This skill fixes that.
The Two-File System
AGENTS.md— Project source of truth. Committed and shared. Under 120 lines. Contains compressed project knowledge: patterns, boundaries, gotchas, commands..agents.local.md— Personal scratchpad. Gitignored. Grows as you log what you learn each session.
Quick Start
# Clone into your OpenClaw skills directory
git clone https://github.com/AndreaGriffiths11/agent-context-system.git skills/agent-context-system
# Initialize in your project
agent-context init
All files (CLI, templates, docs) are included in the repo. No external downloads.
Commands
agent-context init # Set up context system in current project
agent-context validate # Check setup is correct
agent-context promote # Find patterns to move from scratchpad to AGENTS.md
Workflow
-
Init: Run
agent-context init. Creates.agents.local.md, ensures it's gitignored, creates CLAUDE.md symlink (Claude Code reads CLAUDE.md, not AGENTS.md — the symlink lets you maintain one file). -
Work: Read both files at session start.
AGENTS.md= project knowledge..agents.local.md= personal learnings. -
Log: At session end, propose a session log entry to the user (see Session Protocol below).
-
Compress: When scratchpad hits 300 lines, compress: dedupe, merge related entries.
-
Promote: Patterns recurring across 3+ sessions get flagged. Run
agent-context promoteto see candidates. You decide what moves toAGENTS.md.
Key Resources
- Project template:
AGENTS.md— the committed file structure and format - Scripts:
scripts/— init, publish - Deep docs:
agent_docs/— conventions, architecture, gotchas (load on demand)
Important Context
- Instruction budget: Frontier LLMs follow ~150-200 instructions. Keep
AGENTS.mdunder 120 lines. - Passive context wins: Vercel evals showed 100% pass rate with embedded context vs 53% when agents decide to look things up.
- Subagent-ready: Subagents don't inherit conversation history. They only get root instruction files. Tell them to read
.agents.local.mdtoo.
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 · 87 lines · 12 tokens per session scan A 722f1942e19f
agent-context is a skill published in the GitHub repository AndreaGriffiths11/agent-context-system (25 stars, last pushed 1mo ago), licensed MIT. It adds 12 tokens to every session and 1,025 once invoked, about $0.0001 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 skills, from other repositories
pace-knowledge
Use for PACEflow knowledge/thoughts notes, finding-to-knowledge extraction, correction knowledge links, and Obsidian frontmatter/L0-L2 note structure.
wiki
LLM Wiki — persistent markdown knowledge base that compounds across sessions (Karpathy model).
remember
Review reusable project knowledge and decide what belongs in project memory, notepad, or durable docs.
moai-foundation-context
Manages context window optimization, session state persistence, and token budget allocation for multi-agent workflows. Use for token budget management, context limits, or session handoff across agents.
arch-save
Save an architect's state, clear its context, and re-init automatically — the packaged save→clear→re-init refresh cycle. Use when the owner directs a context refresh, or says "/arch-save", "save and clear", "refresh your context". Runs on the owner's direction; an architect does not invoke it autonomously mid-task.…
kn-init
Use at the start of a new session to read project docs, understand context, and see current state.