agent-context-system
БесплатноЗапускает вложенные скриптыНе проверенA persistent local-only memory system for AI coding agents. Two files, one idea — AGENTS.md (committed, shared) + .agents.local.md (gitignored, personal)…
от modbender★ 21 звезда на GitHubОб этом скилле
Agent Context System
The Problem
Agents start from zero every session. You spend an hour getting your coding agent up to speed on a project, close the session, and start from zero the next day. The agent forgot everything. Every session is a cold start.
This isn't a limitation of the model. It's a context delivery problem. The agents have the capacity to remember — they just don't have the right inputs at the right time in the right format.
The Solution
Two markdown files. One committed, one gitignored. The agent reads both at the start of every session and updates the local one at the end.
AGENTS.md— Your project's source of truth. Committed and shared. Always in the agent's prompt. Under 120 lines. Contains compressed project knowledge: patterns, boundaries, gotchas, commands, architecture..agents.local.md— Your personal scratchpad. Gitignored. Grows over time as the agent logs what it learns each session. Session notes, dead ends, preferences, patterns that haven't been promoted yet.
That's it. No plugins, no infrastructure, no background processes. The convention lives inside the files themselves, and the agent follows it.
How It Works
1. Setup
Run the init script. It creates .agents.local.md from a template, ensures it's gitignored, and wires up your agent tool's config (CLAUDE.md symlink for Claude Code, .cursorrules for Cursor, .windsurfrules for Windsurf, copilot-instructions.md for Copilot).
# If you cloned the template repo:
./scripts/init-agent-context.sh
# If you installed as a skill (npx skills add):
bash .agents/skills/agent-context-system/scripts/init-agent-context.sh
Then edit AGENTS.md with your project specifics: name, stack, commands, actual patterns and gotchas from your codebase. This is the highest-leverage edit you'll make.
2. During Sessions
The agent reads both files at session start. AGENTS.md gives it compressed project knowledge. .agents.local.md gives it accumulated learnings from past sessions. The agent now has context that persists across sessions.
At session end, the agent proposes the session log entry to the user before writing. The agent must not append directly — it shows the proposed entry and waits for user approval before writing to .agents.local.md. Most agents (Copilot Chat, Cursor, Windsurf) don't have session-end hooks, so this depends on Rule 7 in AGENTS.md being seen and acted on, or the user saying "log this session." Claude Code handles this automatically via auto memory.
3. Over Time
The scratchpad grows. When it hits 300 lines, the agent compresses: deduplicate, merge related entries, keep it tight. During compression, if a pattern has shown up across 3+ sessions, the agent flags it in the scratchpad's "Ready to Promote" section using the same pipe-delimited format that AGENTS.md expects.
You decide when to move flagged items from the scratchpad into AGENTS.md. The scratchpad is where things are experimental. AGENTS.md is where proven knowledge lives.
Session notes → .agents.local.md → agent flags stable patterns → you promote to AGENTS.md
(personal) (shared)
Scripts
The template includes five scripts:
init-agent-context.sh
Sets up the local agent scratchpad and agent tool integrations. Run once per clone. Safe to re-run.
- Creates
.agents.local.mdfrom template - Ensures
.agents.local.mdis gitignored - Asks which agents you use (Claude, Cursor, Windsurf, Copilot) and wires up the right config
- Creates CLAUDE.md symlink for Claude Code (since it doesn't read AGENTS.md yet)
- Adds agent context directive to .cursorrules, .windsurfrules, or copilot-instructions.md
compress.sh
Compresses the scratchpad when it exceeds 300 lines. Deduplicates, merges related entries, flags stable patterns for promotion. Not yet implemented — instructions for the agent are in AGENTS.md's Local Context section.
promote.sh
Moves flagged items from .agents.local.md's "Ready to Promote" section into AGENTS.md. Not yet implemented — currently a manual step.
validate.sh
Validates AGENTS.md stays under 120 lines and checks format consistency. Not yet implemented.
publish-template.sh
Push to GitHub and mark as a template repo. Run once. Creates a private GitHub repo and marks it as a template so you can use it to create new projects with gh repo create my-project --template YOUR_USERNAME/agent-context-system --private.
Knowledge Flow
Knowledge doesn't just sit in one place. It flows.
Learnings start as session notes in .agents.local.md. The agent writes them at the end of each session. During compression, if a pattern has shown up across 3+ sessions, the agent flags it in the scratchpad's "Ready to Promote" section using the same pipe-delimited format that AGENTS.md expects.
Установить agent-context-system в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл agent-context-system?
A persistent local-only memory system for AI coding agents. Two files, one idea — AGENTS.md (committed, shared) + .agents.local.md (gitignored, personal). Agents read both at session start, update the scratchpad at session end, and promote stable patterns over time. Works across Claude Code, Cursor, Copilot, Windsurf. Subagent-ready. No plugins, no infrastructure, no background processes.
Как установить скилл agent-context-system?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл agent-context-system запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic