memory-designer

memory-designer is a skill for Claude Code, Codex from khalilbenaz/claude-skills-collection. It costs 82 tokens per session (2,289 once invoked), scanned A, original, MIT.

An architecture guide for giving an AI agent different kinds of memory, such as short-term, long-term, task-related, and shared knowledge.

In plain words
What is it for?
Designing persistent memory across restarts or conversations, shared memory for multiple agents, and retrieval systems for large collections of memories.
Why use it?
It helps decide what information an agent should remember, where to store it, and how to handle conversations that exceed its context window.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Designing persistent memory across restarts or conversations, shared memory for multiple agents, and retrieval systems for large collections of memories.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/khalilbenaz/claude-skills-collection/memory-designer
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 khalilbenaz/claude-skills-collection --skill memory-designer
Clone the repo
git clone --depth 1 https://github.com/khalilbenaz/claude-skills-collection

Made for: Claude Code, Codex.

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-designer

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/memory-designer"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/memory-designer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,289 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.00082 $0.02289
Opus 5 $0.00041 $0.01144
Sonnet 5 $0.00016 $0.00458
Haiku 4.5 $0.00008 $0.00229

Measured 12d ago against content hash 44922d3fe8f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

memory-designer 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 12d 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.

agent-skills/memory-designer/SKILL.md · 225 lines

How it starts

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

Agent Memory Designer

Quand utiliser ce skill

Utilise ce skill pour concevoir ou améliorer le système de mémoire d'un agent IA dès que :

  • l'agent doit se souvenir d'informations au-delà d'une seule conversation ;
  • l'historique de conversation dépasse ou menace de dépasser la fenêtre de contexte ;
  • plusieurs agents doivent partager une base de connaissance commune ;
  • l'utilisateur se plaint que "l'agent ne se souvient pas".

Étape 1 — Diagnostic des besoins

Avant de choisir un backend, réponds à ces questions :

Question Réponse → choix
Les souvenirs doivent-ils survivre au redémarrage du processus ? Oui → persistence ; Non → in-memory suffit
Plusieurs sessions/utilisateurs partagent-ils la mémoire ? Oui → backend centralisé (DB/cloud)
Le volume de souvenirs dépasse-t-il 10 k entrées ? Oui → vector store dédié (Pinecone, Weaviate)
La latence de retrieval est-elle critique (< 100 ms) ? Oui → Redis ou FAISS local
Confidentialité par utilisateur requise ? Oui → namespace/user_id strict obligatoire

Étape 2 — Choisir les types de mémoire à implémenter

Chaque type a un rôle distinct ; ne pas tout mettre dans le même bucket.

Type Durée Contenu typique Backend
Working / short-term Session en cours Messages de la conversation Buffer in-process
Episodic Long terme Interactions passées horodatées Vector store + metadata
Semantic Long terme Faits, préférences utilisateur Vector store ou SQL
Procedural Persistant Workflows mémorisés, "comment faire X" Fichier structuré ou DB

Règle de sélection : implémente working en priorité, puis episodic si l'utilisateur a besoin de continuité cross-session, semantic si l'agent doit raisonner sur des faits durables.


Étape 3 — Working memory (gestion de la fenêtre de contexte)

Objectif : maintenir un historique utile sans dépasser le budget de tokens.

Stratégie 1 — Sliding window (simple, prototypage)

def sliding_window(messages: list, max_messages: int = 20) -> list:
    system = [m for m in messages if m["role"] == "system"]
    rest = [m for m in messages if m["role"] != "system"]
    return system + rest[-max_messages:]

Read the full file on GitHub · 225 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. 12d ago First seen · 225 lines · 82 tokens per session scan A 44922d3fe8f7

Subscribe to this mod's changes

memory-designer is a skill published in the GitHub repository khalilbenaz/claude-skills-collection (22 stars, last pushed 18d ago), licensed MIT. It adds 82 tokens to every session and 2,289 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

long-context

Extend context windows of transformer models using RoPE, YaRN, ALiBi, and position interpolation techniques. Use when processing long documents (32k-128k+ tokens), extending pre-trained models beyond original context limits, or implementing efficient positional encodings. Covers rotary embeddings, attention biases…

davila7/claude-code-templates · 74 tokens

edgartools

Python library for accessing, analyzing, and extracting data from SEC EDGAR filings. Use when working with SEC filings, financial statements (income statement, balance sheet, cash flow), XBRL financial data, insider trading (Form 4), institutional holdings (13F), company financials, annual/quarterly reports (10-K…

foryourhealth111-pixel/Vibe-Skills · 110 tokens

rag-patterns

RAG: embeddings, chunking, hybrid search (BM25+vector), reranking, CRAG, multi-hop. Triggers: RAG, embedding, pgvector, Qdrant, Pinecone, Weaviate, reranker, semantic search.

softspark/ai-toolkit · 57 tokens

Vizra ADK Memory System

Implement persistent memory, session context, and vector memory (RAG) for AI agents.

vizra-ai/vizra-adk · 24 tokens

evaluate

Evaluates RAG retrieval and LLM-as-judge metrics (faithfulness, relevancy, context precision). Triggers: measure RAG quality, knowledge gap, RAG eval, golden dataset.

softspark/ai-toolkit · 42 tokens

json-mode-patterns

Structured JSON output from Claude: tool-use-as-JSON, schema, parsing, partial recovery. Triggers: JSON mode, structured output, schema validation, JSON parsing.

softspark/ai-toolkit · 39 tokens