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.
npx skills add OthmanAdi/MDDesign --skill memory-layergit clone --depth 1 https://github.com/OthmanAdi/MDDesignWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/othmanadi/mddesign/memory-layer)<a href="https://agentmods.dev/skills/othmanadi/mddesign/memory-layer"><img src="https://agentmods.dev/badge/skills/othmanadi/mddesign/memory-layer/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/othmanadi/mddesign/memory-layer"><img src="https://agentmods.dev/badge/skills/othmanadi/mddesign/memory-layer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00056 | $0.01231 |
| Opus 5.5 | $0.00022 | $0.00492 |
| Sonnet 5.5 | $0.00011 | $0.00246 |
| Haiku 4.5 | $0.00006 | $0.00123 |
Grade A, and why
memory-layer 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Memory Layer
Three-tier wrapper on top of code-memory-router plus a local file-tier scratchpad.
Tiers
| Tier | Purpose | Backend | Lifetime |
|---|---|---|---|
| scratch | Volatile session notes, in-flight findings | .agents/memory/scratch/<topic>.md (file-tier) |
Session, until promoted or /mddesign:handoff promote |
| WHERE | Locational queries (where is X, which file, which directory) | QMD via /memory-router |
Project lifetime |
| WHY | Decisions, rationale, post-mortems, "we picked X because" | MemPalace drawers via /memory-router |
Forever |
Operations
/mddesign:memory save <text> (default tier: scratch)
- Determine the active topic. The active phase id from
task_plan.mdis the default topic. If no plan exists, usegeneral. - Append
<text>plus an ISO timestamp to.agents/memory/scratch/<topic>.md. Create parent directories if needed. - Print confirmation: "Saved to scratch / topic=".
/mddesign:memory save --tier why <text>
- Print the text to the user with a clear "About to promote to MemPalace WHY tier. Approve? [y/N]" line.
- The PreToolUse hook intercepts the next Bash or
/memory-routerinvocation (named checkpoint:before_mempalace_write). - On approval, invoke
/memory-routerwith the canonical "save to MemPalace" pattern documented in code-memory-router's SKILL.md. Pass the text plus a project tag derived from CWD basename. - On the same approval, append a marker to
.agents/memory/scratch/<topic>.md: "PROMOTED to MemPalace at ." The original scratch entry stays in place for the rest of the session for context continuity.
/mddesign:memory recall <query>
Routing rule:
- If the query starts with "where", "which file", "find", "locate", route to WHERE.
- If the query starts with "why", "decision", "history", "what did we decide", route to WHY.
- Otherwise, peek at scratch first; if nothing matches, fall back to WHERE.
Routing target:
- WHERE → invoke
/memory-routerand let the router dispatch to QMD. - WHY → invoke
/memory-routerand let the router dispatch to MemPalace. - scratch → grep
.agents/memory/scratch/**/*.mdfor the query.
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.
- 1mo ago First seen · 90 lines · 56 tokens per session scan A d55de2146ba2
memory-layer is a skill published in the GitHub repository OthmanAdi/MDDesign (14 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 56 tokens to every session and 1,231 once invoked, about $0.0002 per session on Opus 5.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.
Other skills, from other repositories
mem-search
Search past coding sessions using natural language. Finds relevant observations, decisions, and context from previous work.
optimize-learnings
Audit and curate the learnings memory namespace — the one namespace nothing re-derives, so the only one that rots. Runs moflo's mechanical audit to nominate stale, unused, and near-duplicate entries, then decides entry by entry whether to keep, retire, compress, or merge, and propagates the result to the shared…
meditate
Deliberate session retrospective — look back over what you just did, distill the durable, reusable lessons (not session trivia), and write them to the learnings memory namespace, deduped against what is already stored. Use at the END of a meaningful chunk of work to capture high-signal lessons worth keeping long-term.…
memory-team
Guided setup for sharing moflo's durable learnings through a git-tracked artifact — for a whole TEAM on one repo, OR for one person across several MACHINES (a team of one). Use when the user says "share learnings with my team", "commit our moflo memory", "sync memory across my laptop and desktop", "set up…
memory-patterns
Persistent memory patterns for moflo agents — session memory, long-term knowledge, pattern learning, and cross-session context via moflo's node:sqlite + HNSW vector store. Use when building stateful agents or assistants that need to remember across runs.
memory-worktree
Verify, customize, or opt out of moflo's AUTOMATIC durable-learning sharing across git worktrees / Conductor workspaces on one machine. As of the worktree-auto-sharing change this is on by default — learnings converge across a repo's worktrees with no setup. Use when the user asks "is memory shared across my…