memory

A read-only command that lists shared memory entries stored across projects, with an optional filter by memory type.

In plain words
What is it for?
Use it to list all saved memories or only user, feedback, project, or reference entries, including their names, descriptions, and triggers.
Why use it?
It gives you one place to see the preferences, feedback, and references that may guide work in different projects.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/lee-w/maigo/memory
Clone the repo
git clone --depth 1 https://github.com/Lee-W/maigo
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 789 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00028 $0.00789
Opus 5 $0.00014 $0.00394
Sonnet 5 $0.00006 $0.00158
Haiku 4.5 $0.00003 $0.00079

Measured 2d ago against content hash 99a54c5b8e54, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

memory scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/memory.md · 58 lines

What it actually says

/maigo:memory

列出記憶層目前儲存的跨專案偏好 / 慣例 / 反饋。

Orchestrator 親自跑,不開新 agent。

使用

/maigo:memory             # 列全部
/maigo:memory project     # 只列 project type
/maigo:memory user        # 只列 user type
/maigo:memory feedback
/maigo:memory reference

流程

  1. 檢查 ~/.config/maigo/memory/MEMORY.md 是否存在。

    • 不存在 / 空 → 印友善訊息:「目前無跨專案記憶。要建立第一筆,用 /maigo:remember <自然語言描述>。」並結束。
  2. MEMORY.md,解析每行 - [<name>](<slug>.md) — <description>

  3. 對每個 slug,讀 ~/.config/maigo/memory/<slug>.md 的 YAML frontmatter, 抽出 name / type / description / triggers(optional)。

  4. 若使用者帶了 <type> 參數,filter 掉 type 不符的 entry。

    • <type> 不在 {user, feedback, project, reference} → 印「不支援的 type <x>,可用值:user / feedback / project / reference」並報錯結束(非 0 退出)。
    • filter 後 0 筆 → 印「(目前無 type=<type> 的記憶)」並正常結束(不視為錯誤)。
  5. 以 markdown table 輸出:

    Name Type Description Triggers
    ... ... ... ...(無 triggers 留空)
  6. table 末尾印一行 footer:「共 N 筆。詳全文:cat ~/.config/maigo/memory/<slug>.md

  7. 收場一句:🌑 Mortis:「共 N 筆」。你手上的,就這些了。(N 帶入實際筆數)

Orchestrator 守則

  • 旁白:orchestrator 對使用者說話時戴上旁白的臉——開場、收場由 🌙 Doloris / 🌑 Mortis 旁白,依 skills/narration
  • 對話:對話本體(旁白節點以外)的互動節奏與用詞,依 skills/orchestrator-voice
  • 不寫任何檔——read-only。
  • 不 delegate 給任何 agent
  • parse frontmatter 失敗的 entry → 跳過,印 warning「<slug>.md frontmatter 解析失敗,已跳過」,繼續處理其他 entry,不 crash。
  • filter 參數比對忽略大小寫

→ 完整 storage spec:Memory reference

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 58 lines · 28 tokens per session scan A 99a54c5b8e54

Subscribe to this mod's changes

memory is a command published in the GitHub repository Lee-W/maigo (14 stars, last pushed 8d ago), licensed MIT. It adds 28 tokens to every session and 789 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.