AgentContext — AI skill for Claude Code
AgentContext v1.0.0 — local project memory layer for AI coding agents across tools, accounts and providers.
How to install AgentContext
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open xumiao121/AgentContext and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What AgentContext does
AgentContext v1.0.0 — local project memory layer for AI coding agents across tools, accounts and providers.
Alternatives in AI
- HarnessKit — More than a skill manager — manage skills, MCP servers, plugins, hooks, CLIs, configs, memory & rules across e 416 ★
- onWatch — Open-source Go CLI that tracks AI API quota usage across 7 providers (Synthetic, Z.ai, Anthropic, Codex, GitHu 397 ★
- Guild — Shared context, memory, and task coordination across AI coding agents 311 ★
README
AgentContext
**A local memory layer for AI coding agents.** 让不同 Agent、账号和供应商通过项目文件接续工作。
[](#安装) [](#安装) [](LICENSE)
AgentContext 将当前开发状态、项目决策和可见对话保存在工程目录中。切换 Codex 账号、换模型,或由 Claude Code / Cursor 接手时,新的 Agent 可以先读取 这层记忆,再核对代码和 Git,继续开发。
项目基于已有朋友版演进,保留“中央后台 + 多项目注册 + 项目内三份 Markdown” 设计。**v1.0.0 是首个开源版本**;原朋友版的 v2.x 属于另一条版本线。
为什么需要它
聊天历史通常属于某个工具、账号或会话。新会话能看到代码,却未必知道为什么 选择某个方案、哪些验证已经做过、哪些问题尚未解决。仅复制代码不能传递这些信息。
AgentContext 把可携带的上下文放到文件中,不需要向量数据库、云服务或 API Key。 它不恢复模型的内部状态,也不搬运各平台的账号聊天数据库。
工作原理
flowchart TD
A[Agent A 完成工作] --> H[更新 HANDOFF.md]
C[Codex 本地可见消息] --> L[可选 Transcript Logger]
L --> T[CHATLOG.md / RECENT.md]
H --> M[项目 Memory Layer]
T --> M
M --> B[Agent B 读取 AGENTS.md 和记忆]
B --> G[核对代码与 Git 后继续工作]
你的项目/
├── AGENTS.md 接手规则,可提交
├── CLAUDE.md 可选 Claude 入口,可提交
└── .codex-memory/ 私人上下文,默认不提交
├── HANDOFF.md 当前目标、进度、决策、验证、下一步
├── RECENT.md 最近对话窗口,由同步器维护
└── CHATLOG.md 可见历史,由同步器追加
新 Agent 先读 HANDOFF,再读 RECENT;长历史按关键词搜索。实际文件和 Git 始终 优先于历史摘要。HANDOFF 由 Agent 或用户维护,同步器不会替你生成项目决策。
支持范围
| 场景 | 共享项目记忆 | 自动采集聊天 |
|---|---|---|
| Codex 本地 CLI / Desktop 会话 | AGENTS.md | 支持本文档列出的本地 JSONL 格式 |
| Codex 更换账号 / provider | 使用同一项目即可接续 | 会话仍在配置的本地 sessions 目录时支持 |
| Claude Code | 安装加 -Claude 创建 CLAUDE.md 桥接 |
v1.0.0 未实现 |
| Cursor | 通过根目录 AGENTS.md 使用共享规则 | v1.0.0 未实现 |
| 其他可读文件的 Agent | 显式要求读取 AGENTS.md | 需扩展采集适配器 |
Claude 的入口依据 [Claude Code 项目记忆说明](https://code.claude.com/docs/en/memory), Cursor 的入口依据 [Cursor 规则说明](https://cursor.com/docs/rules)。规则是否被执行 仍取决于工具、会话和 Agent;这不是强制执行引擎。
安装
需要 **Windows 10/11、PowerShell 7.2+**,普通用户权限即可。Git 仅在开发、验证 或发布源码时需要。未安装 PowerShell 7 时,请按 [微软安装说明](https://learn.microsoft.com/en-us/po
Related Skills
Somora Agent
Local-first gateway for personal AI agents with persistent memory across multiple LLM providers
Memgentic
Universal AI memory layer — your second brain across every AI tool. Local-first, open source, MCP-compatible.
Zenith
Self-hosted, local-first AI workspace on your own Ollama models — chat, a Claude-Code-class coding agent, deep
RelayBrain
Coordination and context layer for AI coding agents. Shared file locks, live patch sync, and portable project
Trackline
An alignment layer for AI agents. Watches whether an agent's actions still match the task, rules and evidence
Opendray
Self-hosted gateway for Claude Code, Codex, Antigravity, Grok Build, OpenCode. Run AI coding agents on your ow
Related Agents
Family Researcher
General local-research agent for one assigned angle — activities, providers, childcare options, restaurants, c
Sales Bd Guild
Sales, Business Development, and Key Accounts Governance Layer
ProvenanceAuditor
Provenance and deployment integrity auditor -- validates SLSA sidecars, manifests, and drift across providers.