agent-context

agent-context is a skill for Claude Code, Codex from AndreaGriffiths11/agent-context-system. It costs 12 tokens per session (1,025 once invoked), scanned A, original, MIT.

A project-context system that keeps shared project knowledge in AGENTS.md and personal session notes in .agents.local.md. AGENTS.md is a small reference file for patterns, boundaries, known problems, and commands.

In plain words
What is it for?
Use it to initialize, validate, and maintain persistent context for an AI coding agent in a project.
Why use it?
It reduces the repeated setup work caused by coding agents starting without knowledge of earlier sessions.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: mentions CLAUDE.md; mentions subagents; mentions Claude Code.

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

Made for: Claude Code, Codex.

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/andreagriffiths11/agent-context-system/openclaw.svg)](https://agentmods.dev/skills/andreagriffiths11/agent-context-system/openclaw)
Your own site
<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>
Per session 12 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,025 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.1 $0.00012 $0.01025
Opus 5 $0.00006 $0.00513
Sonnet 5 $0.00002 $0.00205
Haiku 4.5 $0.00001 $0.00103

Measured 6d ago against content hash 722f1942e19f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, 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 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.

openclaw/SKILL.md · 87 lines

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

  1. 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).

  2. Work: Read both files at session start. AGENTS.md = project knowledge. .agents.local.md = personal learnings.

  3. Log: At session end, propose a session log entry to the user (see Session Protocol below).

  4. Compress: When scratchpad hits 300 lines, compress: dedupe, merge related entries.

  5. Promote: Patterns recurring across 3+ sessions get flagged. Run agent-context promote to see candidates. You decide what moves to AGENTS.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.md under 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.md too.

Read the full file on GitHub · 87 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. 6d ago First seen · 87 lines · 12 tokens per session scan A 722f1942e19f

Subscribe to this mod's changes

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.