memory

A two-part memory system for saving long-term facts and searching a history of past events.

In plain words
What is it for?
Use it to store durable context in MEMORY.md and search past events in HISTORY.md with text matching.
Why use it?
It helps an agent remember important preferences and project details while still finding older conversation events when needed.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/borhen68/picoagents/memory
Any agent
npx skills add borhen68/picoagents --skill memory
Clone the repo
git clone --depth 1 https://github.com/borhen68/picoagents

Made for: Claude Code, Codex.

Per session 11 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 213 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 95% copy Near-identical to another mod 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 $0.00011 $0.00213
Opus 5 $0.00005 $0.00106
Sonnet 5 $0.00002 $0.00043
Haiku 4.5 $0.00001 $0.00021

Measured 2d ago against content hash fab77b29d964, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

memory 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 2d 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.

Origin

This is a copy

95% identical to memory — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/memory/SKILL.md · 32 lines

What it actually says

Memory

Structure

  • memory/MEMORY.md — Long-term facts (preferences, project context, relationships). Always loaded into your context.
  • memory/HISTORY.md — Append-only event log. NOT loaded into context. Search it with grep.

Search Past Events

grep -i "keyword" memory/HISTORY.md

Use the exec tool to run grep. Combine patterns: grep -iE "meeting|deadline" memory/HISTORY.md

When to Update MEMORY.md

Write important facts immediately using edit_file or write_file:

  • User preferences ("I prefer dark mode")
  • Project context ("The API uses OAuth2")
  • Relationships ("Alice is the project lead")

Auto-consolidation

Old conversations are automatically summarized and appended to HISTORY.md when the session grows large. Long-term facts are extracted to MEMORY.md. You don't need to manage this.

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. 2d ago First seen · 32 lines · 11 tokens per session scan A fab77b29d964

Subscribe to this mod's changes

memory is a skill published in the GitHub repository borhen68/picoagents (20 stars, last pushed 6mo ago), licensed MIT. It adds 11 tokens to every session and 213 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 95% identical to memory, differing in 2 lines, and is treated as a copy.

Related

Other skills, from other repositories

auto-paper-improvement-loop

Autonomously improve a generated paper via GPT-5.6-Sol xhigh review → implement fixes → recompile, for 2 rounds. Use when user says "改论文", "improve paper", "论文润色循环", "auto improve", or wants to iteratively polish a generated paper.

wanshuiyin/Auto-claude-code-research-in-sleep · 69 tokens

paper-illustration

Generate publication-quality AI illustrations for academic papers using Gemini image generation. Creates architecture diagrams, method illustrations with Claude-supervised iterative refinement loop. Use when user says "生成图表", "画架构图", "AI绘图", "paper illustration", "generate diagram", or needs visual figures for papers.

wanshuiyin/Auto-claude-code-research-in-sleep · 67 tokens

integrity-forensics

Run the Anti-Autoresearch integrity-forensics sweep (span-anchored evidence ledger → GPT auditors propose findings → a rules-only reporter that lists every proposal with what the auditor said about it) against a paper via a SHA-pinned thin launcher — then convert the verdict into a typed policy gate…

wanshuiyin/Auto-claude-code-research-in-sleep · 162 tokens

mermaid-diagram

Generate Mermaid diagrams from user requirements. Supports flowcharts, sequence diagrams, class diagrams, ER diagrams, Gantt charts, and 18 more diagram types.

wanshuiyin/Auto-claude-code-research-in-sleep · 36 tokens

experiment-plan

Turn a refined research proposal or method idea into a detailed, claim-driven experiment roadmap. Use after research-refine, or when the user asks for a detailed experiment plan, ablation matrix, evaluation protocol, run order, compute budget, or paper-ready validation that supports the core problem, novelty…

wanshuiyin/Auto-claude-code-research-in-sleep · 80 tokens

patent-novelty-check

Assess patent novelty and non-obviousness against prior art. Use when user says "专利查新", "patent novelty", "可专利性评估", "patentability check", or wants to evaluate if an invention is patentable.

wanshuiyin/Auto-claude-code-research-in-sleep · 59 tokens