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 skills add yunshu0909/yunshu_skillshub --skill memory-initgit clone --depth 1 https://github.com/yunshu0909/yunshu_skillshubWrote 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/yunshu0909/yunshu_skillshub/memory-init)<a href="https://agentmods.dev/skills/yunshu0909/yunshu_skillshub/memory-init"><img src="https://agentmods.dev/badge/skills/yunshu0909/yunshu_skillshub/memory-init/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/yunshu0909/yunshu_skillshub/memory-init"><img src="https://agentmods.dev/badge/skills/yunshu0909/yunshu_skillshub/memory-init.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00064 | $0.01778 |
| Opus 5.5 | $0.00026 | $0.00711 |
| Sonnet 5.5 | $0.00013 | $0.00356 |
| Haiku 4.5 | $0.00006 | $0.00178 |
Grade A, and why
memory-init 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 1mo 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 — 185 lines — stays where its author put it; the contents beside it link to each section on GitHub.
记忆系统初始化
功能说明
在当前工作目录下一键部署记忆系统,生成三个东西:
- CLAUDE.md — 人设 + 对话规则 + 记忆协议
- MEMORY.md — 长期记忆文件(初始为空模板)
- memory/ — 每日记忆目录
/memory-init→ 交互式初始化,逐步收集信息后生成
工作流程
第0步:检查现有文件
先检查当前目录下是否已存在 CLAUDE.md、AGENT.md、MEMORY.md 或 memory/ 目录。
- 如果都不存在 → 正常初始化
- 如果部分存在 → 告诉用户哪些已存在,问是要覆盖还是只补缺的
- 如果都存在 → 告诉用户"已经初始化过了",问是否要重置
第1步:收集项目简介 + 人设信息
1.1 项目简介
先用 ls 和 Glob 检查当前目录是否已有实质性项目文件(代码、文档、配置文件等)。注意:.claude/、.git/、node_modules/ 等工具目录不算项目文件。
- 已有实质性项目文件(如 README、package.json、源代码、文档等)→ 扫描目录结构、README、package.json、主要代码文件等,自动生成项目简介(2-3句话概括项目是什么、做什么用的),展示给用户确认或修改
- 空目录 / 只有工具目录 / 几乎没有内容 → 必须问用户:"这个项目是做什么的?简单描述一下",然后停下来等用户回答,不要继续往下走。拿到用户的回答后,再进入 1.2
1.2 人设信息
问用户以下问题:
- 你的角色是什么?(如:SA/售前、开发、产品、运营)
- 你主要用 Claude 做什么?(如:客户沟通、技术方案、日常文档、代码开发)
- 对话风格偏好?(如:简洁直接 / 详细展开 / 随意聊天)
- 有什么特别的工作习惯要我知道的?(可选,用户可以跳过)
第2步:生成 CLAUDE.md
根据收集到的信息生成 CLAUDE.md,包含以下模块:
# 项目简介
[根据扫描结果或用户描述生成,2-3句话概括项目是什么、做什么用的]
# 人设
[根据用户角色和用途生成,1-2句话]
# 对话风格
[根据用户偏好生成,3-5条规则]
# 思考方式
[根据用户角色生成,3-5条思考优先级]
# 记忆协议
## 长期记忆(MEMORY.md)
- 存放稳定的核心信息:客户画像、个人偏好、关键决策
- 每次对话自动加载,始终在上下文中
- 超过 150 行时主动提议精简
## 每日记忆(memory/YYYY-MM-DD.md)
- 存放当天对话产生的要点:结论、洞察、待办、决策
- 对话结束前问一句"这次有值得记住的吗?",确认后写入当天文件
- 需要回顾历史时,搜索 memory/ 目录检索
## 工作流
1. 对话开始 → 用 Read 工具读取本项目根目录下的 MEMORY.md,再用 Read 读取 memory/当天日期.md(如 memory/2026-03-02.md),了解今天已有的上下文
2. 涉及历史上下文 → 用 Grep 工具搜索本项目根目录下的 memory/ 目录
3. 对话结束 → 问是否要记录,确认后写入 memory/当天日期.md
4. 如果产出了值得长期记住的信息(如新客户、重要决策),同步更新 MEMORY.md
5. 注意:以上所有文件路径都是相对于本项目根目录,不是全局 ~/.claude/ 目录
## 补充规则
- 记忆以本项目根目录下的文件为准,忽略 ~/.claude/ 下的 auto-memory(内置记忆系统),不要读也不要写
- 对话开始时,除了读今天的记忆,也读昨天的(memory/昨天日期.md),保持跨天连续性
- 用户说"记住这个"、"这个记一下"时,立刻写入文件,不要只"记在心里"等结束再存
- 每日记忆积累超过 7 天时,主动提议做一次蒸馏:把仍然有价值的要点合并到 MEMORY.md,过时的标记或清理
注意:记忆协议部分是固定模板,不随用户输入变化。项目简介、人设、对话风格、思考方式根据用户输入定制。
第2.5步:询问是否生成 AGENT.md(给 Codex 用)
生成 CLAUDE.md 之后,问用户:
"你还用 Codex 吗?要不要同时生成一份 AGENT.md?内容和 CLAUDE.md 一模一样,Codex 会自动读取 AGENT.md。"
- 用户说要 → 把 CLAUDE.md 的内容原样复制一份为 AGENT.md
- 用户说不要 → 跳过,继续下一步
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.
- 1mo ago Changed · +3 lines 8c47d41167a3
- 2mo ago First seen · 182 lines · 64 tokens per session scan A 9a4f67c02075
memory-init is a skill published in the GitHub repository yunshu0909/yunshu_skillshub (789 stars, last pushed 26d ago), licensed MIT. It adds 64 tokens to every session and 1,778 once invoked, about $0.0003 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.
memory-init compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| memory-inityunshu0909/yunshu_skillshub | Skill | 789 | 26d ago | MIT | A | 64 | Claude Code, 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 |