Token导航 LogoToken导航TokenDH.com
研究检索external-serviceunknown未标认证来源可访问许可证需确认审计通过

memory-management内存管理

Agent Skill

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

总安装

1,488

周安装

62

下载量

496
Local Agent

安装说明

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

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。当前暂无明确安装命令,请以来源页面说明为准。

简介

memory-management 用于查找、检索和筛选相关信息,适合在 Local Agent 中快速定位候选结果。

  • 适用于需要根据关键词或任务场景从来源线索中筛选信息的场景。
  • 可结合来源仓库和原始 README 进一步核验具体用法和功能细节。
  • 安装前建议确认权限范围、维护状态及是否触发联网或文件操作。
  • 注意核对实际命令与文档一致性,避免依赖未经验证的自动化流程。

SKILL.md

[IMPORTANT] Use TaskCreate to break ALL work into small tasks BEFORE starting — including tasks for each file read. This prevents context loss from long files. For simple tasks, AI MUST ATTENTION ask user whether to skip.
Critical Thinking Mindset — Apply critical thinking, sequential thinking. Every claim needs traced proof, confidence >80% to act. Anti-hallucination: Never present guess as fact — cite sources for every claim, admit uncertainty freely, self-check output for errors, cross-reference independently, stay skeptical of own confidence — certainty without evidence root of all hallucination.
AI Mistake Prevention — Failure modes to avoid on every task: - Check downstream references before deleting. Deleting components causes documentation and code staleness cascades. Map all referencing files before removal. - Verify AI-generated content against actual code. AI hallucinates APIs, class names, and method signatures. Always grep to confirm existence before documenting or referencing. - Trace full dependency chain after edits. Changing a definition misses downstream variables and consumers derived from it. Always trace the full chain. - Trace ALL code paths when verifying correctness. Confirming code exists is not confirming it executes. Always trace early exits, error branches, and conditional skips — not just happy path. - When debugging, ask "whose responsibility?" before fixing. Trace whether bug is in caller (wrong data) or callee (wrong handling). Fix at responsible layer — never patch symptom site. - Assume existing values are intentional — ask WHY before changing. Before changing any constant, limit, flag, or pattern: read comments, check git blame, examine surrounding code. - Verify ALL affected outputs, not just the first. Changes touching multiple stacks require verifying EVERY output. One green check is not all green checks. - Holistic-first debugging — resist nearest-attention trap. When investigating any failure, list EVERY precondition first (config, env vars, DB names, endpoints, DI registrations, data preconditions), then verify each against evidence before forming any code-layer hypothesis. - Surgical changes — apply the diff test. Bug fix: every changed line must trace directly to the bug. Don't restyle or improve adjacent code. Enhancement task: implement improvements AND announce them explicitly. - Surface ambiguity before coding — don't pick silently. If request has multiple interpretations, present each with effort estimate and ask. Never assume all-records, file-based, or more complex path.

Quick Summary

Goal: Persist patterns, decisions, and task progress across sessions using two complementary memory systems.

Workflow:

  1. File Checkpoints — Save task-specific context to plans/reports/checkpoint-*.md every 30-60 min
  2. MCP Memory Graph — Store reusable knowledge (patterns, decisions, bug fixes) as typed entities with relations
  3. Recovery — On context loss, find latest checkpoint via Glob, read it, resume from documented next steps

Key Rules:

  • Use file checkpoints for task-specific progress; MCP memory for cross-session knowledge
  • Create checkpoints before expected context compaction and at key milestones
  • Always include Recovery Instructions in checkpoint files

Be skeptical. Apply critical thinking, sequential thinking. Every claim needs traced proof, confidence percentages (Idea should be more than 80%).

Memory Management & Knowledge Persistence

Build and maintain a knowledge graph of patterns, decisions, and learnings across sessions. Also provides external file-based checkpoints for long-running tasks.

Two Memory Systems

