stash

stash is a skill for Claude Code, Codex from iyuenan3/worklog-kit. It costs 101 tokens per session (2,180 once invoked), scanned A, original, Apache-2.0.

A project-memory tool that saves important preferences, decisions, constraints, lessons, and resource links in files for use across sessions.

In plain words
What is it for?
Use it to record project decisions, user preferences, constraints, and lessons learned, then keep an index in MEMORY.md.
Why use it?
It prevents useful context from being lost when a conversation ends. It runs only when you explicitly ask it to save something.

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/iyuenan3/worklog-kit/stash
Any agent
npx skills add iyuenan3/worklog-kit --skill stash
Clone the repo
git clone --depth 1 https://github.com/iyuenan3/worklog-kit

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 stash

README.md
[![agentmods](https://agentmods.dev/badge/skills/iyuenan3/worklog-kit/stash.svg)](https://agentmods.dev/skills/iyuenan3/worklog-kit/stash)
Your own site
<a href="https://agentmods.dev/skills/iyuenan3/worklog-kit/stash"><img src="https://agentmods.dev/badge/skills/iyuenan3/worklog-kit/stash.svg" alt="Measured on agentmods" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,180 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00101 $0.02180
Opus 5 $0.00051 $0.01090
Sonnet 5 $0.00020 $0.00436
Haiku 4.5 $0.00010 $0.00218

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

Security

Grade A, and why

stash 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 4d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/check.sh, scripts/init-memory.sh, scripts/migrate-legacy-memory.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.agents/skills/stash/SKILL.md · 147 lines

How it starts

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

stash:项目记忆持久化

把当前对话中跨会话仍有价值的信息落到项目级、可检查的 memory。Codex 原生 Memories 是运行时辅助层,不是本 Skill 的真相源;本 Skill 的记忆必须显式读写文件。

写法规范以 references/MEMORY_SPEC.md 为唯一真相源。本文件只定义流程。执行前必须完整读取该规范。

触发与优先级

  • 只在用户明确要求持久化时运行,不做“会话结束自动 stash”。
  • 先检查当前 repo 的 AGENTS.md.agents/skills/。如果存在更具体的记忆 Skill 或明确的记忆真相源,例如 worklog 的 $worklog-memory,立即改用它,不要再创建一套通用 stash memory。
  • 没有 repo 专用方案时,才继续本流程。

显式调用写作 $stash。Claude Code 也可通过其 Skills 列表、自然语言或 /stash 触发。

主流程

1. 定位并初始化 stash memory

项目根以 git rev-parse --show-toplevel 为准,非 Git 目录回退当前目录。路径不硬编码:

  • 精确覆盖:PROJECT_MEMORY_DIR
  • 根目录覆盖:PROJECT_MEMORY_ROOT
  • 项目标识覆盖:PROJECT_MEMORY_ID
  • 默认 stash 目录:~/.local/share/project-memory/<project-id>/memory
  • 只读历史 Codex 候选:~/.local/share/codex-project-memory/-<legacy-key>/memory
  • 只读历史 Claude 候选:~/.claude/projects/-<legacy-key>/memory

<project-id> 默认使用项目根目录名并做安全规范化,保持可读。相邻的 project.json 记录项目根与 origin;同名目录已属于另一项目时 resolver 必须拒绝复用,要求显式设置唯一的 PROJECT_MEMORY_ID。同一 origin 的检出路径移动可继续使用原记忆。status: deletedstatus: archived 都是运行时硬门,resolver 与自动 Hook 默认拒绝加载,历史文件继续保留供显式考古。

PROJECT_MEMORY_DIRPROJECT_MEMORY_ROOT 必须给绝对路径。旧 CODEX_PROJECT_MEMORY_DIR / CODEX_PROJECT_MEMORY_ROOT 不再参与 stash 路径解析。若 repo 存在 .agents/skills/*memory*/SKILL.md,resolver 直接拒绝通用路径,形成第二道防误写门。

第一次处理某项目时:

bash ~/.agents/skills/stash/scripts/init-memory.sh
MEM=$(bash ~/.agents/skills/stash/scripts/resolve-memory-dir.sh --canonical)

初始化脚本的行为:

  1. 只创建或校验 canonical stash 目录、project.json 与空白 MEMORY.md 骨架。
  2. canonical 路径若是软连接、身份冲突或已有条目却缺索引,立即拒绝。
  3. 发现历史 Codex 或 Claude memory 时只报告路径,不复制、不合并、不回退读取,也不创建软连接。
  4. migrate-legacy-memory.sh 仅保留为停用提示与初始化兼容入口,不再执行迁移。

~/.local/share/project-memory/ 只保存用户显式调用 $stash 后形成的人工项目记忆。Claude 历史 memory、Codex 自动 memory 与 stash memory 是三个独立来源。需要迁移历史信息时,必须由用户明确要求,逐条阅读、判断并提炼到当前项目的写入目标,不得复制整个目录或用软连接共写。

确认 MEMORY.md 存在;新项目创建以下骨架:

# Memory

## User

## Feedback

## Project

## Reference

Shell 变量不会跨工具调用持久;每个需要路径的调用都重新运行 resolver。

Read the full file on GitHub · 147 lines

Files

What ships with it

6 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. 4d ago First seen · 147 lines · 101 tokens per session scan A b24740c8a0bd

Subscribe to this mod's changes

stash is a skill published in the GitHub repository iyuenan3/worklog-kit (11 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 101 tokens to every session and 2,180 once invoked, about $0.0005 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

mem0-oss-to-platform

Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local Memory class) to the mem0 Platform / hosted / managed SDK (the MemoryClient class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off OSS/self-hosted to the hosted API — e.g.…

mem0ai/mem0 · 273 tokens

Cortex

Operate Cortex, the LifeOS memory system — the typed Knowledge Archive (People, Companies, Ideas, Research with typed related: links) plus recall of prior work sessions, ISAs, and conversations. Search, add, harvest, develop, ingest, distill, graph-navigate, recall. USE WHEN cortex, knowledge, knowledge base, search…

danielmiessler/LifeOS · 196 tokens

auditing-subgroup-fairness

Audit an OpenMed NER or de-identification model for performance disparities across demographic subgroups (sex, age band, race/ethnicity when available) using openmed.eval.fairnessreport. Use when the user wants per-subgroup recall and leakage, wants to check whether de-identification under-protects a group, wants to…

maziyarpanahi/openmed · 148 tokens

agent-memory

../../../engineering/agent-memory/skills/agent-memory/SKILL.md.

alirezarezvani/claude-skills · 0 tokens

memory

Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.

opensquilla/opensquilla · 44 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