重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
context-manager by jackspace/claudeskillz
npx skills add https://github.com/jackspace/claudeskillz --skill context-manager永久性外部记忆系统,用于弥补 SDAM(无情景记忆)的不足。保存和回忆:
对于 SDAM 用户:完整的外部记忆 - 永不忘记决策或上下文。对于 ADHD 用户:消除决策疲劳 - 自动回忆过去的决策。对于时间感知障碍用户:所有记忆都带有明确时间戳的时间锚定。
当用户说"记住 [某事]"时:
步骤 1:分类记忆类型
DECISION: "记住我们正在使用 PostgreSQL"
BLOCKER: "记住我还不能访问 API"
CONTEXT: "记住这是用于 BOOSTBOX 项目"
PREFERENCE: "记住我更喜欢函数式组件"
PROCEDURE: "记住如何部署:npm run build 然后 rsync"
NOTE: "记住这个功能完成后更新文档"
步骤 2:提取元数据
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
步骤 3:读取当前索引
# 跨平台:使用 $HOME (Linux/macOS) 或 %USERPROFILE% (Windows)
cat ~/.claude-memories/index.json
# Windows PowerShell 替代方案:
# Get-Content "$env:USERPROFILE\.claude-memories\index.json"
步骤 4:添加到索引
{
"version": "1.0.0",
"created": "2025-10-17T17:45:00Z",
"last_updated": "{current_timestamp}",
"total_memories": N + 1,
"memories_by_type": {
"DECISION": X + 1,
...
},
"memories": [
{
"id": "{uuid}",
"type": "DECISION",
"content": "使用 PostgreSQL 作为主数据库",
"timestamp": "{current_timestamp}",
"tags": ["database", "postgresql", "backend"],
"project": "boostbox",
"context": {
"file": "{current_file_if_relevant}",
"conversation_id": "{if_available}"
}
},
...existing memories
],
"tags_index": {
"database": ["{uuid1}", "{uuid2}"],
"postgresql": ["{uuid}"]
},
"project_index": {
"boostbox": ["{uuid1}", "{uuid2}"],
"toolhub": ["{uuid3}"]
}
}
步骤 5:创建详细记忆文件
# 保存到特定类别的目录
# Linux/macOS: ~/.claude-memories/decisions/{uuid}.md
# Windows: %USERPROFILE%\.claude-memories\decisions\{uuid}.md
~/.claude-memories/decisions/{uuid}.md
# 决策:使用 PostgreSQL
**日期**:2025-10-17T17:45:00Z (2 小时前)
**项目**:BOOSTBOX
**标签**:database, postgresql, backend
## 决策
使用 PostgreSQL 作为主数据库,而不是 MongoDB。
## 理由
{如果用户提供或从对话中推断}
## 上下文
{周围的对话上下文}
## 相关记忆
{通过标签/项目匹配找到的任何相关记忆}
## 最后更新
2025-10-17T17:45:00Z
步骤 6:向用户确认
✅ 已记住:使用 PostgreSQL 作为主数据库
📁 保存到:decisions/{uuid}.md
🏷️ 标签:database, postgresql, backend
📊 总记忆数:{N+1}
当用户问"关于 [主题] 我们决定了什么"时:
步骤 1:解析查询
步骤 2:搜索索引
// 优先级顺序:
1. 请求项目中的精确标签匹配
2. 任何项目中的精确标签匹配
3. 请求项目中的部分内容匹配
4. 任何项目中的部分内容匹配
// 排序依据:
1. 相关性(精确匹配 > 部分匹配)
2. 时效性(新的 > 旧的)
3. 类型优先级(BLOCKER > DECISION > 其他)
步骤 3:加载详细记忆文件
# 对于每个匹配的 UUID
cat ~/.claude-memories/decisions/{uuid}.md
# Windows PowerShell:
# Get-Content "$env:USERPROFILE\.claude-memories\decisions\{uuid}.md"
步骤 4:呈现结果
🔍 找到 3 条关于 "database" 的记忆:
1. 决策:使用 PostgreSQL (2 天前)
📁 项目:BOOSTBOX
💡 使用 PostgreSQL 作为主数据库,而不是 MongoDB
🔗 decisions/abc-123.md
2. 决策:数据库模式设计 (5 天前)
📁 项目:BOOSTBOX
💡 用户表使用 UUID 主键
🔗 decisions/def-456.md
3. 偏好:相比原始 SQL 更偏好迁移 (1 周前)
📁 所有项目
💡 始终使用迁移文件,绝不直接进行 SQL 模式更改
🔗 preferences/ghi-789.md
您想查看其中任何一条的详细信息吗?
自动检测阻碍:
主动保存:
🚧 检测到阻碍:API 凭据不可用
保存为 BLOCKER 以进行跟踪。
当此问题解决时,请说"阻碍已解决:[简要描述]"
阻碍解决:
用户:"阻碍已解决:获得了 API 凭据"
✅ 阻碍已解决:API 凭据不可用
📝 已使用解决时间戳更新记忆
⏱️ 受阻时长:2 天 4 小时
支持丰富的查询:
搜索语法:
基本:"搜索 [主题]"
类型筛选:"搜索关于 [主题] 的决策"
项目筛选:"搜索 boostbox [主题]"
时间筛选:"搜索 本周|本月|今天 [主题]"
组合:"搜索 本周 boostbox 关于 database 的决策"
何时保存:
结构:
# 决策:{标题}
## 我们决定了什么
{决策内容}
## 原因
{理由 - 从对话中推断}
## 考虑的替代方案
{如果讨论过}
## 影响
{受影响的领域}
何时保存:
结构:
# 阻碍:{标题}
## 问题
{阻碍内容}
## 影响
{无法完成的工作}
## 尝试过的变通方法
{如果有}
## 状态
活跃 | 已解决 | 已绕过
## 解决方案(解决时)
{如何修复的}
{解决时间戳}
何时保存:
何时保存:
何时保存:
结构:
# 流程:{标题}
## 何时使用
{触发条件}
## 步骤
1. {步骤 1}
2. {步骤 2}
3. {步骤 3}
## 预期结果
{成功的样子}
## 故障排除
{常见问题}
何时保存:
始终提供:
时间工具:
function relativeTime(timestamp) {
const now = Date.now();
const then = new Date(timestamp).getTime();
const diff = now - then;
const minutes = Math.floor(diff / 60000);
const hours = Math.floor(diff / 3600000);
const days = Math.floor(diff / 86400000);
if (minutes < 60) return `${minutes} 分钟前`;
if (hours < 24) return `${hours} 小时前`;
if (days < 7) return `${days} 天前`;
if (days < 30) return `${Math.floor(days/7)} 周前`;
return `${Math.floor(days/30)} 月前`;
}
~/.claude-memories/index.json (Linux/macOS) 或 %USERPROFILE%\.claude-memories\index.json (Windows):
{
"version": "1.0.0",
"created": "ISO8601",
"last_updated": "ISO8601",
"total_memories": 0,
"memories_by_type": {
"DECISION": 0,
"BLOCKER": 0,
"CONTEXT": 0,
"PREFERENCE": 0,
"PROCEDURE": 0,
"NOTE": 0
},
"memories": [
{
"id": "uuid",
"type": "DECISION|BLOCKER|CONTEXT|PREFERENCE|PROCEDURE|NOTE",
"content": "简要摘要",
"timestamp": "ISO8601",
"tags": ["tag1", "tag2"],
"project": "项目名称",
"status": "active|resolved|archived",
"context": {
"file": "可选文件路径",
"line": "可选行号"
}
}
],
"tags_index": {
"标签名称": ["uuid1", "uuid2"]
},
"project_index": {
"项目名称": ["uuid1", "uuid2"]
},
"session_index": {
"会话ID": ["uuid1", "uuid2"]
}
}
~/.claude-memories/ (Linux/macOS) 或 %USERPROFILE%\.claude-memories\ (Windows)
├── index.json # 主索引
├── decisions/ # 架构决策
│ ├── {uuid1}.md
│ └── {uuid2}.md
├── blockers/ # 活跃/已解决的阻碍
│ ├── {uuid3}.md
│ └── {uuid4}.md
├── context/ # 项目上下文
│ ├── {uuid5}.md
│ └── {uuid6}.md
├── preferences/ # 用户偏好
│ ├── {uuid7}.md
│ └── {uuid8}.md
├── procedures/ # 操作流程
│ ├── {uuid9}.md
│ └── {uuid10}.md
├── notes/ # 一般笔记
│ ├── {uuid11}.md
│ └── {uuid12}.md
├── sessions/ # 会话摘要
│ ├── 2025-10-17.md
│ └── 2025-10-16.md
└── backups/ # 每日备份
├── index-2025-10-17.json
└── index-2025-10-16.json
提供用于会话恢复的记忆:
搜索记忆中的:
回忆偏好:
加载流程:
在这些情况下自动保存记忆:
在架构讨论期间:
用户:"让我们在前端使用 React"
→ 自动保存为 决策:在前端使用 React
遇到阻碍时:
用户:"无法连接到 API"
→ 自动保存为 阻碍:API 连接失败
建立偏好时:
用户:"相比 JavaScript 我更喜欢 TypeScript"
→ 自动保存为 偏好:偏好 TypeScript
创建流程时:
用户:"要部署:运行 npm build 然后复制到服务器"
→ 自动保存为 流程:部署过程
始终确认:
💾 已保存为 决策:在前端使用 React
(在 30 秒内说"撤销"以取消)
每日备份:
# 每 24 小时,创建备份
# Linux/macOS:
cp ~/.claude-memories/index.json \
~/.claude-memories/backups/index-$(date +%Y-%m-%d).json
# Windows PowerShell:
# Copy-Item "$env:USERPROFILE\.claude-memories\index.json" `
# "$env:USERPROFILE\.claude-memories\backups\index-$(Get-Date -Format 'yyyy-MM-dd').json"
# 保留最近 30 天 (Linux/macOS):
find ~/.claude-memories/backups/ -name "index-*.json" -mtime +30 -delete
# Windows PowerShell:
# Get-ChildItem "$env:USERPROFILE\.claude-memories\backups\index-*.json" |
# Where-Object {$_.LastWriteTime -lt (Get-Date).AddDays(-30)} | Remove-Item
损坏恢复:
# 如果 index.json 损坏,从备份恢复
# Linux/macOS:
cp ~/.claude-memories/backups/index-$(date -d yesterday +%Y-%m-%d).json \
~/.claude-memories/index.json
# Windows PowerShell:
# Copy-Item "$env:USERPROFILE\.claude-memories\backups\index-$(Get-Date (Get-Date).AddDays(-1) -Format 'yyyy-MM-dd').json" `
# "$env:USERPROFILE\.claude-memories\index.json"
| 用户说 | 操作 |
|---|---|
| "记住我们正在使用 PostgreSQL" | 保存为 决策 |
| "关于数据库我们决定了什么" | 搜索关于 "database" 的 决策 |
| "显示所有阻碍" | 列出活跃的 阻碍 |
| "有任何阻碍吗?" | 快速检查阻碍 |
| "记住我更喜欢函数式组件" | 保存为 偏好 |
| "搜索关于身份验证的记忆" | 全文搜索 |
| "阻碍已解决:获得了 API 密钥" | 将阻碍标记为已解决 |
~/.claude-memories/index.json (Linux/macOS) 或 %USERPROFILE%\.claude-memories\index.json (Windows)~/.claude-memories/decisions/{uuid}.md 或 %USERPROFILE%\.claude-memories\decisions\{uuid}.md~/.claude-memories/blockers/{uuid}.md 或 %USERPROFILE%\.claude-memories\blockers\{uuid}.md~/.claude-memories/backups/ 或 %USERPROFILE%\.claude-memories\backups\✅ 用户永远不需要记住决策 ✅ "我们决定了什么?"总是可以回答 ✅ 阻碍被自动跟踪 ✅ 所有上下文都有时间锚定 ✅ 记忆搜索在 <1 秒内返回相关结果 ✅ 零依赖用户的生物记忆
每周安装数
61
仓库
GitHub 星标数
12
首次出现
2026年1月24日
安全审计
安装于
opencode54
gemini-cli52
codex50
cursor50
github-copilot48
kimi-cli45
Permanent external memory system that compensates for SDAM (no episodic memory). Saves and recalls:
For SDAM users : Complete external memory - never forget decisions or context. For ADHD users : Eliminates decision fatigue - past choices automatically recalled. For dyschronometria : All memories time-anchored with explicit timestamps.
When user says "remember [something]":
Step 1 : Classify memory type
DECISION: "remember we're using PostgreSQL"
BLOCKER: "remember I can't access the API yet"
CONTEXT: "remember this is for BOOSTBOX project"
PREFERENCE: "remember I prefer functional components"
PROCEDURE: "remember how to deploy: npm run build then rsync"
NOTE: "remember to update docs after this feature"
Step 2 : Extract metadata
Step 3 : Read current index
# Cross-platform: Use $HOME (Linux/macOS) or %USERPROFILE% (Windows)
cat ~/.claude-memories/index.json
# Windows PowerShell alternative:
# Get-Content "$env:USERPROFILE\.claude-memories\index.json"
Step 4 : Add to index
{
"version": "1.0.0",
"created": "2025-10-17T17:45:00Z",
"last_updated": "{current_timestamp}",
"total_memories": N + 1,
"memories_by_type": {
"DECISION": X + 1,
...
},
"memories": [
{
"id": "{uuid}",
"type": "DECISION",
"content": "Using PostgreSQL as primary database",
"timestamp": "{current_timestamp}",
"tags": ["database", "postgresql", "backend"],
"project": "boostbox",
"context": {
"file": "{current_file_if_relevant}",
"conversation_id": "{if_available}"
}
},
...existing memories
],
"tags_index": {
"database": ["{uuid1}", "{uuid2}"],
"postgresql": ["{uuid}"]
},
"project_index": {
"boostbox": ["{uuid1}", "{uuid2}"],
"toolhub": ["{uuid3}"]
}
}
Step 5 : Create detailed memory file
# Save to category-specific directory
# Linux/macOS: ~/.claude-memories/decisions/{uuid}.md
# Windows: %USERPROFILE%\.claude-memories\decisions\{uuid}.md
~/.claude-memories/decisions/{uuid}.md
# DECISION: Using PostgreSQL
**Date**: 2025-10-17T17:45:00Z (2 hours ago)
**Project**: BOOSTBOX
**Tags**: database, postgresql, backend
## Decision
Using PostgreSQL as primary database instead of MongoDB.
## Rationale
{if provided by user or inferred from conversation}
## Context
{surrounding conversation context}
## Related Memories
{if any related memories found by tag/project match}
## Last Updated
2025-10-17T17:45:00Z
Step 6 : Confirm to user
✅ Remembered: Using PostgreSQL as primary database
📁 Saved to: decisions/{uuid}.md
🏷️ Tags: database, postgresql, backend
📊 Total memories: {N+1}
When user asks "what did we decide about [topic]":
Step 1 : Parse query
Step 2 : Search index
// Priority order:
1. Exact tag match in requested project
2. Exact tag match in any project
3. Partial content match in requested project
4. Partial content match in any project
// Sort by:
1. Relevance (exact match > partial)
2. Recency (newer > older)
3. Type priority (BLOCKER > DECISION > others)
Step 3 : Load detailed memory files
# For each matching UUID
cat ~/.claude-memories/decisions/{uuid}.md
# Windows PowerShell:
# Get-Content "$env:USERPROFILE\.claude-memories\decisions\{uuid}.md"
Step 4 : Present results
🔍 Found 3 memories about "database":
1. DECISION: Using PostgreSQL (2 days ago)
📁 Project: BOOSTBOX
💡 Using PostgreSQL as primary database instead of MongoDB
🔗 decisions/abc-123.md
2. DECISION: Database schema design (5 days ago)
📁 Project: BOOSTBOX
💡 User table with UUID primary keys
🔗 decisions/def-456.md
3. PREFERENCE: Prefer migrations over raw SQL (1 week ago)
📁 All projects
💡 Always use migration files, never direct SQL schema changes
🔗 preferences/ghi-789.md
Would you like details on any of these?
Auto-detect blockers :
Proactive save :
🚧 Detected blocker: API credentials not available
Saving as BLOCKER for tracking.
When this is resolved, say "blocker resolved: [brief description]"
Blocker resolution :
User: "blocker resolved: got API credentials"
✅ Blocker resolved: API credentials not available
📝 Updated memory with resolution timestamp
⏱️ Blocked for: 2 days 4 hours
Support rich queries:
Search syntax :
Basic: "search [topic]"
Type filter: "search decisions about [topic]"
Project filter: "search boostbox [topic]"
Time filter: "search [topic] this week|month|today"
Combined: "search boostbox decisions about database this week"
When to save :
Structure :
# DECISION: {title}
## What we decided
{the decision}
## Why
{rationale - infer from conversation}
## Alternatives considered
{if discussed}
## Impact
{affected areas}
When to save :
Structure :
# BLOCKER: {title}
## Issue
{what's blocking}
## Impact
{what can't be done}
## Workarounds tried
{if any}
## Status
Active | Resolved | Bypassed
## Resolution (when resolved)
{how it was fixed}
{timestamp of resolution}
When to save :
When to save :
When to save :
Structure :
# PROCEDURE: {title}
## When to use
{triggering condition}
## Steps
1. {step 1}
2. {step 2}
3. {step 3}
## Expected outcome
{what success looks like}
## Troubleshooting
{common issues}
When to save :
Always provide :
Time utilities :
function relativeTime(timestamp) {
const now = Date.now();
const then = new Date(timestamp).getTime();
const diff = now - then;
const minutes = Math.floor(diff / 60000);
const hours = Math.floor(diff / 3600000);
const days = Math.floor(diff / 86400000);
if (minutes < 60) return `${minutes} minutes ago`;
if (hours < 24) return `${hours} hours ago`;
if (days < 7) return `${days} days ago`;
if (days < 30) return `${Math.floor(days/7)} weeks ago`;
return `${Math.floor(days/30)} months ago`;
}
~/.claude-memories/index.json (Linux/macOS) or %USERPROFILE%\.claude-memories\index.json (Windows):
{
"version": "1.0.0",
"created": "ISO8601",
"last_updated": "ISO8601",
"total_memories": 0,
"memories_by_type": {
"DECISION": 0,
"BLOCKER": 0,
"CONTEXT": 0,
"PREFERENCE": 0,
"PROCEDURE": 0,
"NOTE": 0
},
"memories": [
{
"id": "uuid",
"type": "DECISION|BLOCKER|CONTEXT|PREFERENCE|PROCEDURE|NOTE",
"content": "brief summary",
"timestamp": "ISO8601",
"tags": ["tag1", "tag2"],
"project": "project-name",
"status": "active|resolved|archived",
"context": {
"file": "optional-file-path",
"line": "optional-line-number"
}
}
],
"tags_index": {
"tag-name": ["uuid1", "uuid2"]
},
"project_index": {
"project-name": ["uuid1", "uuid2"]
},
"session_index": {
"session-id": ["uuid1", "uuid2"]
}
}
~/.claude-memories/ (Linux/macOS) or %USERPROFILE%\.claude-memories\ (Windows)
├── index.json # Master index
├── decisions/ # Architecture decisions
│ ├── {uuid1}.md
│ └── {uuid2}.md
├── blockers/ # Active/resolved blockers
│ ├── {uuid3}.md
│ └── {uuid4}.md
├── context/ # Project context
│ ├── {uuid5}.md
│ └── {uuid6}.md
├── preferences/ # User preferences
│ ├── {uuid7}.md
│ └── {uuid8}.md
├── procedures/ # How-to procedures
│ ├── {uuid9}.md
│ └── {uuid10}.md
├── notes/ # General notes
│ ├── {uuid11}.md
│ └── {uuid12}.md
├── sessions/ # Session summaries
│ ├── 2025-10-17.md
│ └── 2025-10-16.md
└── backups/ # Daily backups
├── index-2025-10-17.json
└── index-2025-10-16.json
Provides memories for session restoration:
Searches memories for:
Recalls preferences:
Loads procedures:
Auto-save memories in these situations:
During architecture discussions :
User: "Let's use React for the frontend"
→ Auto-save as DECISION: Using React for frontend
When encountering blockers :
User: "Can't connect to the API"
→ Auto-save as BLOCKER: API connection failing
When establishing preferences :
User: "I prefer TypeScript over JavaScript"
→ Auto-save as PREFERENCE: Prefer TypeScript
When creating procedures :
User: "To deploy: run npm build then copy to server"
→ Auto-save as PROCEDURE: Deployment process
Always confirm :
💾 Saved as DECISION: Using React for frontend
(say "undo" within 30 seconds to cancel)
Daily backups :
# Every 24 hours, create backup
# Linux/macOS:
cp ~/.claude-memories/index.json \
~/.claude-memories/backups/index-$(date +%Y-%m-%d).json
# Windows PowerShell:
# Copy-Item "$env:USERPROFILE\.claude-memories\index.json" `
# "$env:USERPROFILE\.claude-memories\backups\index-$(Get-Date -Format 'yyyy-MM-dd').json"
# Keep last 30 days (Linux/macOS):
find ~/.claude-memories/backups/ -name "index-*.json" -mtime +30 -delete
# Windows PowerShell:
# Get-ChildItem "$env:USERPROFILE\.claude-memories\backups\index-*.json" |
# Where-Object {$_.LastWriteTime -lt (Get-Date).AddDays(-30)} | Remove-Item
Corruption recovery :
# If index.json corrupted, restore from backup
# Linux/macOS:
cp ~/.claude-memories/backups/index-$(date -d yesterday +%Y-%m-%d).json \
~/.claude-memories/index.json
# Windows PowerShell:
# Copy-Item "$env:USERPROFILE\.claude-memories\backups\index-$(Get-Date (Get-Date).AddDays(-1) -Format 'yyyy-MM-dd').json" `
# "$env:USERPROFILE\.claude-memories\index.json"
| User Says | Action |
|---|---|
| "remember we're using PostgreSQL" | Save as DECISION |
| "what did we decide about the database" | Search DECISIONs for "database" |
| "show all blockers" | List active BLOCKERs |
| "any blockers?" | Quick blocker check |
| "remember I prefer functional components" | Save as PREFERENCE |
| "search memories for authentication" | Full-text search |
| "blocker resolved: got API key" | Mark blocker as resolved |
~/.claude-memories/index.json (Linux/macOS) or %USERPROFILE%\.claude-memories\index.json (Windows)~/.claude-memories/decisions/{uuid}.md or %USERPROFILE%\.claude-memories\decisions\{uuid}.md~/.claude-memories/blockers/{uuid}.md or %USERPROFILE%\.claude-memories\blockers\{uuid}.md~/.claude-memories/backups/ or %USERPROFILE%\.claude-memories\backups\✅ User never has to remember decisions ✅ "What did we decide?" is always answerable ✅ Blockers are tracked automatically ✅ All context is time-anchored ✅ Memory search returns relevant results in <1 second ✅ Zero reliance on user's biological memory
Weekly Installs
61
Repository
GitHub Stars
12
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode54
gemini-cli52
codex50
cursor50
github-copilot48
kimi-cli45
头脑风暴技能:AI协作设计流程,将创意转化为完整规范与实施计划
99,100 周安装