Community写作与编辑github.com

dancepower22/pi-memory-evo

pi-native persistent memory & self-evolving skill: zero-dependency, always-active, 3-layer memory (fact/pattern/lesson) + lesson routing. pi 原生永久记忆与自进化技能

pi-memory-evo 是什么?

pi-memory-evo is a Claude Code agent skill that pi-native persistent memory & self-evolving skill: zero-dependency, always-active, 3-layer memory (fact/pattern/lesson) + lesson routing. pi 原生永久记忆与自进化技能.

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add dancepower22/pi-memory-evo

Installed? Explore more 写作与编辑 skills: steipete/notion, affaan-m/seo, affaan-m/brand-voice · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

永久记忆与自进化(memory)

核心原则:主动保存,不等用户要求。 把用户环境变成"越用越懂你"的系统: 三层粒度记忆(事实/模式/经验)+ 会话摘要 + 经验路由(自进化)。

🚀 会话启动(每次新会话)

  1. 若存在 ~/.agents/memory/MEMORY.md先读取,快速了解用户背景、偏好与近期会话。
  2. 需要细节时用 memory.py get <id>memory.py search <关键词> 深挖。
  3. 向用户展示已记住的关键信息(简要),体现连续性。

📌 主动保存(ALWAYS ACTIVE,遇到即存,不要等会话结束)

出现以下情况时,立即调用 memory.py add <type> <内容> 保存:

类型保存时机示例
fact用户透露偏好/习惯/身份信息;项目重要决策、技术选型、约定;用户明确说"记住""用户偏好中文回复" "项目用 pnpm + TypeScript"
pattern同一行为/问题出现 2 次以上(含本次)"每次装技能用户都要求先评估依赖"
lesson踩坑后学到的经验、排障结论、发现的坑"DuckDuckGo 的 ddgs 默认后端会走 Yandex 超时,须用 backend='html'"
  • 保存可附 --tag a,b 便于检索。
  • 工具会自动近似去重,重复内容会提示而非重复存储。

🗂️ 会话结束(或用户要求"总结会话/沉淀")

按序执行:

  1. 回顾本次会话,提取 2~5 条 最重要的信息。
  2. 归类保存fact(新偏好/决策)→ pattern(新规律)→ lesson(新经验)。
  3. 经验路由(自进化):对每条 lesson 判断:
    • 属于可复用方法论(如"某类任务的标准流程")→ 新建或更新 ~/.agents/skills/ 下的技能(用 write/edit 工具),让下次自动生效;
    • 属于一次性事实 → 存 fact;
    • 属于环境/账号专属(如某工具需配置)→ 存 lesson 即可。
  4. memory.py session-save "<本次会话一句话摘要>" --key 关键词1,关键词2 保存会话记录。
  5. 运行 memory.py sync 刷新 MEMORY.md 总览。

🔍 查询记忆

用户问"我之前说过/我们上次/我的偏好"之类 → memory.py search <关键词>;列全部 → memory.py list

⚙️ 工具速查

P=~/.agents/skills/pi-memory-evo/memory.py
$P init                       # 首次初始化
$P add fact "内容" --tag 偏好    # 存事实/模式/经验
$P session-save "摘要" --key a  # 存会话摘要
$P search 关键词                # 搜索
$P list                        # 全部列出
$P get <id> / update <id> <新内容> / delete <id>   # 管理
$P stats                       # 统计
$P sync                        # 刷新总览 MEMORY.md

📂 存储位置

  • 数据:~/.agents/memory/memory.json(四层记忆,JSON)
  • 总览:~/.agents/memory/MEMORY.md(会话启动时读这个)
  • 技能本体:~/.agents/skills/pi-memory-evo/(工具 + 本说明)

⚠️ 边界

  • 不存敏感凭据:token、密码、密钥一律不保存。
  • 尊重用户意愿:用户说"这个别记"则不存;说"忘掉 X"则 delete 对应条目。
  • 记忆是辅助,不替代确认:涉及重要操作仍以用户当前意图为准。

相关技能

steipete/notion

Notion CLI/API for pages, Markdown content, data sources, files, comments, search, Workers, and raw API calls.

community

affaan-m/seo

Audit, plan, and implement SEO improvements across technical SEO, on-page optimization, structured data, Core Web Vitals, and content strategy. Use when the user wants better search visibility, SEO remediation, schema markup, sitemap/robots work, or keyword mapping.

community

affaan-m/brand-voice

Build a source-derived writing style profile from real posts, essays, launch notes, docs, or site copy, then reuse that profile across content, outreach, and social workflows. Use when the user wants voice consistency without generic AI writing tropes.

community

affaan-m/crosspost

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

community

affaan-m/x-api

X/Twitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.

community

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

community