SystemStorageUse CasePersistence
MCP Memory GraphIn-memory graph databasePatterns, decisions, learningsCross-session
File Checkpointsplans/reports/*.mdTask progress, analysisPermanent files

Use MCP Memory for reusable knowledge. Use File Checkpoints for task-specific context.


Part 1: File-Based External Memory (Checkpoints)

When to Create File Checkpoints

  • Starting complex multi-step tasks (investigation, planning, implementation)
  • Every 30-60 minutes during long tasks
  • At key milestones
  • Before expected context compaction
  • After completing significant analysis phases

Checkpoint File Location

Files saved to: plans/reports/checkpoint-{timestamp}-{slug}.md

CHECKPOINT_CREATE Protocol

Create a checkpoint file with this structure:

# Memory Checkpoint: {Task Description}

> Created: {ISO timestamp}
> Task Type: {investigation|planning|bugfix|feature|docs}
> Phase: {current phase number/name}

## Task Context

{What you're working on and why}

## Key Findings

{Critical discoveries and insights - be specific with file paths and line numbers}

## Files Analyzed

| File              | Purpose     | Status   |
| ----------------- | ----------- | -------- |
| path/file.cs:line | description | ✅/🔄/⏳ |

## Progress

- [x] Completed items
- [ ] In-progress items
- [ ] Remaining items

## Important Context

{Information that must be preserved - decisions, assumptions, rationale}

## Next Steps

1. {Immediate next action}
2. {Following action}

## Recovery Instructions

{Exact steps to resume: which file to read, which line to continue from}

CHECKPOINT_RECOVER Protocol

When recovering from a checkpoint:

  1. Search for latest checkpoint: Glob("plans/reports/checkpoint-*.md")
  2. Read the checkpoint file
  3. Load any referenced analysis files
  4. Review Progress section
  5. Continue from documented Next Steps
  6. Create new checkpoint after resuming

Auto-Checkpoint (PreCompact Hook)

The system automatically creates checkpoints before context compaction. These auto-checkpoints are minimal - for better context preservation, create manual checkpoints using /checkpoint.


Part 2: MCP Memory Graph (Knowledge Persistence)


Memory Entity Types

Entity TypePurposeExamples
PatternRecurring code patternsCQRS, Validation, Repository
DecisionArchitectural/design decisionsWhy we chose X over Y
BugFixBug solutions for future referenceRace condition fixes
ServiceBoundaryService ownership and responsibilitiesGrowth owns Employees
SessionSummaryEnd-of-session progress snapshotsTask progress, next steps
DependencyCross-service dependenciesGrowth depends on Accounts
AntiPatternPatterns to avoidDon't call side effects in cmd

Memory Operations

Create New Entity

mcp__memory__create_entities([
    {
        name: 'EmployeeValidationPattern',
        entityType: 'Pattern',
        observations: [
            'Use project validation fluent API (see docs/project-reference/backend-patterns-reference.md)',
            'Chain with .And() and .AndAsync()',
            "Return validation result, don't throw",
            'Location: {Service}.Application/UseCaseCommands/'
        ]
    }
]);

Create Relationships

mcp__memory__create_relations([
    {
        from: 'ServiceA',
        to: 'ServiceB',
        relationType: 'depends_on'
    },
    {
        from: 'EmployeeEntity',
        to: 'UserEntity',
        relationType: 'syncs_from'
    }
]);

Add Observations

mcp__memory__add_observations([
    {
        entityName: 'EmployeeValidationPattern',
        contents: [
            'Also supports .AndNot() for negative validation',
            'Use .Of<ICqrsRequest>() for type conversion (see docs/project-reference/backend-patterns-reference.md)'
        ]
    }
]);

Search Knowledge

// Search by query
mcp__memory__search_nodes({ query: 'validation pattern' });

// Open specific entities
mcp__memory__open_nodes({
    names: ['EmployeeValidationPattern', 'ServiceAModule']
});

// Read entire graph
mcp__memory__read_graph();

Delete Outdated Knowledge

// Delete entities
mcp__memory__delete_entities({ entityNames: ['OutdatedPattern'] });

// Delete specific observations
mcp__memory__delete_observations([
    {
        entityName: 'EmployeeValidationPattern',
        observations: ['Outdated observation text']
    }
]);

// Delete relations
mcp__memory__delete_relations([
    {
        from: 'OldService',
        to: 'NewService',
        relationType: 'depends_on'
    }
]);

When to Save to Memory

Always Save

  1. Discovered Patterns: New code patterns not in documentation
  2. Bug Solutions: Complex bugs with non-obvious solutions
  3. Service Boundaries: Which service owns what
  4. Architectural Decisions: Why a particular approach was chosen
  5. Anti-Patterns: Mistakes to avoid

Save at Session End

// Session summary template
mcp__memory__create_entities([
    {
        name: `Session_${taskName}_${date}`,
        entityType: 'SessionSummary',
        observations: [
            `Task: ${taskDescription}`,
            `Completed: ${completedItems.join(', ')}`,
            `Remaining: ${remainingItems.join(', ')}`,
            `Key Files: ${keyFiles.join(', ')}`,
            `Discoveries: ${discoveries.join(', ')}`,
            `Next Steps: ${nextSteps.join(', ')}`
        ]
    }
]);

Memory Retrieval Patterns

Session Start Protocol

// 1. Search for related context
const results = mcp__memory__search_nodes({
    query: 'current feature or task keywords'
});

// 2. Load relevant entities
mcp__memory__open_nodes({
    names: results.entities.map(e => e.name)
});

// 3. Check for incomplete sessions
mcp__memory__search_nodes({ query: 'SessionSummary Remaining' });

Before Implementation

// Check for existing patterns
mcp__memory__search_nodes({ query: 'CQRS command pattern' });

// Check for anti-patterns
mcp__memory__search_nodes({ query: 'AntiPattern command' });

// Check for related decisions
mcp__memory__search_nodes({ query: 'Decision validation' });

After Bug Fix

// Save the fix
mcp__memory__create_entities([
    {
        name: `BugFix_${bugName}`,
        entityType: 'BugFix',
        observations: [
            `Symptom: ${symptomDescription}`,
            `Root Cause: ${rootCause}`,
            `Solution: ${solution}`,
            `Files: ${affectedFiles.join(', ')}`,
            `Prevention: ${preventionTip}`
        ]
    }
]);

Knowledge Graph Structure

┌─────────────────────────────────────────────────────────────┐
│                     Project Knowledge                       │
├─────────────────────────────────────────────────────────────┤
│  Services                                                   │
│  ├── ServiceA ──depends_on──> AccountsService               │
│  ├── ServiceB ──depends_on──> AccountsService               │
│  └── ServiceC ──depends_on──> AccountsService               │
│                                                             │
│  Patterns                                                   │
│  ├── CQRSCommandPattern                                     │
│  ├── CQRSQueryPattern                                       │
│  ├── EntityEventPattern                                     │
│  └── ValidationPattern                                      │
│                                                             │
│  Entities                                                   │
│  ├── Employee ──syncs_from──> User                          │
│  ├── Company ──syncs_from──> Organization                   │
│  └── LeaveRequest ──owned_by──> ServiceA                     │
│                                                             │
│  Sessions                                                   │
│  ├── Session_LeaveRequest_2025-01-15                        │
│  └── Session_EmployeeImport_2025-01-14                      │
└─────────────────────────────────────────────────────────────┘

Importance Scoring

When saving observations, prioritize:

ScoreCriteria
10Critical bug fixes, security issues
8-9Architectural decisions, service boundaries
6-7Code patterns, best practices
4-5Session summaries, progress notes
1-3Temporary notes, exploration results

Memory Maintenance

Weekly Cleanup

// Find old session summaries (> 30 days)
mcp__memory__search_nodes({ query: 'SessionSummary' });

// Delete outdated sessions
mcp__memory__delete_entities({
    entityNames: ['Session_OldTask_2024-12-01']
});

Consolidation

When multiple observations cover same topic:

// 1. Read existing entity
mcp__memory__open_nodes({ names: ['PatternName'] });

// 2. Delete fragmented observations
mcp__memory__delete_observations([
    {
        entityName: 'PatternName',
        observations: ['Fragment 1', 'Fragment 2']
    }
]);

// 3. Add consolidated observation
mcp__memory__add_observations([
    {
        entityName: 'PatternName',
        contents: ['Consolidated comprehensive observation']
    }
]);

Quick Reference

Create: mcp__memory__create_entities / mcp__memory__create_relations Read: mcp__memory__read_graph / mcp__memory__open_nodes / mcp__memory__search_nodes Update: mcp__memory__add_observations Delete: mcp__memory__delete_entities / mcp__memory__delete_observations / mcp__memory__delete_relations


Part 3: Integration with Workflows

Long-Running Task Memory Pattern

All long-running workflows should follow this pattern:

┌─────────────────────────────────────────────────────────┐
│ TASK START                                               │
│   └── Create initial checkpoint with task context        │
│   └── Initialize todo list                               │
│                                                          │
│ EVERY 20-30 OPERATIONS                                   │
│   └── Update checkpoint with progress                    │
│   └── Update todo list status                            │
│                                                          │
│ MILESTONE REACHED                                         │
│   └── Create detailed checkpoint                         │
│   └── Save key findings to MCP memory (if reusable)      │
│                                                          │
│ BEFORE COMPACTION (auto via PreCompact hook)             │
│   └── Auto-checkpoint created by system                  │
│                                                          │
│ AFTER COMPACTION / SESSION RESUME                        │
│   └── Read latest checkpoint                             │
│   └── Search MCP memory for relevant context             │
│   └── Continue from documented Next Steps                │
│                                                          │
│ TASK COMPLETE                                             │
│   └── Final checkpoint with summary                      │
│   └── Save reusable patterns to MCP memory               │
│   └── Clean up temporary checkpoints                     │
└─────────────────────────────────────────────────────────┘

Checkpoint Naming Convention

TypeFormatExample
Manual checkpointcheckpoint-{YYMMDD}-{HHMM}-{slug}.mdcheckpoint-250106-1430-user-auth.md
Auto checkpointmemory-checkpoint-{timestamp}.mdmemory-checkpoint-20250106-143000.md
Analysis notes{type}-{date}-{slug}.mdanalysis-250106-payment-flow.md
Task notes.ai/workspace/analysis/{slug}.analysis.mdUsed by feature-implementation

Related Commands & Skills

Command/SkillPurpose
/checkpointCreate manual memory checkpoint
/contextLoad project context
/compactManually trigger context compaction
/watzupGenerate progress summary
feature-implementationUses task analysis notes pattern
debug-investigateUses investigation logs
feature-investigationUses analysis report pattern

Memory Decision Matrix

Context TypeStorageWhy
Task progressFile checkpointSpecific to current task
Code patternsMCP memoryReusable across sessions
Bug solutionsMCP memoryHelps future debugging
Service boundariesMCP memoryArchitectural knowledge
Investigation findingsFile checkpointTask-specific analysis
Architectural decisionsMCP memoryLong-term knowledge

Related

  • learn
  • context-optimization

Closing Reminders

  • MANDATORY IMPORTANT MUST ATTENTION break work into small todo tasks using TaskCreate BEFORE starting
  • MANDATORY IMPORTANT MUST ATTENTION search codebase for 3+ similar patterns before creating new code
  • MANDATORY IMPORTANT MUST ATTENTION cite file:line evidence for every claim (confidence >80% to act)
  • MANDATORY IMPORTANT MUST ATTENTION add a final review todo task to verify work quality
  • MUST ATTENTION apply critical thinking — every claim needs traced proof, confidence >80% to act. Anti-hallucination: never present guess as fact.
  • MUST ATTENTION apply AI mistake prevention — holistic-first debugging, fix at responsible layer, surface ambiguity before coding, re-read files after compaction.

[TASK-PLANNING] Before acting, analyze task scope and systematically break it into small todo tasks and sub-tasks using TaskCreate.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Local Agent

81.55%
按下载量换算404

安全审计

Socket

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills