memory-arch

memory-arch is a skill for Claude Code from kimsanguine/hplan. It costs 56 tokens per session (2,659 once invoked), scanned A, original, MIT.

A design guide for an agent's memory system: the information it uses during a session and the knowledge it stores and retrieves across sessions. It covers working, episodic, semantic, and procedural memory, along with storage and retrieval choices.

In plain words
What is it for?
Use it to design memory for agents that must retain user preferences, past interactions, domain knowledge, or learned procedures across multiple runs.
Why use it?
It helps decide what an agent should remember, where to keep it, and how to bring back only relevant information within its context limits.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter.

Part of the architect plugin — 4 skills shipped together

Good fit Use it to design memory for agents that must retain user preferences, past interactions, domain knowledge, or learned procedures across multiple runs.

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

Made for: Claude Code.

Or install architect, the plugin that ships this one along with the rest of its 4 skills.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/kimsanguine/hplan/memory-arch"><img src="https://agentmods.dev/badge/skills/kimsanguine/hplan/memory-arch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,659 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.
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.00056 $0.02659
Opus 5.5 $0.00022 $0.01064
Sonnet 5.5 $0.00011 $0.00532
Haiku 4.5 $0.00006 $0.00266

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

Security

Grade A, and why

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

architect/skills/memory-arch/SKILL.md · 260 lines

How it starts

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

Memory Architecture

에이전트 메모리 시스템 설계 — 단기 컨텍스트, 장기 저장, 검색 전략

Core Goal

  • 단일 실행의 컨텍스트 윈도우를 넘어 실행 간 학습과 기억을 유지하는 메모리 아키텍처 설계하여 에이전트의 진화 가능하게 함
  • 4가지 메모리 유형(Working, Episodic, Semantic, Procedural)을 각각 적절한 저장소에 배치하여 검색 효율성과 비용을 최적화
  • 제한된 컨텍스트 윈도우 내에서 가장 관련성 높은 메모리만 주입하는 검색 및 랭킹 전략 수립

Trigger Gate

Use This Skill When

  • 에이전트가 여러 실행(세션)에서 일관된 동작을 해야 하는 경우
  • 사용자 선호도, 과거 상담 내용, 또는 도메인 지식을 기억해야 하는 에이전트
  • 에이전트가 각 상호작용에서 학습하고 개선되어야 하는 경우

Route to Other Skills When

  • 메모리가 플라이휠(사용 → 개선)의 일부인 경우 → strategy --focus growth-loop (데이터 구조 설계)
  • 멀티 에이전트 간 메모리 공유 필요 → orchestration (에이전트 간 데이터 흐름)
  • 3-tier 시스템에서 workers 간 컨텍스트 전달 → orchestration (Hierarchical pattern 통신 프로토콜)
  • 메모리 저장소의 비용 구조 최적화 → strategy --focus biz-model (인프라 비용 계산)

Boundary Checks

  • 단일 실행 내에서만 메모리 필요 (세션 간 학습 없음) → Working Memory만 구현, 장기 저장소 불필요
  • 컨텍스트 윈도우가 충분히 크면 (1M 이상) → Vector DB 대신 in-context learning으로 단순화 가능
  • 메모리 저장소가 프라이빗이 아니면 (공유됨) → 사용자 격리 로직 추가 필수

개념

에이전트의 지능은 메모리에서 나온다. 단일 실행의 컨텍스트 윈도우를 넘어서, 실행 간 학습과 기억을 유지하는 메모리 아키텍처가 에이전트의 진화를 가능하게 한다.

Instructions

You are designing a memory architecture for: $ARGUMENTS

Step 1 — Memory Type Classification

Memory Type Scope Storage Example
Working Memory Single execution Context window Current task instructions, user input
Episodic Memory Across executions File/DB "Last time user X asked about Y, they preferred Z format"
Semantic Memory Permanent knowledge Embeddings/DB Domain knowledge, best practices, TK entries
Procedural Memory How-to knowledge Instructions/Skills Workflow patterns, prompt templates

Step 2 — What to Remember

For each agent interaction, decide:

Always Store:
- User preferences and corrections
- Successful output patterns
- Error cases and resolutions
- Key decisions and reasoning

Never Store:
- Sensitive personal data (unless explicitly needed)
- Temporary calculation artifacts
- Redundant information already in semantic memory

Read the full file on GitHub · 260 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 260 lines · 56 tokens per session scan A e6321028dfa0

Subscribe to this mod's changes

memory-arch is a skill published in the GitHub repository kimsanguine/hplan (3 stars, last pushed 2mo ago), licensed MIT. It adds 56 tokens to every session and 2,659 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-31.

Related

Other skills, from other repositories

vibe-reflect-and-compound

Captures reusable knowledge after work is done — learnings from feedback or failures, resolved bugs (symptom, root cause, prevention), and recurring code patterns — into the project's persistent memory file. Use after feedback, a non-trivial bug fix, a failed attempt, or the third repetition of a pattern.

ash1794/vibe-engineering · 70 tokens

apply

Use when a staged proposal has been reviewed and signed off — REVIEW.md Step 3 ticked reviewed or provisional — and is ready to promote into the live contextualizer.

nick-railsback/skill-engine · 36 tokens

maintaining-project-context

Use when completing development phases or branches to identify and update CLAUDE.md or AGENTS.md files that may have become stale - analyzes what changed, determines affected contracts and documentation, and coordinates updates.

ed3dai/ed3d-plugins · 44 tokens

lore-ingest

Use when the user runs /lore:lore-ingest — find files in the lore's raw/ inbox that are new or changed since their last ledger entry, distill or surgically update wiki pages by content type, update log.md, regenerate the index, and commit.

barakgut/lore · 61 tokens

imperio-memoria

Skill "imperio-memoria" from tatagoncalvesof/imperatriz-toolkit, covering imperio memoria — sistema de memoria para agentes ia, activation, frameworks, 1. cerebro (gestao de estado) and 2. diario (memoria compartilhada).

tatagoncalvesof/imperatriz-toolkit · 0 tokens

dossie-mentorada

Sistema de memória persistente da mentorada na Travessia Imperatriz. Lê/grava em 19 arquivos JSON estruturados (anamnese, perfil, voz, mecanismo, brand, oferta, funil, KPIs, cases) e abastece automaticamente todas as 225 skills do ecossistema com dados da mentorada. Pilar 1 (Dados) — fundação que destrava todas as…

tatagoncalvesof/imperatriz-toolkit · 91 tokens