supermemory

$npx mdskill add seaworld008/Commonly-used-high-value-skills/supermemory

Manage durable memory, preferences, contradictions, and project state across sessions.

  • Captures user preferences and project context for cross-session recall.
  • Depends on local file storage and vector retrieval for associative memory.
  • Detects contradictions by comparing new input against stored memory.
  • Delivers results by updating MEMORY.md and providing context on request.

SKILL.md

.github/skills/supermemoryView on GitHub ↗
---
name: supermemory
description: 'Use when users need durable memory management, preference capture, contradiction detection, project-state tracking, or retrieval of prior context using Supermemory-style workflows.'
zh_description: "用于长期记忆管理、偏好捕获、矛盾检测和项目状态跟踪。"
version: "1.0.0"
author: "seaworld008"
source: "community"
source_url: "https://github.com/supermemoryai/supermemory"
license: "MIT"
tags: '["productivity", "supermemory"]'
created_at: "2026-03-27"
updated_at: "2026-06-29"
quality: 3
complexity: "intermediate"
---

# Supermemory

## 触发条件
1. 用户提到特定的工作偏好、习惯或要求(如:代码风格、命名习惯、使用的工具版本)。
2. 在跨会话的任务中,需要回忆起之前的关键决策或执行细节。
3. 发现用户当前的要求与之前的记录存在潜在冲突或不一致。
4. 在开始新项目前,需要同步该用户/项目的上下文信息。
5. 当用户的需求在多个阶段演进,需要维护一个持续更新的状态表。

## 核心能力

### 1. 混合记忆架构 (Hybrid Memory)
- **事实记忆 (Fact Memory)**:存储不可变的硬事实(如项目路径、数据库地址、API 接口定义)。
- **偏好记忆 (Preference Memory)**:存储用户的个人风格(如:Prefer TypeScript over JavaScript, tabs size: 2)。
- **状态记忆 (State Memory)**:存储当前正在进行的任务进度、阻碍点(Blockers)和待办项。
- **关联记忆 (Associative Memory)**:通过向量检索寻找语义相关的历史对话片段。

### 2. 偏好自动捕获 (Preference Auto-capture)
- 实时分析对话流,自动提取用户的隐含偏好(例如:“我不喜欢用 class 组件,Hooks 更好”)。
- 将提取出的偏好持久化到 `MEMORY.md` 或相关的元数据文件中。
- 偏好打标:根据提及频率和语境(Must/Should/Nice-to-have)对偏好进行分级。

### 3. 矛盾检测与解决 (Contradiction Detection)
- 每次写入新记忆前,自动与现有记忆库进行比对。
- **冲突报警**:当用户给出与之前记录相反的指令时(如从“使用 Python 3.8”变为“使用 Python 3.12”),礼貌地询问用户是否需要更新记忆。
- **版本化记忆**:保留记忆的变更历史,支持追溯决策背景。

### 4. 项目上下文持久化 (Persistence)
- 自动化生成和更新 `MEMORY.md` 或 `CONTEXT.md` 文件。
- 记录关键路径上的“重大决策”(Decision Log)。
- 追踪“已解决的问题”与“遗留的坑”。

### 5. 记忆健康检查 (Health Check)
- 定期清理过时、冗余或错误的事实。
- 压缩长期的、重复的记忆片段,提炼核心结论。
- 检测记忆碎片化问题,确保存储结构清晰。

### 6. 检索优化策略 (Retrieval Strategy)
- **多层搜索**:先进行文件名搜索(关键词),再进行内容全文搜索(Grep),最后进行语义检索(Vector Search)。
- **时间加权**:更倾向于检索最近的、更新的上下文。
- **语境感知**:根据当前所在的文件夹或 Git 分支,自动调整检索的优先级。

### 7. 跨会话上下文保持 (Cross-session Persistence)
- 模拟“长期记忆”,确保在新开会话时,能够迅速通过加载 `MEMORY.md` 重拾上下文。
- 无缝衔接:即便会话中断,下一次进入时也能立即知道“我们上次停在哪里”。

## 常用命令/模板

### 记忆更新指令集
- `memory_save(topic, content)`:将一段关键内容存入长期记忆。
- `memory_search(query)`:在历史记录和记忆文件中搜索相关信息。
- `memory_sync()`:同步当前项目的 `README.md`, `.cursorrules` 和 `MEMORY.md` 中的关键点。

