Memorysync
Automatic long-term memory for OpenCode: recalled context injected per session, facts captured from your messages, the MemorySync MCP servers and slash commands registered — one plugin line, session-safe by contract.
1
207
近 7 天 173
36.7
生态多维模型
3 天前
2026-10-01
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-memorysync@1.1.0"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-memorysync@1.1.0"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D opencode-memorysyncOpenCode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
This folder is the development home of the MemorySync plugins for
Claude Code / Claude Cowork, Cursor, OpenAI Codex, the
Devin CLI (formerly Windsurf), and Google Antigravity — one
plugin package (plugins/memorysync/) with per-platform manifests, all
sharing the same dependency-free Node hook scripts, skills and the
MemorySync MCP servers.
Layout
sdk/agent-plugins/
├── .claude-plugin/marketplace.json ← Claude Code marketplace catalog
├── .cursor-plugin/marketplace.json ← Cursor team-marketplace catalog
├── .codex-plugin/marketplace.json ← Codex marketplace catalog
├── marketplace.json ← Codex root catalog (CLI reads this)
├── plugins/memorysync/ ← THE PLUGIN (see its README)
│ ├── .claude-plugin/ .cursor-plugin/ .codex-plugin/ ← manifests
│ ├── .mcp.json .cursor-mcp.json .codex-mcp.json ← MCP per platform
│ ├── hooks/hooks.json cursor-hooks.json codex-hooks.json
│ ├── rules/memorysync.mdc ← Cursor recall rule (hooks can't inject there)
│ ├── scripts/ ← shared Node >=18 hook scripts
│ └── skills/ ← memory / status / remember / recall
├── examples/cowork-settings.json ← repo settings for teams + Cowork
├── examples/devin/ ← Devin CLI hooks.v1.json + always-on rule
├── antigravity/ ← Google Antigravity plugin bundle (degit-installable)
├── skills/building-with-memorysync/ ← the BUILDER skill (canonical copy)
├── building-with-memorysync/ ← builder plugin: skill copy + docs-MCP (.mcp.json)
└── tests/ ← contract suites + live runbook
Test
node --test tests/hooks.test.mjs tests/platform-hooks.test.mjs tests/builder-skill.test.mjs
claude plugin validate plugins/memorysync --strict
claude plugin validate building-with-memorysync --strict
claude plugin validate . --strict
tests/live-local.md # model-visible verification runbook
Release flow (public distribution)
Distribution happens from the dedicated PUBLIC repo
memorysyncio/memorysync-plugins (renamed from memorysync-claude —
GitHub redirects the old name, so existing Claude installs keep
updating). Its content is exactly this folder minus tests/:
- Bump
versionin every manifest that carries one (Claude plugin + marketplace entry, Cursor plugin + marketplace entry, Codex plugin) andPLUGIN_VERSIONinplugins/memorysync/scripts/lib.mjs(the version every request's User-Agent announces) — they must agree;claude plugin tag plugins/memorysyncchecks the Claude pair andtests/hooks.test.mjschecks all of them. The Antigravity bundle (antigravity/plugin.json) and the builder plugin carry their own versions. - Copy
.claude-plugin/,.cursor-plugin/,.codex-plugin/,marketplace.json,plugins/,examples/and this README to the public repo checkout; commit and push tomain. - Installs:
- Claude Code:
/plugin marketplace add memorysyncio/memorysync-plugins→/plugin install memorysync@memorysync - Cursor: team marketplace import of the repo, or local
~/.cursor/plugins/local/memorysync; official listing via cursor.com/marketplace/publish (manual review) - Codex:
codex plugin marketplace add memorysyncio/memorysync-plugins→codex plugin add memorysync@memorysync - Devin CLI: copy
examples/devin/hooks.v1.jsonto~/.config/devin/hooks.v1.json(or a repo's.devin/), point the paths at a checkout ofplugins/memorysync/scripts/; the scripts run under thedevinplatform argument. Rules file:examples/devin/rules/memorysync.md→.devin/rules/. MCP:npx memorysync-mcp-install --client devin-desktop. Devin's closed-beta plugin system loads Claude-format plugins, sodevin plugins install memorysyncio/memorysync-pluginsis expected to work as access opens up. - Google Antigravity: the
antigravity/folder is a complete plugin bundle (plugin.json + mcp_config.json + hooks.json + skills + rule + script copies). Install:npx degit memorysyncio/memorysync-plugins/antigravity ~/.gemini/config/plugins/memorysync. The bundle'sscripts/are byte-copies ofplugins/memorysync/scripts/— a CI test enforces they never drift.
- Claude Code:
Enterprise note: Anthropic's Claude-org GitHub marketplace sync rejects
public repos — enterprises fork this repo privately and register the
fork via extraKnownMarketplaces.
同类生态推荐
Dreams
opencode-dreams
Stops your AI coding agent from repeating the same mistakes. OpenCode plugin that consolidates failure modes, patterns, and preferences from every session into a persistent knowledge base injected into future sessions automatically.
Claude Memory
opencode-claude-memory
OpenCode plugin for Claude Code memory: persistent, local-first shared memory with Claude Code-compatible Markdown files, LLM recall, in-process auto extraction, and auto-dream consolidation
Mnemory
@fpytloun/opencode-mnemory
OpenCode plugin for mnemory — persistent AI memory with auto-recall, auto-capture, and explicit memory tools