using-agentcairn-memory — скилл для Claude Code: память между сессиями
Учит агента сначала искать в памяти прошлые решения, а после работы сохранять важные факты. Нужен, когда задачи повторяются от сессии к сессии.
npx skills add ccf/agentcairn --skill using-agentcairn-memory -a claude-codeЧто делает using-agentcairn-memory
Скилл задаёт агенту порядок работы с памятью AgentCairn — хранилищем в виде Markdown-vault, которым владеет пользователь. Перед проектированием, отладкой или повторным выводом чего-то нетривиального агент вызывает recall с узким запросом, а найденную заметку раскрывает через build_context. Поиск идёт по всем проектам, но приоритет отдаётся текущему; чужие результаты помечаются [from: <project>], а параметр --scope project ограничивает выдачу одним репозиторием.
После решения, неочевидного фикса или замеченной подводной камни агент вызывает remember и записывает короткий самодостаточный факт. Мелочи пропускаются: сессию целиком и так забирает хук SessionEnd, а remember нужен для того, что стоит закрепить осознанно. Заметки цитируются по permalink.
Скилл работает только при загруженных MCP-инструментах AgentCairn. Если recall и remember недоступны, агент не должен выдумывать вызовы или делать вид, что установил рантайм, MCP-сервер, плагин либо хуки. Он сообщит, что интеграция не загружена, предложит $agentcairn-setup или нативные инструкции по установке и остановит работу с памятью до перезапуска хоста.
Какие задачи решает
- найти, как в прошлый раз чинили обновление auth-токена
- восстановить порядок миграций, о котором уже договаривались
- закрепить неочевидный фикс, чтобы не искать его заново
- сохранить устойчивое предпочтение пользователя по стилю коммитов
- подтянуть решение из другого репозитория по похожей задаче
Примеры запросов агенту
- Поищи в памяти, как мы решали проблему с обновлением auth-токена
- Запомни: jwt-secret ротируем при деплое через X
- Ограничь поиск по памяти текущим проектом и найди заметку про порядок миграций
Как установить using-agentcairn-memory
1Через Skills CLI (Vercel)
npx skills add ccf/agentcairn --skill using-agentcairn-memory -a claude-code2Вручную: положить файлы
~/.claude/skills/using-agentcairn-memory/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/using-agentcairn-memory/
1Через Skills CLI (Vercel)
npx skills add ccf/agentcairn --skill using-agentcairn-memory -a codex2Вручную: положить файлы
.agents/skills/using-agentcairn-memory/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add ccf/agentcairn --skill using-agentcairn-memory -a cursor2Вручную: положить файлы
.cursor/skills/using-agentcairn-memory/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install ccf/agentcairn using-agentcairn-memory2Вручную: положить файлы
.github/skills/using-agentcairn-memory/SKILL.md1Через Skills CLI (Vercel)
npx skills add ccf/agentcairn --skill using-agentcairn-memory -a gemini-cli2Командой платформы
gemini skills install https://github.com/ccf/agentcairn --path plugin/skills/using-agentcairn-memoryВручную: положить файлы
.devin/skills/using-agentcairn-memory/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add ccf/agentcairn --skill using-agentcairn-memory -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о using-agentcairn-memory
Как установить using-agentcairn-memory в Claude Code?
Выполните npx skills add ccf/agentcairn --skill using-agentcairn-memory -a claude-code. Скилл окажется в ~/.claude/skills/using-agentcairn-memory/SKILL.md.
Что делает using-agentcairn-memory?
Задаёт агенту два шага: перед нетривиальной задачей искать прошлые решения через recall, а после решения или фикса сохранять долговечный факт через remember.
Что нужно, чтобы скилл заработал?
Загруженные MCP-инструменты AgentCairn: без доступных recall и remember агент остановит работу с памятью и предложит $agentcairn-setup либо нативную установку с перезапуском хоста.
Исходный текст
SKILL.md · Apache-2.0
--- name: using-agentcairn-memory description: Use when AgentCairn memory tools are loaded and starting a non-trivial task or finishing a decision/fix — recall prior memory before working, and remember durable facts worth carrying across sessions. metadata: internal: true --- # Using agentcairn memory You have a persistent memory backed by agentcairn (a Markdown vault the user owns). Use it. ## Require the full integration This skill assumes AgentCairn's MCP tools are already loaded. Before following the memory workflow, confirm that `recall` and `remember` are available. If the tools are missing: - Do not invent tool calls or imply that this behavior skill installed the AgentCairn runtime, MCP server, plugin, or hooks. - Explain that the full AgentCairn integration is not loaded. - Invoke `$agentcairn-setup` if available, or direct the user to the native AgentCairn installation instructions. - Stop the memory workflow until installation is complete and the host has been restarted. ## Recall before you work Before designing, debugging, or re-deriving something non-trivial, **search memory first**: - Use the `recall` tool (hybrid search) with a focused query — "how did we fix the auth token refresh?", "what did we decide about the migration order?". - Expand a promising hit with `build_context` to read the full note. - Recall is cross-project: prior solutions in *any* repo can help. Cite notes by permalink. - Recall automatically prefers your current project's memories while still surfacing relevant cross-project ones (marked `[from: <project>]`); pass a project to target another repo, or `--scope project` to limit a query to just this one. ## Remember durable facts After a decision, a non-obvious fix, a gotcha, or a stated user preference, **persist it** with the `remember` tool — a short, self-contained fact. Good memories: "We rotate jwt-secret on deploy via X.", "User prefers rebase-merges.", "DuckDB TIMESTAMP stores naive-UTC — bind accordingly." Skip the trivial — the SessionEnd hook already captures the session in bulk; `remember` is for the high-value things worth pinning deliberately. The vault is plain Markdown the user can read and edit; treat it as shared, durable knowledge.
© ccf · Apache-2.0 · ccf/agentcairn