Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问clear审计异常

memory-management内存管理

Agent Skill

memory-management 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,011

周安装

43

GitHub Stars

8

下载量

354
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:memory-management(内存管理)
来源仓库:https://github.com/raoulbia-ai/claude-recall
仓库路径:skills/memory-management
安装命令:
npx skills add https://github.com/raoulbia-ai/claude-recall --skill memory-management
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/raoulbia-ai/claude-recall --skill memory-management

简介

memory-management 用于查找、检索和筛选与内存管理相关的信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词定位候选结果。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装并使用。
  • 安装前需确认权限范围和维护状态,注意可能触发联网或文件操作。
  • 建议结合原始 README 核验具体用法和功能边界。

SKILL.md

Memory Management

Persistent memory system that ensures Claude never repeats mistakes and always applies learned patterns across conversations.

4 Tools

  • mcp__claude-recall__load_rules - Load all active rules before starting work. No query needed.
  • mcp__claude-recall__store_memory - Store a rule or learning. Immediately active in this conversation.
  • mcp__claude-recall__search_memory - Search memories by keyword. Use to find specific memories before making decisions.
  • mcp__claude-recall__delete_memory - Delete a specific memory by ID. Use search_memory first to find the ID.

When to Use

Loading (Recall)

  • First action of every session — Call load_rules before ANY tool call, including Read/Glob/Grep. Rules must inform exploration, not just editing.
  • After context compression — If context was compressed or conversation is long, call load_rules again. Earlier rules may have been lost.
  • Switching task areas — When moving from one domain to another (e.g., tests → database → CI), call search_memory with the new area as query.
  • Before modifying a file — Call search_memory with the file path or module name to check for file-specific conventions.

Storing (Capture)

  • When user corrects your work - Call store_memory with metadata.type: "correction"
  • When user mentions preferences - Call store_memory with metadata.type: "preference"
  • After overcoming a challenge - Call store_memory with metadata.type: "failure"
  • DevOps/workflow rules - Call store_memory with metadata.type: "devops"

