Remember

alirezarezvani/claude-skills/engineering-team/self-improving-agent/skills/remember

作者 alirezarezvani19392f7a0826無授權條款27K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫5 週前更新

Explicitly save important knowledge to auto-memory with timestamp and context. Use when a discovery is too important to rely on auto-capture.

AI 產生的概覽

將重要專案知識明確寫入代理的自動記憶檔案,並檢查重複、提示升級為規則。

功能
引導代理把事實、慣例或除錯經驗明確寫入專案的 MEMORY.md 自動記憶檔案。它會解析知識內容、用 grep 檢查是否已有重複條目、附加一行精簡條目、在檔案接近行數上限時提出警告,並建議把類似規則的知識升級到 CLAUDE.md。它也列出不應使用這個指令的情況,例如機密資訊或臨時脈絡。
適用情境
當某項發現、專案慣例、工具陷阱或架構決策重要到不想依賴自動擷取時使用。適合應讓代理在每次工作階段開始時看到的專案層級筆記。
執行需求
此技能不附帶指令碼,只有指示。它假定使用者家目錄下存在 Claude 風格的專案記憶目錄及其中的 MEMORY.md,並使用 grep、sed 等 shell 指令。

/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

SituationExample
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

bash
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:

markdown
- {{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

來源與署名

來源:alirezarezvani/claude-skills位於engineering-team/self-improving-agent/skills/remember提交19392f7

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架