From maigo
Loads relevant cross-project and per-project memory entries at startup with relevance ordering and a 10-entry cap. Includes schema self-check and fallback for missing directories.
How this skill is triggered — by the user, by Claude, or both
Slash command
/maigo:memory-loadingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
<!-- mkdocs-include-start -->
Owner: all agents
Consumers: agents/Raana.md、agents/Tomori.md、agents/Soyo.md
三個 agent 在啟動時都要做相同的「讀記憶 → schema 自檢 → fallback」流程,但過去各自在 agent prompt 裡重複寫。這個 skill 是三者共通行為的 single source of truth。
啟動後、正式開始工作之前,先載入記憶(兩層):
依序讀兩個 index:
cat ~/.config/maigo/memory/MEMORY.mdcat ~/.claude/projects/<current-project>/memory/MEMORY.md(若存在)<current-project> 是當前專案路徑 slug 化的結果(與 validate_memory.py 相同的枚舉方式——即 ~/.claude/projects/ 下對應的目錄名,例如 -Users-weilee-Programming-personal-maigo)。
讀 index 每行 - [Title](file.md) — description(兩層 index 合併),判斷哪些 description 跟當前 task 的 keyword / 主題有 overlap
相關性排序:把兩層合併後的候選 entry 依匹配度排序
限量載入:若相關條目過多,僅 Read 最相關的前 10 筆 entry 全文——10 筆是兩層合計上限,不是每層各 10;當作這次工作的 context
在輸出開頭印 ## Loaded memory entries 段,列出用了哪些 entry
對每個讀進來的 entry frontmatter 做最小檢查:
name / description / type 任一欄位type 值不在 {user, feedback, project, reference}遇到問題不 abort,繼續使用該 entry(lenient),但在 ## Loaded memory entries 段該行末尾加 [schema warn: <缺什麼或 type 不合法>]。
完整檢查可手動跑 python3 scripts/validate_memory.py。
兩層各自獨立 fallback,任一層不影響另一層:
MEMORY.md 不存在或是空的 → 該層當「沒記憶」,另一層照常讀不要求使用者建立 memory 目錄或 index。
## Loaded memory entries
- [Integration test 偏好](integration-test-preference.md) — 已載入
- [Some entry](some-entry.md) — 已載入 [schema warn: 缺 type]
(若無相關 entry:「(無相關 entry)」)
各 agent 在引用本 skill 後,可在自己的 prompt 內補充客製差異:
project 或 user entry,在 plan 開頭新增 ## Honoured memory 段,把使用者偏好 / 慣例如何影響步驟安排寫出來——讓 fresh-context 的 🎀 Anon 透過讀 plan 就能間接拿到記憶,不必自己讀 MEMORY。詳見 agents/Tomori.md。type: project 的 entry 額外蒐集 triggers 欄位,把觸發的 skill 加進 review checklist。詳見 agents/Soyo.md。Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub lee-w/maigo --plugin maigo