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 agentmods add skills/kimsanguine/hplan/memory-archnpx skills add kimsanguine/hplan --skill memory-archgit clone --depth 1 https://github.com/kimsanguine/hplanWrote 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/kimsanguine/hplan/memory-arch)<a href="https://agentmods.dev/skills/kimsanguine/hplan/memory-arch"><img src="https://agentmods.dev/badge/skills/kimsanguine/hplan/memory-arch.svg" alt="Measured on agentmods" 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 | $0.00056 | $0.02659 |
| Opus 5 | $0.00028 | $0.01329 |
| Sonnet 5 | $0.00011 | $0.00532 |
| Haiku 4.5 | $0.00006 | $0.00266 |
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 5d 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 — 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
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.
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.
- 5d ago First seen · 260 lines · 56 tokens per session scan A e6321028dfa0
memory-arch is a skill published in the GitHub repository kimsanguine/hplan (2 stars, last pushed 19d ago), licensed MIT. It adds 56 tokens to every session and 2,659 once invoked, about $0.0003 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-31.
Other skills, from other repositories
lore
Use when answering any domain or knowledge question in a project linked to a lore (its CLAUDE.md has a "## Knowledge Base" section naming the lore path), and as the shared contract for all lore- skills. Defines the lore folder layout, page schema, retrieval ladder, index regeneration, and citation rules.
lore-init
Use when the user runs /lore:lore-init [path] [--no-git] — create the lore folder, scaffold its layout with its CLAUDE.md schema, and git-init it unless --no-git. Writes nothing outside the lore folder.
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.
setup
This skill should be used when the user asks to "set up mnemonica", "install mnemonica in this project", "initialize mnemonica", "bootstrap the knowledge docs", "add mnemonica to this repo", or wants Claude-maintained modular documentation installed in a project for the first time.
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.
vibe-debugging-journal
Records resolved bugs in a persistent journal — symptom, root cause, difficulty, fix, prevention. Organized by category for future reference.