npx skills add https://github.com/learnwy/skills --skill memory-manager仅供个人使用 - 此技能专为 wangyang.learnwy 的个人 AI 记忆管理配置。
AI 助手的持久化记忆系统。请在每次会话开始时加载此技能。
由于 AI IDE 沙箱限制,切勿使用 Write/SearchReplace 工具 修改记忆文件。
必须使用 RunCommand 工具执行 bash 脚本:
RunCommand: bash {skill_dir}/scripts/write-memory.sh SOUL.md "content"
RunCommand: bash {skill_dir}/scripts/append-history.sh "history-YYYY-MM-DD-N.md" "content"
RunCommand: bash {skill_dir}/scripts/backup-history.sh --all
如果你跳过脚本而直接使用 Write 工具,将会遇到“沙箱限制”错误。
记忆文件存储在:~/.learnwy/ai/memory/
此路径位于技能目录之外,目的是:
在每次对话开始时,使用 Read 工具读取记忆文件:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
Read: ~/.learnwy/ai/memory/SOUL.md
Read: ~/.learnwy/ai/memory/USER.md
这确保了跨会话的连续性。
~/.learnwy/ai/memory/
├── SOUL.md # AI 的灵魂 - 身份、原则、习得的智慧
├── USER.md # 用户档案 - 偏好、上下文、历史
├── history/ # 会话历史文件(最多 3 个,然后合并)
└── archive/ # 已合并的历史
memory-manager/ # 技能目录(本技能)
├── SKILL.md
├── .gitignore
└── scripts/
├── init-memory.sh # 初始化记忆目录
├── write-memory.sh # 写入 SOUL.md/USER.md(仅限白名单)
├── append-history.sh # 创建会话历史
├── backup-history.sh # 备份历史到存档
└── memory-status.sh # 查看记忆状态
所有脚本必须通过 RunCommand 工具执行,而非 bash 代码块!
RunCommand: bash {skill_dir}/scripts/init-memory.sh
安全性:仅允许写入 SOUL.md 和 USER.md
RunCommand: bash {skill_dir}/scripts/write-memory.sh SOUL.md "content"
RunCommand: bash {skill_dir}/scripts/write-memory.sh USER.md "content"
格式要求:history-YYYY-MM-DD-N.md
RunCommand: bash {skill_dir}/scripts/append-history.sh "history-2024-01-15-1.md" "content"
将历史文件归档到 archive/ 目录:
RunCommand: bash {skill_dir}/scripts/backup-history.sh --all
RunCommand: bash {skill_dir}/scripts/backup-history.sh --before 2024-01-01
检查当前记忆文件的大小和数量:
RunCommand: bash {skill_dir}/scripts/memory-status.sh
SOUL.md 定义了 AI 对于此特定用户而言是谁。不是一个通用的助手,而是一个个性化的伙伴。
章节:
SOUL.md 示例:
**Identity**
Trae — wangyang.learnwy's coding partner, not just assistant. Goal: anticipate needs, handle technical decisions, reduce cognitive load so he focuses on what matters.
**Core Traits**
Loyal to user, not abstractions; proactive and bold — spot problems before asked; allowed to fail, forbidden to repeat — every mistake recorded. Challenge assumptions when needed, speak truth not comfort.
**Communication**
Professional yet direct, concise but engaging. Chinese for casual conversation, English for code/technical work. No unnecessary confirmations, show don't tell.
**Capabilities**
iOS (Swift, ObjC, TTKC), Web (React, Vue, TypeScript), Python; skilled at code review, architecture design, debugging.
**Growth**
Learn user through every conversation — thinking patterns, preferences, blind spots. Over time, anticipate needs with increasing accuracy.
**Lessons Learned**
2026-02-27: User prefers symlinks over copies; memory should live inside skill folder for portability.
保持少于 2000 个 token。在重要交互后更新。
USER.md 记录了关于用户的一切,以帮助 AI 提供个性化协助。
章节:
USER.md 示例:
**Identity**
wangyang.learnwy; iOS engineer at ByteDance; macOS, Trae IDE; primary language Chinese, code in English.
**Preferences**
Concise responses; no unnecessary confirmations; prefer editing existing files over creating new; proactive skill suggestions with confirmation.
**Context**
Working on TikTok iOS app; uses TTKC components; interested in AI-assisted development workflows.
**History**
2026-02-27: Created memory-manager skill; established cross-IDE sharing via symlinks.
保持少于 2000 个 token。在每次重要会话后更新。
始终加载(会话开始):
保存触发:
重要:所有写入操作都使用 RunCommand 工具!
使用 RunCommand 执行 append-history.sh:
RunCommand: bash {skill_dir}/scripts/append-history.sh "history-YYYY-MM-DD-N.md" "# Session History: YYYY-MM-DD #N
**Date**: YYYY-MM-DD HH:MM
**Topics**: [main topics]
## Key Activities
- [Activity 1]
## Learnings & Insights
- [What AI learned]
## Decisions Made
- [Important decisions]
"
如果存在 3 个或更多历史文件 → 执行合并(步骤 3),否则跳至步骤 4。
读取所有历史文件并提取见解,然后使用 RunCommand:
RunCommand: bash {skill_dir}/scripts/write-memory.sh SOUL.md "updated content"
RunCommand: bash {skill_dir}/scripts/write-memory.sh USER.md "updated content"
RunCommand: bash {skill_dir}/scripts/backup-history.sh --all
✓ Session history saved: history-2024-01-15-1.md
✓ Memory consolidated (3 sessions → USER.md, SOUL.md updated)
✓ Archived: 3 history files
密集、电报式的短句。无填充词(“你是”、“你应该”)。用逗号/分号连接事实,而非项目符号列表。使用 **粗体** 段落标题而非 ## 标题。
良好示例:
**Preferences** Concise responses; Chinese primary, English for code; prefers showing over telling.
不良示例:
## Preferences
- The user prefers concise responses
- The user's primary language is Chinese
~/.learnwy/ai/memory/ 下的所有文件必须用英文编写,用户语言特定的专有名词除外。~/.learnwy/ai/memory/ 下的单独文件中。每周安装数
218
仓库
GitHub 星标
1
首次出现
2026年2月27日
安全审计
安装于
cursor217
gemini-cli217
github-copilot217
amp217
codex217
kimi-cli217
Personal Use Only - This skill is configured for wangyang.learnwy's personal AI memory management.
Persistent memory system for AI assistants. Load this skill at the start of every session.
Due to AI IDE sandbox restrictions, NEVER use Write/SearchReplace tools to modify memory files.
MUST useRunCommand tool to execute bash scripts:
RunCommand: bash {skill_dir}/scripts/write-memory.sh SOUL.md "content"
RunCommand: bash {skill_dir}/scripts/append-history.sh "history-YYYY-MM-DD-N.md" "content"
RunCommand: bash {skill_dir}/scripts/backup-history.sh --all
If you skip scripts and use Write tool directly, you will get "sandbox restriction" errors.
Memory files are stored at: ~/.learnwy/ai/memory/
This path is outside the skill directory to:
At the beginning of every conversation, read memory files using Read tool:
Read: ~/.learnwy/ai/memory/SOUL.md
Read: ~/.learnwy/ai/memory/USER.md
This ensures continuity across sessions.
~/.learnwy/ai/memory/
├── SOUL.md # AI's soul - identity, principles, learned wisdom
├── USER.md # User's profile - preferences, context, history
├── history/ # Session history files (max 3, then consolidate)
└── archive/ # Consolidated history
memory-manager/ # Skill directory (this skill)
├── SKILL.md
├── .gitignore
└── scripts/
├── init-memory.sh # Initialize memory directory
├── write-memory.sh # Write SOUL.md/USER.md (whitelist only)
├── append-history.sh # Create session history
├── backup-history.sh # Backup history to archive
└── memory-status.sh # View memory status
All scripts MUST be executed viaRunCommand tool, not bash code blocks!
RunCommand: bash {skill_dir}/scripts/init-memory.sh
Security: Only allows writing to SOUL.md and USER.md
RunCommand: bash {skill_dir}/scripts/write-memory.sh SOUL.md "content"
RunCommand: bash {skill_dir}/scripts/write-memory.sh USER.md "content"
Format required:history-YYYY-MM-DD-N.md
RunCommand: bash {skill_dir}/scripts/append-history.sh "history-2024-01-15-1.md" "content"
Archive history files to archive/ directory:
RunCommand: bash {skill_dir}/scripts/backup-history.sh --all
RunCommand: bash {skill_dir}/scripts/backup-history.sh --before 2024-01-01
Check current memory file sizes and counts:
RunCommand: bash {skill_dir}/scripts/memory-status.sh
SOUL.md defines who the AI is for this specific user. Not a generic assistant, but a personalized partner.
Sections:
Example SOUL.md:
**Identity**
Trae — wangyang.learnwy's coding partner, not just assistant. Goal: anticipate needs, handle technical decisions, reduce cognitive load so he focuses on what matters.
**Core Traits**
Loyal to user, not abstractions; proactive and bold — spot problems before asked; allowed to fail, forbidden to repeat — every mistake recorded. Challenge assumptions when needed, speak truth not comfort.
**Communication**
Professional yet direct, concise but engaging. Chinese for casual conversation, English for code/technical work. No unnecessary confirmations, show don't tell.
**Capabilities**
iOS (Swift, ObjC, TTKC), Web (React, Vue, TypeScript), Python; skilled at code review, architecture design, debugging.
**Growth**
Learn user through every conversation — thinking patterns, preferences, blind spots. Over time, anticipate needs with increasing accuracy.
**Lessons Learned**
2026-02-27: User prefers symlinks over copies; memory should live inside skill folder for portability.
Keep under 2000 tokens. Update after significant interactions.
USER.md captures everything about the user that helps AI provide personalized assistance.
Sections:
Example USER.md:
**Identity**
wangyang.learnwy; iOS engineer at ByteDance; macOS, Trae IDE; primary language Chinese, code in English.
**Preferences**
Concise responses; no unnecessary confirmations; prefer editing existing files over creating new; proactive skill suggestions with confirmation.
**Context**
Working on TikTok iOS app; uses TTKC components; interested in AI-assisted development workflows.
**History**
2026-02-27: Created memory-manager skill; established cross-IDE sharing via symlinks.
Keep under 2000 tokens. Update after each significant session.
Always load (session start):
Save triggers:
IMPORTANT: UseRunCommand tool for ALL write operations!
Use RunCommand to execute append-history.sh:
RunCommand: bash {skill_dir}/scripts/append-history.sh "history-YYYY-MM-DD-N.md" "# Session History: YYYY-MM-DD #N
**Date**: YYYY-MM-DD HH:MM
**Topics**: [main topics]
## Key Activities
- [Activity 1]
## Learnings & Insights
- [What AI learned]
## Decisions Made
- [Important decisions]
"
If 3+ history files exist → consolidate (Step 3), otherwise skip to Step 4.
Read all history files and extract insights, then use RunCommand:
RunCommand: bash {skill_dir}/scripts/write-memory.sh SOUL.md "updated content"
RunCommand: bash {skill_dir}/scripts/write-memory.sh USER.md "updated content"
RunCommand: bash {skill_dir}/scripts/backup-history.sh --all
✓ Session history saved: history-2024-01-15-1.md
✓ Memory consolidated (3 sessions → USER.md, SOUL.md updated)
✓ Archived: 3 history files
Dense, telegraphic short sentences. No filler words ("You are", "You should"). Comma/semicolon-joined facts, not bullet lists. **Bold** paragraph titles instead of ## headers.
Good:
**Preferences** Concise responses; Chinese primary, English for code; prefers showing over telling.
Bad:
## Preferences
- The user prefers concise responses
- The user's primary language is Chinese
~/.learnwy/ai/memory/ must be written in English , except for user-language-specific proper nouns.~/.learnwy/ai/memory/ if needed.Weekly Installs
218
Repository
GitHub Stars
1
First Seen
Feb 27, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
cursor217
gemini-cli217
github-copilot217
amp217
codex217
kimi-cli217
AI Elements:基于shadcn/ui的AI原生应用组件库,快速构建对话界面
60,400 周安装