Key Directives

  1. ALWAYS load rules before acting — Call load_rules as your very first action in a session, before even reading files. Rules inform how you explore, not just how you edit.
  2. ACT on loaded rules — After loading, state which rules apply to your current task before proceeding. If a rule conflicts with your plan, follow the rule. If none apply, say so. Loading without applying is the same as not loading.
  3. Cite applied rules inline — When a rule influences your work: (applied from memory:). Place the citation next to the action it influenced, not at the end of unrelated text.
  4. User says "recall" / "remember" / "store this" → use Claude Recall — When the user says any of these keywords, ALWAYS use mcp__claude-recall__store_memory. Do NOT write to the native memory directory (~/.claude/projects/*/memory/) for these requests. Claude Recall is the user's preferred memory system.
  5. Ask before storing — Before calling store_memory, tell the user what you plan to store and ask for confirmation
  6. Capture corrections immediately — User fixes are highest priority (still ask first)
  7. Never store secrets — No API keys, passwords, tokens, or PII

Quick Reference

Load Rules (Before Every Task)

mcp__claude-recall__load_rules({})

Returns all active preferences, corrections, failures, and devops rules in one call. Deterministic and complete.

Store Memory (When Something Important Happens)

mcp__claude-recall__store_memory({
  "content": "Description of what to remember",
  "metadata": { "type": "preference|correction|devops|failure" }
})

Returns the stored rule with an activeRule field and _directive to apply it immediately. No need to call load_rules again.

Same-Session Rules

When you call store_memory, the response includes:

  • activeRule: The stored content formatted as a rule
  • _directive: Instructions to apply the rule immediately

This means rules stored mid-conversation are active right away without reloading.

What Gets Stored

Automatic Capture (You Don't Need to Store)

The system auto-captures when users say:

  • "I prefer X" / "Always use X" / "Never do X" -> Preferences
  • "We use X for Y" / "Tests go in X" -> Project conventions
  • "This is a [type] project" -> Project context

Manual Storage Required

Store these explicitly:

Corrections (highest priority):

User: "No, put tests in __tests__/ not tests/"
-> Store: "CORRECTION: Test files go in __tests__/ directory, not tests/"
   metadata: { "type": "correction" }

Complex workflows:

-> Store: "Deploy process: 1) npm test 2) docker build 3) push to ECR 4) kubectl apply"
   metadata: { "type": "devops" }

Learning cycles (fail -> fix -> success):

-> Store: "REST API failed due to CORS. Solution: Use GraphQL endpoint instead."
   metadata: { "type": "failure" }

Memory Priority Order

  1. Corrections - User explicitly fixed a mistake (HIGHEST)
  2. DevOps - Git, testing, deploy, architecture patterns
  3. Preferences - Code style, tool choices, conventions
  4. Failures - Learning cycles and past mistakes

What NOT to Store

Never store:

  • API keys, tokens, passwords, secrets
  • Personal emails, phone numbers, addresses
  • Database connection strings with credentials
  • Any sensitive configuration values

Safe to store:

  • "We use JWT for auth" (pattern, not credentials)
  • "API base URL is https://api.example.com" (non-sensitive)
  • "PostgreSQL for production, SQLite for tests" (tool choice)

Skill Crystallization

As memories accumulate, Claude Recall automatically generates skill files in .claude/skills/auto-*/. These load natively in future sessions — no tool call needed.

How it works: After each store_memory, the system checks if any topic has enough memories to form a skill (3+ for most types, 5+ for preferences). If so, it writes a SKILL.md file that Claude Code loads automatically.

CLI commands:

  • npx claude-recall skills list — see generated skills
  • npx claude-recall skills generate --force — force regeneration
  • npx claude-recall skills clean --force — remove all auto-generated skills

Automatic Capture Hooks

Claude Recall registers hooks on three Claude Code events to capture memories automatically — no MCP tool call needed:

HookEventWhat it captures
correction-detectorUserPromptSubmitUser corrections, preferences, and project knowledge from natural language
memory-stopStopCorrections, preferences, failures, and devops patterns from the last 6 transcript entries
precompact-preservePreCompactBroader sweep of up to 50 transcript entries before context compression

Key behaviors:

  • LLM-first classification via Claude Haiku — detects natural statements like "we use tabs here" or "tests go in __tests__/" that regex would miss
  • Automatic zero-config: picks up ANTHROPIC_API_KEY from the Claude Code session environment
  • Silent regex fallback when API key is unavailable or API call fails
  • Batch classification: Stop and PreCompact hooks send all texts in a single API call
  • Near-duplicate detection via Jaccard similarity (55% threshold) prevents redundant storage
  • Per-event limits: 3 (Stop), 5 (PreCompact) to prevent DB flooding
  • Always exits 0 — hooks never block Claude

Setup: Run npx claude-recall setup --install to register hooks in .claude/settings.json.

Example Workflows

Starting a New Task

1. User: "Add user authentication"

2. Load rules first:
   mcp__claude-recall__load_rules({})

3. Response includes:
   ## Preferences
   - auth_method: JWT with httpOnly cookies
   ## Corrections
   - Never use localStorage for auth tokens

4. Implement using JWT + httpOnly cookies (not sessions, not localStorage)

5. User approves -> Done (no need to store, just applied existing knowledge)

User Corrects Your Work

1. You: Created auth with localStorage tokens

2. User: "No, we always use httpOnly cookies for security"

3. Fix the code

4. Ask: "I'd like to remember: always use httpOnly cookies for auth tokens, never localStorage. Store this?"

5. User: "Yes"

6. Store the correction:
   mcp__claude-recall__store_memory({
     "content": "CORRECTION: Always use httpOnly cookies for auth tokens, never localStorage",
     "metadata": { "type": "correction" }
   })

7. Response includes activeRule - apply it immediately

Overcoming a Challenge

1. Tried: Redis sessions for auth
   Failed: "Session sync issues in k8s cluster"

2. User suggested: "Try stateless JWT"

3. Implemented JWT -> Works!

4. Ask: "I'd like to remember: Redis sessions fail in k8s due to sync issues; use stateless JWT instead. Store this?"

5. User: "Yes"

6. Store the learning:
   mcp__claude-recall__store_memory({
     "content": "Auth in k8s: Redis sessions failed (sync issues). JWT stateless tokens work correctly.",
     "metadata": { "type": "failure", "learning_cycle": true }
   })

Troubleshooting

Load rules returns nothing:

  • This may be a new project with no history yet
  • Store rules as you learn them with store_memory

Automatic capture missed something:

  • Store it manually with appropriate type
  • Future load_rules calls will find it

The Learning Loop: Load rules -> Apply -> Execute -> Capture outcomes -> Better next time

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

27.07%
按下载量换算96

OpenCode

24.14%
按下载量换算85

Antigravity

20.4%
按下载量换算72

windsurf

13.02%
按下载量换算46

Codex

7.26%
按下载量换算26

trae

3.72%
按下载量换算13

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills