Borrowing it
Nothing to install: this file belongs to iyuenan3/worklog-kit. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/iyuenan3/worklog-kit/main/.agents/skills/stash/SKILL.mdgit clone --depth 1 https://github.com/iyuenan3/worklog-kitWrote 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/iyuenan3/worklog-kit/stash)<a href="https://agentmods.dev/skills/iyuenan3/worklog-kit/stash"><img src="https://agentmods.dev/badge/skills/iyuenan3/worklog-kit/stash/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.
<a href="https://agentmods.dev/skills/iyuenan3/worklog-kit/stash"><img src="https://agentmods.dev/badge/skills/iyuenan3/worklog-kit/stash.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00101 | $0.02180 |
| Opus 5.5 | $0.00040 | $0.00872 |
| Sonnet 5.5 | $0.00020 | $0.00436 |
| Haiku 4.5 | $0.00010 | $0.00218 |
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 2mo 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 — 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: deleted 或 status: archived 都是运行时硬门,resolver 与自动 Hook 默认拒绝加载,历史文件继续保留供显式考古。
PROJECT_MEMORY_DIR 与 PROJECT_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)
初始化脚本的行为:
- 只创建或校验 canonical stash 目录、
project.json与空白MEMORY.md骨架。 - canonical 路径若是软连接、身份冲突或已有条目却缺索引,立即拒绝。
- 发现历史 Codex 或 Claude memory 时只报告路径,不复制、不合并、不回退读取,也不创建软连接。
migrate-legacy-memory.sh仅保留为停用提示与初始化兼容入口,不再执行迁移。
~/.local/share/project-memory/ 只保存用户显式调用 $stash 后形成的人工项目记忆。Claude 历史 memory、Codex 自动 memory 与 stash memory 是三个独立来源。需要迁移历史信息时,必须由用户明确要求,逐条阅读、判断并提炼到当前项目的写入目标,不得复制整个目录或用软连接共写。
确认 MEMORY.md 存在;新项目创建以下骨架:
# Memory
## User
## Feedback
## Project
## Reference
Shell 变量不会跨工具调用持久;每个需要路径的调用都重新运行 resolver。
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.
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.
- 2mo ago First seen · 147 lines · 101 tokens per session scan A b24740c8a0bd
stash is a skill published in the GitHub repository iyuenan3/worklog-kit (11 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 101 tokens to every session and 2,180 once invoked, about $0.0004 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-30.
stash compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| stashiyuenan3/worklog-kit | Skill | 11 | 3mo ago | Apache-2.0 | A | 101 | Codex |
| knowledge-ingestopenclaw/openclaw | Skill | 394k | yesterday | MIT | A | 80 | Claude Code, Codex |
| mem0-oss-to-platformmem0ai/mem0 | Skill | 68k | 2d ago | Apache-2.0 | A | 217 | Claude Code, Codex |
| forgetasgeirtj/system_prompts_leaks | Skill | 71k | 2d ago | CC0-1.0 | A | 74 | Claude Code, Codex |
| Cortexdanielmiessler/LifeOS | Skill | 20k | yesterday | MIT | A | 184 | Claude Code |
| memoryopensquilla/opensquilla | Skill | 7.1k | 6d ago | Apache-2.0 | A | 44 | Claude Code, Codex |
| ha-data-storesshiwenwen/hope-agent | Skill | 1.9k | yesterday | MIT | A | 115 | Claude Code, Codex |