memory-consolidate

memory-consolidate is a skill for Claude Code, Codex from zhinjs/zhin. It costs 46 tokens per session (316 once invoked), scanned A, original, MIT.

A memory-maintenance skill that stores a small number of durable, searchable facts and keeps the main memory file concise.

In plain words
What is it for?
Use it when someone asks to remember something or when a completed work session produces a stable fact worth saving.
Why use it?
It prevents important long-term information from being duplicated or buried in temporary conversation details.

Skill for Claude CodeCodex

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

Good fit Use it when someone asks to remember something or when a completed work session produces a stable fact worth saving.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/zhinjs/zhin/memory-consolidate.svg)](https://agentmods.dev/skills/zhinjs/zhin/memory-consolidate)
Your own site
<a href="https://agentmods.dev/skills/zhinjs/zhin/memory-consolidate"><img src="https://agentmods.dev/badge/skills/zhinjs/zhin/memory-consolidate.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 316 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.00046 $0.00316
Opus 5 $0.00023 $0.00158
Sonnet 5 $0.00009 $0.00063
Haiku 4.5 $0.00005 $0.00032

Measured 8d ago against content hash 3fb4471c3794, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

memory-consolidate 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 8d 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.

examples/full-bot/skills/memory-consolidate/SKILL.md · 37 lines

What it actually says

memory-consolidate

何时触发

  • 用户明确要求「记住 / 记下来」
  • Workroom Run 完成且有关键结论需长期保留
  • 回合末发现新的稳定事实(非临时状态)

执行规则

  1. memory_search 查重,避免重复写入同 key。
  2. memory_upsert 写入 1–3 条,每条:
    • key:稳定标识,如 capability:workroom_kernel_v1preference:language
    • content:一句可检索事实(≤200 字)
    • scope:默认 global;会话专属用 session
    • sourceskill:memory-consolidate
  3. 不要把长文塞进 data/memory/global/MEMORY.md;纲领性架构说明才写文件层。

示例

memory_upsert(
  key="capability:workroom_kernel_v1",
  content="shipped",
  scope="global",
  tags=["l4","workroom"]
)
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. 8d ago First seen · 37 lines · 46 tokens per session scan A 3fb4471c3794

Subscribe to this mod's changes

memory-consolidate is a skill published in the GitHub repository zhinjs/zhin (135 stars, last pushed today), licensed MIT. It adds 46 tokens to every session and 316 once invoked, about $0.0002 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

task-agent-eliza-bridge

Use when spawning a Claude Code, Codex, Gemini, Aider, or other CLI task agent whose work needs parent Eliza runtime context. Covers the read-only loopback bridge for character, room, memory, and active workspace state.

elizaOS/eliza · 55 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens

wegent-knowledge

Knowledge base management and search tools for Wegent. Provides capabilities to list, create, update, and search knowledge bases and documents using RAG retrieval. Use this skill when the user wants to manage knowledge bases, documents, or search for information programmatically.

wecode-ai/Wegent · 51 tokens

ha-knowledge

Working method for the Hope Agent knowledge space — how to capture, organize, link, retrieve, and maintain Markdown notes well with the note tools. Load whenever you are reading or writing notes in an attached knowledge base. Trigger on: user asks to take / save / organize / restructure notes, build or grow a…

shiwenwen/hope-agent · 187 tokens

company-agent-infrastructure

Use when designing or building internal/company AI agents that need shared context across company systems, durable organizational memory across sessions or agents, user-scoped permissions, approvals, audit, or governed actions. Also use when deciding whether ordinary MCP tools, RAG, or local agent memory are enough…

lobu-ai/lobu · 70 tokens

lobu

Use Lobu MCP for shared, permission-aware company context, durable organizational memory, and governed actions. Trigger when the user asks what the organization knows, needs context from connected company systems, wants to preserve a durable fact or decision, or needs to discover and use Lobu SDK capabilities.

lobu-ai/lobu · 60 tokens