Agent skill

Memory Init

by yunshu0909 in yunshu0909/yunshu_skillshub

在当前目录下初始化记忆系统,生成 CLAUDE.md(可选 AGENT.md 给 Cursor 用)、MEMORY.md 和 memory/ 目录。当用户说"初始化记忆"、"搭建记忆"、"memory init"、"/memory-init"时触发。

MITAuto-check passedAgent Workflows

Install Memory Init

skills CLI
$ npx skills add yunshu0909/yunshu_skillshub --skill memory-init -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install yunshu0909/yunshu_skillshub memory-init --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/yunshu0909/yunshu_skillshub.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agent/memory-init .claude/skills/memory-init && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
memory-init
GitHub stars
767
Used in
1 other repo
Token cost
~779 tokens
SKILL.md length
124 words
Files
1
Skills in repo
25
Repo updated
First seen
Licence
MIT

At a glance

在当前目录下初始化记忆系统,生成 CLAUDE.md(可选 AGENT.md 给 Cursor 用)、MEMORY.md 和 memory/ 目录。当用户说"初始化记忆"、"搭建记忆"、"memory init"、"/memory-init"时触发。

  • Works in 3 steps: 记忆协议是固定的 → 不破坏已有内容 → 生成后立即可用
  • Tasks that involve Agent instruction files
  • SKILL.md covers 功能说明, 工作流程 and 核心原则
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Memory Init is an agent skill from yunshu0909/yunshu_skillshub. 在当前目录下初始化记忆系统,生成 CLAUDE.md(可选 AGENT.md 给 Cursor 用)、MEMORY.md 和 memory/ 目录。当用户说"初始化记忆"、"搭建记忆"、"memory init"、"/memory-init"时触发。

Its SKILL.md is about 780 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering Agent instruction files. The repository describes itself as: 云舒精选的 Claude Code Skills 集合,提升开发和产品管理效率. The licence is MIT.

When your agent uses it

  • Tasks that involve Agent instruction files

Example prompts

  • “memory init”
  • “/memory-init”
  • “/memory-init”

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. 记忆协议是固定的
  2. 不破坏已有内容
  3. 生成后立即可用

What it can do on your machine

Read from SKILL.md and the folder at commit da0d31f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown and bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Memory Init loads about 779 tokens when it runs. Until then it costs about 34 tokens; SKILL.md has 124 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~34
When it runs · the whole SKILL.md, loaded when a task matches
~779

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from yunshu0909/yunshu_skillshub at commit da0d31f, republished under its MIT licence (© yunshu0909). 124 words, ~779 tokens.

