memory-patterns

memory-patterns is a skill for Claude Code from eric-cielo/moflo. It costs 55 tokens per session (1,369 once invoked), scanned A, original, MIT.

A guide for giving MoFlo agents persistent memory across conversations. It stores information in a local database and supports both exact lookups and searches by meaning.

In plain words
What is it for?
Use it when building assistants that remember conversations, store long-term learnings, search related knowledge, manage namespaces, or expire old session data.
Why use it?
It prevents agents from losing useful session details, learned patterns, guidance, and project knowledge when a run ends.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions Claude Code.

Good fit Use it when building assistants that remember conversations, store long-term learnings, search related knowledge, manage namespaces, or expire old session data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/eric-cielo/moflo/memory-patterns
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.

Any agent
npx skills add eric-cielo/moflo --skill memory-patterns
Clone the repo
git clone --depth 1 https://github.com/eric-cielo/moflo

Made for: Claude Code.

Wrote 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.

agentmods badge for memory-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/eric-cielo/moflo/memory-patterns/github.svg)](https://agentmods.dev/skills/eric-cielo/moflo/memory-patterns)
Your own site
<a href="https://agentmods.dev/skills/eric-cielo/moflo/memory-patterns"><img src="https://agentmods.dev/badge/skills/eric-cielo/moflo/memory-patterns/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.

agentmods 80×15 button for memory-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/eric-cielo/moflo/memory-patterns"><img src="https://agentmods.dev/badge/skills/eric-cielo/moflo/memory-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,369 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00055 $0.01369
Opus 5.5 $0.00022 $0.00548
Sonnet 5.5 $0.00011 $0.00274
Haiku 4.5 $0.00006 $0.00137

Measured 1mo ago against content hash a8de621231e6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

memory-patterns 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.

.claude/skills/memory-patterns/SKILL.md · 137 lines

How it starts

The opening of the file, as written. The whole thing — 137 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MoFlo Memory Patterns

Persistent, semantically-searchable memory for moflo-enabled projects. Backed by .moflo/moflo.db (node:sqlite + HNSW vector index) and exposed through MCP tools.

Core API

Three things to know:

  1. MCP tools — call from Claude Code sessions:

    • mcp__moflo__memory_store { key, value, namespace?, tags?, ttl?, upsert? }
    • mcp__moflo__memory_search { query, namespace?, limit?, threshold? } — semantic, HNSW-backed
    • mcp__moflo__memory_retrieve { key, namespace? } — exact key lookup
    • mcp__moflo__memory_list { namespace?, limit? }
    • mcp__moflo__memory_delete { key, namespace? }
    • mcp__moflo__memory_stats {}
  2. CLI — flo-search "<query>" --namespace <ns> for quick semantic lookup from the shell.

  3. Namespaces — namespace + key is the unique identity. Default namespaces shipped by moflo: learnings, patterns, guidance, code-map. (knowledge is a deprecated alias — writes are transparently redirected to learnings.) Create your own for application memory (e.g. app:sessions, app:users).

Pattern 1: Session Memory

Rolling per-conversation memory with TTL so old sessions expire:

// Store a turn
await mcp.memory_store({
  namespace: 'app:sessions',
  key: `${sessionId}:msg:${turnIndex}`,
  value: { role, content, ts: Date.now() },
  ttl: 60 * 60 * 24 * 7, // 7 days
});

// Recall the session — keys sort lexicographically, so prefixing with
// sessionId groups a conversation.
const all = await mcp.memory_list({ namespace: 'app:sessions' });
const current = all.filter(t => t.key.startsWith(`${sessionId}:`));

Why namespace-per-use: search scope stays small and delete-by-namespace becomes memory_list + memory_delete in a loop.

Pattern 2: Long-Term Knowledge

Facts that should survive any session and be findable by meaning, not exact key:

await mcp.memory_store({
  namespace: 'learnings',
  key: 'auth:session-token-rotation',
  value: 'Session tokens are rotated every 15 minutes by the auth middleware. Refresh happens transparently on the client.',
  tags: ['auth', 'security'],
  upsert: true,
});

// Retrieval: semantic, not keyword
const hits = await mcp.memory_search({
  namespace: 'learnings',
  query: 'how do auth tokens refresh?',
  limit: 5,
  threshold: 0.4,
});

Read the full file on GitHub · 137 lines

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. 1mo ago First seen · 137 lines · 55 tokens per session scan A a8de621231e6

Subscribe to this mod's changes

memory-patterns is a skill published in the GitHub repository eric-cielo/moflo (19 stars, last pushed yesterday), licensed MIT. It adds 55 tokens to every session and 1,369 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.