ai-memory-routing-install
它能做什么
该技能设置把 AI 工具与 ai-memory 连接起来的指令块和技能文件。适合希望智能体正确使用记忆工具的人。
适用场景
- ✓当你希望在智能体设置中安装 ai-memory 路由指令的时候。
- ✓当 ai-memory 指令或技能需要修复或刷新的时候。
- ✓当你希望删除 ai-memory 托管的指令或技能的时候。
技能链接
https://github.com/akitaonrails/ai-memory/blob/main/crates/ai-memory-core/src/routing_skills/ai-memory-routing-install/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请把 ai-memory 路由指令安装到我的 CLAUDE.md 中,并刷新这些技能。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会从 ai-memory 安装工具中获取标准的指令块和技能文件,然后把它们放在标记行之间。标记之外的内容保持不变。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
ai-memory routing install
Use this skill when the user wants ai-memory's agent-facing routing instructions or managed Agent Skills installed, refreshed, repaired, or removed.
Tools in this cluster
memory_install_self_routingreturns the canonical markered instruction block, marker strings, filename hints, notes, and managed skill payloads for agents that cannot let the MCP server write the host filesystem directly. Passcompact: truewhen managed Agent Skills are installed or when refreshing a file that already uses the compact snippet.
Managed instruction marker
The always-loaded instruction block is owned by ai-memory only between these markers.
- Start marker:
<!-- ai-memory:start --> - End marker:
<!-- ai-memory:end -->
Refresh must replace the first complete marker-bounded block whose start and end delimiters appear alone on their own lines, preserving unrelated content before and after it. Ignore inline mentions of marker strings inside prose or code; they are not delimiters. If no complete line-delimited block exists, append the canonical block with one blank line of separation. Never edit unrelated instructions while refreshing ai-memory routing.
Managed skill marker
Every ai-memory-managed SKILL.md file contains this ownership marker.
<!-- ai-memory-managed: routing-skill -->
Installers and uninstallers should overwrite or remove same-name skill files only when that marker is present, unless the user supplied an explicit force option. If a same-name skill lacks the marker, skip it with an actionable message so user-authored skills are preserved.
Global Grok installs also write $GROK_HOME/rules/ai-memory-handoff.md (default ~/.grok/rules/ai-memory-handoff.md) with the ownership marker <!-- ai-memory-managed: grok-handoff-rule -->. Overwrite or uninstall that file only when the marker is present, unless the user supplied --force. Project-scope Grok skill installs leave that user rule alone.
Skill install targets
Managed skills are ordinary Agent Skills. Their relative file path is <skill>/SKILL.md, and the installer prepends the selected skill root.
Project-local targets:
.claude/skills/<skill>/SKILL.mdfor Claude-compatible installs..agents/skills/<skill>/SKILL.mdfor cross-client installs..grok/skills/<skill>/SKILL.mdfor Grok Build CLI installs..github/skills/<skill>/SKILL.mdfor GitHub Copilot CLI installs.
Global targets:
~/.claude/skills/<skill>/SKILL.mdfor Claude-compatible installs.~/.agents/skills/<skill>/SKILL.mdfor cross-client installs.$GROK_HOME/skills/<skill>/SKILL.mdfor Grok Build CLI installs (default:~/.grok/skills/<skill>/SKILL.md).$COPILOT_HOME/skills/<skill>/SKILL.mdfor GitHub Copilot CLI installs (default:~/.copilot/skills/<skill>/SKILL.md).
Use platform-aware path joining. Do not build paths by string concatenation.
Refresh guidance
For an agent-side refresh, call the install-routing tool (pass compact: true if the target file already uses the compact snippet or if managed Agent Skills handle detailed routing). Its returned target_hints are authoritative for skill roots: choose the right instruction filename from agent_filenames, write the markered block with the agent's file-edit tool, and write each managed skill file below the selected hint using its relative_path. When a hint is an array, install the skill under every listed root. Claude Code normally uses CLAUDE.md and .claude/skills; Codex, OpenCode, Cursor, Gemini CLI, and AGENTS-aware clients normally use AGENTS.md and .agents/skills; Antigravity uses AGENTS.md and .agents/skills in a project, with separate App/IDE and CLI roots globally; Grok Build CLI uses AGENTS.md and .grok/skills; GitHub Copilot CLI uses AGENTS.md and .github/skills unless the project says otherwise.
For a CLI refresh, prefer the canonical install command. The snippet and skills must be updated from the same core-owned assets so they do not drift.
常见问题
它会改动我的其他指令吗?
不会。它只替换 ai-memory 标记之间的内容块,不相关的内容保持不变。
这些标记有什么用?
它们标明文本由 ai-memory 负责,因此刷新时不会触及你的其他指令。
它可以更新哪些文件?
CLAUDE.md 或 AGENTS.md 等指令文件,以及被托管的技能文件夹。
详情
作者的原始描述
Use this skill for any request to install, refresh, repair, inspect, or remove ai-memory's agent-facing routing: managed instruction snippets, Agent Skills, CLAUDE.md/AGENTS.md integration, or local/global skill roots. Trigger by semantic intent rather than exact wording.
repo: akitaonrails/ai-memory
热度
- GitHub 星标
- 15k
- 排名
- #11042
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
ai-memory-durable-pages
15k当你要求记住某些持久的内容时,帮你的智能体在 ai-memory 知识库中保存、更新或删除永久的项目笔记。
ai-memory-handoff
15k帮你的智能体把上下文传递给下一次会话,让你可以从上次停下的地方继续、保存收尾笔记,或取消一次误发的交接。
ai-memory-learning-maintenance
15k帮你的智能体整理记忆知识库:把会话笔记转化为主题页面,检查矛盾之处,并在你要求时清理过时的条目。
ai-memory-messaging
15k帮你的智能体向另一个项目的收件箱发送一条自成一体的请求,检查你项目的收件箱,或取消你已发送的消息。