Download SKILL.mdSave it as .claude/skills/memory-init/SKILL.md (or your agent's skills folder).
name
memory-init
description
在当前目录下初始化记忆系统,生成 CLAUDE.md(可选 AGENT.md 给 Cursor 用)、MEMORY.md 和 memory/ 目录。当用户说"初始化记忆"、"搭建记忆"、"memory init"、"/memory-init"时触发。
metadata.status
active
metadata.status_updated_at
2026-10-06

记忆系统初始化

功能说明

在当前工作目录下一键部署记忆系统,生成三个东西:

  1. CLAUDE.md — 人设 + 对话规则 + 记忆协议
  2. MEMORY.md — 长期记忆文件(初始为空模板)
  3. 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 人设信息

问用户以下问题:

  1. 你的角色是什么?(如:SA/售前、开发、产品、运营)
  2. 你主要用 Claude 做什么?(如:客户沟通、技术方案、日常文档、代码开发)
  3. 对话风格偏好?(如:简洁直接 / 详细展开 / 随意聊天)
  4. 有什么特别的工作习惯要我知道的?(可选,用户可以跳过)

第2步:生成 CLAUDE.md

根据收集到的信息生成 CLAUDE.md,包含以下模块:

markdown
# 项目简介

[根据扫描结果或用户描述生成,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
  • 用户说不要 → 跳过,继续下一步

AGENT.md 和 CLAUDE.md 内容完全相同,唯一区别是文件名。CLAUDE.md 给 Claude Code 用,AGENT.md 给 Codex 用。


第3步:生成 MEMORY.md

创建初始的长期记忆文件:

markdown
# 记忆

## 关于我
- 角色:[用户的角色]
- 日常工作:[用户的主要用途]

## 项目与上下文
-(待补充)

## 工作习惯与偏好
- [如果用户提供了偏好,写在这里]

## 重要决策
- [今天日期]:初始化记忆系统

第4步:创建 memory/ 目录
bash
mkdir -p memory/

如果用户愿意,把当前对话的初始化过程作为第一条每日记忆写入 memory/当天日期.md。


第5步:确认完成

告诉用户生成了什么,简要说明使用方法:

已生成:
- CLAUDE.md(人设 + 记忆协议,Claude Code 用)
- AGENT.md(同上,Cursor 用)← 如果用户选了才显示这行
- MEMORY.md(长期记忆)
- memory/(每日记忆目录)

使用方式:
- 正常对话即可,我会自动读取记忆
- 对话结束时我会问你要不要保存要点
- 说"记住这个"可以随时存记忆
- 积累一段时间后说"整理记忆"做一次蒸馏

核心原则

1. 记忆协议是固定的

人设和风格可以个性化,但记忆协议模块不要改——这是系统运行的基础逻辑,保持一致才能在不同目录下通用。

2. 不破坏已有内容

如果目录下已有 CLAUDE.md 或 AGENT.md,默认不覆盖。用户明确要求才覆盖。

3. 生成后立即可用

初始化完成后,下次新开对话就应该能正常工作——读到 MEMORY.md、按协议执行。不需要额外配置。

© yunshu0909, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in agent/memory-init of yunshu0909/yunshu_skillshub.

Open the folder on GitHubat commit da0d31f

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in yunshu0909/yunshu_skillshub, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Memory Init next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Memory Init compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Memory Init this skillyunshu0909/yunshu_skillshub7671 repos~779Automated safety check: PassMIT
Using Agent Skillsaddyosmani/agent-skills103k4 repos~2.4kAutomated safety check: PassMIT
Claude ReflectBayramAnnakov/claude-reflect1.7k2 repos~627Automated safety check: PassMIT
Writing For Agentsbestofjs/bestofjs3.1k19 repos~2.7kAutomated safety check: PassMIT
Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills21k—~1.9kAutomated safety check: PassMIT
Task Observerrebelytics/one-skill-to-rule-them-all3.2k1 repos~12kAutomated safety check: PassCC-BY-4.0

Similar skills

  • Using Agent Skills

    addyosmani/agent-skills

    Meta-skill for choosing which workflow skill fits the task at hand, plus always-on habits: surface assumptions, stop on confusion, push back, keep it simple and stay in scope.

    103k GitHub starsUsed in 4 repos~2.4k tokens
    Agent WorkflowsAuto-check passed
  • Claude Reflect

    BayramAnnakov/claude-reflect

    Self-learning system that captures corrections during sessions and reminds users to run /reflect to update CLAUDE.md.

    1.7k GitHub starsUsed in 2 repos~627 tokens
    Agent WorkflowsAuto-check passed
  • Writing For Agents

    bestofjs/bestofjs

    Writing documents for agents. An agent skill from bestofjs/bestofjs.

    3.1k GitHub starsUsed in 19 repos~2.7k tokens
    Agent WorkflowsAuto-check passed
  • Neat-Freak Knowledge Closeout

    KKKKhazix/khazix-skills

    Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.

    21k GitHub stars~1.9k tokensUpdated 7 days ago
    Agent WorkflowsAuto-check passed
  • Task Observer

    rebelytics/one-skill-to-rule-them-all

    Monitors task execution for skill improvement opportunities.

    3.2k GitHub starsUsed in 1 repo~12k tokens
    Agent WorkflowsAuto-check passed
  • SkillOpt Sleep Cycle

    microsoft/SkillOpt

    Official

    Runs an on-demand or nightly sleep cycle that reviews past Claude Code sessions and proposes validated updates to CLAUDE.md and skills.

    18k GitHub stars~2.3k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check passed

More from yunshu0909/yunshu_skillshub

All 25 skills in this repo
  • Dual Agent Collaboration

    yunshu0909/yunshu_skillshub

    让 Codex 与 Claude Code 通过本机 CLI 组成“主执行者 + 独立审查者”的对称协作闭环。用于用户要求两个模型一起完成、交叉校核、独立审查、修到 ACK,或任务涉及产品需求收敛、复杂方案、跨模块开发、迁移、安全、重要重构和高质量交付时;无论从 Codex 还是 Claude Code 启动,都由当前模型主持,并完整调用另一方完成需求挑战、方案门禁、实现冷审和最终验收。

    767 GitHub stars~2.2k tokensUpdated 2 days ago
    Auto-check passed
  • Image Assistant

    yunshu0909/yunshu_skillshub

    配图助手 - 把文章/模块内容转成统一风格、少字高可读的 16:9 信息图提示词;先定“需要几张图+每张讲什么”,再压缩文案与隐喻,最后输出可直接复制的生图提示词并迭代。

    767 GitHub starsUsed in 1 repo~536 tokens
    Auto-check passed
  • Page Solution Design

    yunshu0909/yunshu_skillshub

    和用户一起敲定一个前端页面的整页方案(三层法:先定这页给用户什么,再定含哪几样怎么排,最后才是长什么样),最后打成一个定稿包(含高保真全状态与交互流程图)交给开发。触发:用户对一个页面说「想重做 / 重新设计 / 整页不对 / 太满 / 说不清具体改哪」,或「我们讨论一下这页怎么设计」。覆盖三种情形:① 已有页面整页重做;②「替换」——新方案占用同一个入口(同一路由 /…

    767 GitHub stars~2.7k tokensUpdated 2 days ago
    Auto-check passed
  • Backend Logic Design

    yunshu0909/yunshu_skillshub

    和用户一起把一个功能「看不见的部分」敲定:数据存哪、谁写谁读、怎么加载、怎么保存、默认值和升级、核心执行规则、出问题时怎么办、旧东西怎么迁。每条规则带编号、案例和状态(已定 / 方案里有但你没拍板 / 待你定 / AI 定),用户只回答带案例的新选择题、过目没拍过板的规则;给用户看的是按「你会问的问题」分组的问答卡片(最绕的逻辑配可点的模拟器);最后请另一家模型只读查边界,问题闭环后封成后端逻辑…

    767 GitHub stars~2k tokensUpdated 2 days ago
    Auto-check passed
  • Article Study

    yunshu0909/yunshu_skillshub

    带用户精读一篇文章/文档并真正学透(不是出摘要)。五步:抽干货 → 切讲次 → 每讲跑「学-考-讲」循环 → 对号入座 → 实操+测验+讲错题+蒸馏。每讲产出 HTML 课件 + 笔记落盘;讲完必考一次,用户复述后必须挑不精确处拧紧;抽象概念上可交互演示(能点能跑);全程用用户自己的业务场景当案例;学完出多题型自动判分测验卷,最后把收获蒸馏回用户的工具。核心触发条件是用户要的是"学会"而不是"要…

    767 GitHub stars~964 tokensUpdated 2 days ago
    Auto-check passed
  • Issue Pool

    yunshu0909/yunshu_skillshub

    Issue 池全生命周期管理(开发范式 v1 规划段)。核心是一条 issue 驱动的流程:用户随手丢想法,你把糊的 issue 变成能开工的 task——产出的是“问题定义”,不是“解决方案实现”;载体就是仓库根的 ISSUES.md。五个动作:记、并、拆、转、pending。规划规模只区分 single-task(一个版本能交付)与 roadmap(需要多批滚动),不得使用…

    767 GitHub stars~996 tokensUpdated 2 days ago
    Auto-check passed

Categories

Questions about Memory Init

What does Memory Init do?

在当前目录下初始化记忆系统,生成 CLAUDE.md(可选 AGENT.md 给 Cursor 用)、MEMORY.md 和 memory/ 目录。当用户说"初始化记忆"、"搭建记忆"、"memory init"、"/memory-init"时触发。. Memory Init is an agent skill from yunshu0909/yunshu_skillshub.

When should I use Memory Init?

Memory Init fits situations like: tasks that involve Agent instruction files.

How do I install Memory Init in Claude Code?

Run `npx skills add yunshu0909/yunshu_skillshub --skill memory-init -a claude-code`. Or copy the skill folder (agent/memory-init in yunshu0909/yunshu_skillshub) into .claude/skills/memory-init in your project. Claude Code loads it when a task matches its description.

How do I install Memory Init in Codex?

Run `npx skills add yunshu0909/yunshu_skillshub --skill memory-init -a codex`. Or copy the skill folder (agent/memory-init in yunshu0909/yunshu_skillshub) into .agents/skills/memory-init in your project. Codex loads it when a task matches its description.

Can I use Memory Init in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add yunshu0909/yunshu_skillshub --skill memory-init -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/memory-init, .gemini/skills/memory-init, .github/skills/memory-init and .opencode/skills/memory-init in your project.

What does Memory Init need to run?

SKILL.md names no scripts, command-line tools or credentials: Memory Init is instructions for the agent only.

Does Memory Init access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Memory Init safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Memory Init use?

Memory Init is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Memory Init use?

About 779 tokens (SKILL.md is roughly 3.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Memory Init?

Skills that share tags, products or a category with Memory Init: Using Agent Skills (addyosmani/agent-skills, 103k stars), Claude Reflect (BayramAnnakov/claude-reflect, 1.7k stars), Writing For Agents (bestofjs/bestofjs, 3.1k stars) and Neat-Freak Knowledge Closeout (KKKKhazix/khazix-skills, 21k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Memory Init?

yunshu0909 (a GitHub user) maintains it in yunshu0909/yunshu_skillshub, which has 767 GitHub stars. The repository holds 25 skills in this directory. The repository was last updated on October 6, 2026.

Source: yunshu0909/yunshu_skillshub on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.