### MEMORY.md 标准模板
```markdown
# Project & User Memory

## 1. 核心偏好 (Core Preferences)
- [P-001] 代码风格: 函数式编程优先,禁止使用 `any` 类型。
- [P-002] 交付物: 文档必须包含中文说明。

## 2. 关键事实 (Key Facts)
- [F-001] 项目环境: Node.js v18+, React v18, Tailwind CSS.
- [F-002] 关键路径: 核心逻辑位于 `src/core/engine.ts`。

## 3. 任务状态追踪 (State Tracking)
- [S-001] 已完成: 基础架构搭建, API 接口定义。
- [S-002] 进行中: 用户认证模块开发 (目前卡在 OAuth2 回调)。
- [S-003] 待处理: 性能优化, 部署脚本编写。

## 4. 矛盾记录 (Resolved Conflicts)
- [C-001] 2026-03-20: 从 MongoDB 切换到 PostgreSQL (原因: 需要事务支持)。
```

## 边界与限制
1. **隐私与安全**:严禁在记忆中存储敏感数据(如:明文密码、API Keys、个人隐私信息)。
2. **存储限制**:记忆文件不宜过大,过大的文件会影响读取速度,建议定期进行精简和归档。
3. **主观性风险**:记忆捕获基于 AI 的理解,可能存在偏差,用户应拥有最高修改权(User-in-the-loop)。
4. **过时信息**:对于高速迭代的项目,记忆可能在数周后变得陈旧,必须依赖频繁的“心跳同步”保持准确性。

## 最佳实践准则
- **原子性存储**:一条记忆只记录一个核心点。
- **显式确认**:在重大偏好变更前,通过对话引导用户确认。
- **结构化优先**:尽量使用 Markdown 列表和表格存储,而非大段描述性文字。
- **定期重构**:每完成一个重大里程碑,重构一次 `MEMORY.md`。

---
*Generated by Supermemory AI*

More from seaworld008/Commonly-used-high-value-skills

SkillDescription
agent-hubMulti-agent collaboration plugin that spawns N parallel subagents competing on the same task via git worktree isolation. Agents work independently, results are evaluated by metric or LLM judge, and the best branch is merged. Use when: user wants multiple approaches tried in parallel — code optimization, content variation, research exploration, or any task that benefits from parallel competition. Requires: a git repo.
andrej-karpathy-skillsKarpathy-inspired coding discipline for AI agents: think before coding, keep changes simple, edit surgically, and define verifiable success criteria before implementation.
arenaSpecialist orchestrating codex exec / Antigravity CLI through dual paradigms — COMPETE (multi-variant comparison, select best) and COLLABORATE (decompose tasks across engines, integrate). Supports Solo/Team/Quick execution modes.
azure-kubernetesPlan, create, and configure production-ready Azure Kubernetes Service (AKS) clusters. Covers Day-0 checklist, SKU selection (Automatic vs Standard), networking options (private API server, Azure CNI Overlay, egress configuration), security, and operations (autoscaling, upgrade strategy, cost analysis). WHEN: create AKS environment, provision AKS, enable AKS observability, design AKS networking, choose AKS SKU, secure AKS, optimize AKS, AKS spot nodes, AKS cluster-autoscaler, rightsize AKS pod, pod rightsizing, over-provisioned AKS pod, pod resource requests and limits, Vertical Pod Autoscaler, VPA recommendations.
azure-kubernetes-automatic-readinessAssess Kubernetes workloads and cluster configuration for AKS Automatic compatibility. Identifies incompatibilities, generates fixes, and guides migration from AKS Standard to AKS Automatic. WHEN: migrate to AKS Automatic, check AKS Automatic readiness, validate manifests for Automatic, assess cluster for Automatic compatibility, fix deployment for Automatic compatibility, identify AKS Automatic migration blockers, is my cluster ready for AKS Automatic.
cc-devops-skillsSRE, DevOps, Kubernetes, CI/CD, PromQL, Terraform, Docker, and incident operations playbook for building reliable delivery and operations workflows.
chatgpt-appsBuild, scaffold, refactor, and troubleshoot ChatGPT Apps SDK applications that combine an MCP server and widget UI. Use when Codex needs to design tools, register UI resources, wire the MCP Apps bridge or ChatGPT compatibility APIs, apply Apps SDK metadata or CSP or domain settings, or produce a docs-aligned project scaffold. Prefer a docs-first workflow by invoking the openai-docs skill or OpenAI developer docs MCP tools before generating code.
clayAI 3D model generation agent. Generates text-to-3D and image-to-3D code (Python/JS/OpenSCAD) using Meshy, Tripo, Hunyuan3D, Rodin, Sloyd, and Stability APIs. Handles game pipeline integration, LOD, retopology, UV, and QC validation.
codeql-security-scanner用于通过 CodeQL 执行语义代码扫描、安全查询、自定义规则、SARIF 报告和 GitHub Code Scanning 集成。
complyRegulatory compliance and audit agent. Maps business regulatory requirements (SOC2/PCI-DSS/HIPAA/ISO 27001), checks control implementations, designs audit trails, and implements Policy as Code. Use when compliance auditing is needed.