跳到正文
Skillpedia
智能体29k · #9486

remember

它能做什么

这项技能让你告诉智能体为未来的会话保留某条特定知识。适合希望 AI 记住某个决定、某个陷阱或某项偏好的人。

适用场景

  • ✓当你希望智能体记住一条调试心得、供以后使用的时候。
  • ✓当某项项目约定没有写在指令中的时候。
  • ✓当你做出架构决定、并希望智能体知道它的时候。

技能链接

https://github.com/alirezarezvani/claude-skills/blob/main/engineering-team/self-improving-agent/skills/remember/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/alirezarezvani/claude-skills/blob/main/engineering-team/self-improving-agent/skills/remember/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请记住,我们的 CI 需要 Node 20,因为 Node 22 会导致构建失败。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会接收你给出的事实,检查是否已有类似笔记,然后把一条带日期和背景的条目写入记忆文件。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

/si:remember — Save Knowledge Explicitly

Writes an explicit entry to auto-memory when something is important enough that you don't want to rely on Claude noticing it automatically.

Usage

/si:remember <what to remember>
/si:remember "This project's CI requires Node 20 LTS — v22 breaks the build"
/si:remember "The /api/auth endpoint uses a custom JWT library, not passport"
/si:remember "Reza prefers explicit error handling over try-catch-all patterns"

When to Use

Situation Example
Hard-won debugging insight "CORS errors on /api/upload are caused by the CDN, not the backend"
Project convention not in CLAUDE.md "We use barrel exports in src/components/"
Tool-specific gotcha "Jest needs --forceExit flag or it hangs on DB tests"
Architecture decision "We chose Drizzle over Prisma for type-safe SQL"
Preference you want Claude to learn "Don't add comments explaining obvious code"

Workflow

Step 1: Parse the knowledge

Extract from the user's input:

  • What: The concrete fact or pattern
  • Why it matters: Context (if provided)
  • Scope: Project-specific or global?

Step 2: Check for duplicates

MEMORY_DIR="$HOME/.claude/projects/$(pwd | sed 's|/|%2F|g; s|%2F|/|; s|^/||')/memory"
grep -ni "<keywords>" "$MEMORY_DIR/MEMORY.md" 2>/dev/null

If a similar entry exists:

  • Show it to the user
  • Ask: "Update the existing entry or add a new one?"

Step 3: Write to MEMORY.md

Append to the end of MEMORY.md:

- {{concise fact or pattern}}

Keep entries concise — one line when possible. Auto-memory entries don't need timestamps, IDs, or metadata. They're notes, not database records.

If MEMORY.md is over 180 lines, warn the user:

⚠️ MEMORY.md is at {{n}}/200 lines. Consider running /si:memory-review to free space.

Step 4: Suggest promotion

If the knowledge sounds like a rule (imperative, always/never, convention):

💡 This sounds like it could be a CLAUDE.md rule rather than a memory entry.
   Rules are enforced with higher priority. Want to /si:promote it instead?

Step 5: Confirm

✅ Saved to auto-memory

  "{{entry}}"

  MEMORY.md: {{n}}/200 lines
  Claude will see this at the start of every session in this project.

What NOT to use /si:remember for

  • Temporary context: Use session memory or just tell Claude in conversation
  • Enforced rules: Use /si:promote to write directly to CLAUDE.md
  • Cross-project knowledge: Use ~/.claude/CLAUDE.md for global rules
  • Sensitive data: Never store credentials, tokens, or secrets in memory files

Tips

  • Be concise — one line beats a paragraph
  • Include the concrete command or value, not just the concept
    • ✅ "Build with pnpm build, tests with pnpm test:e2e"
    • ❌ "The project uses pnpm for building and testing"
  • If you're remembering the same thing twice, promote it to CLAUDE.md
常见问题

它会保存重复的内容吗?

不会。它会先查找类似的条目,并在添加另一条之前向你展示。

哪些内容值得保存?

来之不易的调试心得、项目约定、工具的陷阱、架构决定和偏好。

笔记是只保存给一个项目,还是保存给所有项目?

该技能会判断一条笔记是针对项目的还是全局的,并可以按任一方式保存。

详情

作者的原始描述

Explicitly save important knowledge to auto-memory with timestamp and context. Use when the user says 'remember this', asks you to capture a lesson so you stop repeating a mistake across sessions, or when a discovery is too important to rely on auto-capture.

repo: alirezarezvani/claude-skills

热度

GitHub 星标
29k
排名
#9486
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能