SuperAPI AI Directory

experience-manager

General & other

View repository

Updated 10-15 22:32

About this skill

Experience Manager - Experience Management Skill

Prerequisites

Environment Detection

PROJECT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo "unknown")
mkdir -p memory/artifacts/experience-manager memory/retrospectives

Invocation Methods

Method 1: Artifact Passing(Recommended)

  • Detect artifact:memory/artifacts/*/experience-*.json

Method 2: Direct User Invocation

  • Use /experience-manager command

Detailed Description: Refer to detailed-guide.md


Overview

experience-manager is an independent knowledge management skill, responsible for project experience knowledgeaccumulation, retrieval, retrospective, reflection, achieving a knowledge loop, helping AI avoid repeating mistakes and continuously improve.

Core Capabilities:

  1. Experience Accumulation: After task completion, synchronously accumulate at four levels
  2. Experience Retrieval: Before task start, intelligently retrieve historical experience
  3. Experience Retrospective: At milestone completion, keep what works, change what doesn't
  4. Experience Reflection: Verify effectiveness, extract wisdom
  5. Error Prevention: Detect risks, provide prevention suggestions
  6. Effect Tracking: Record application effects, continuously optimize

Key Value:

  • Avoid repeating mistakes, quickly reuse successful patterns
  • Continuously accumulate knowledge assets, form a self-evolving loop

Core Principles

Four-Level Accumulation Mechanism

Level File Dimension Priority Purpose
Rule Layer CLAUDE.md What to do Highest Project conventions, strong constraints
Strategy Layer AGENT.md How to do it High AI execution strategy, decision rules
Knowledge Layer MEMORY.md What was learned Medium Technical knowledge, experience summary
History Layer MCP Memory What happened in the past Low Complete history, intelligent retrieval

Retrieval Priority: Rule Layer > Strategy Layer > Knowledge Layer > History Layer

Conflict Handling: Higher priority prevails.

Continuous Improvement Principles

  • Crown the good: Successful experiences upgraded to rules/strategies
  • Correct the bad: Failed lessons update the knowledge base
  • Dynamic Update: Outdated experiences marked and updated in time

Core Capabilities

Capability 1: Experience Accumulation (Save)

Trigger Timing: After task completion, invoked by goal-oriented

Execution Steps:

  1. Receive request artifact (experience-save-request.json)
  2. Generate retrospective report (memory/retrospectives/{task-id}.md)
  3. Four-level synchronous accumulation (CLAUDE.md, AGENT.md, MEMORY.md, MCP Memory)
  4. Create result artifact (save-result-{timestamp}.json)

Example:

// 输入
{
  "action": "save",
  "task_id": "2026-03-24_task-keywords",
  "lessons_learned": ["经验1", "经验2"],
  "errors_fixed": [{"error": "...", "fix": "..."}]
}

// 输出:四层级同步更新 + 结果工件

Capability 2: Experience Retrieval (Retrieve)

Trigger Timing: Before task start, invoked by goal-oriented, pilot

Execution Steps:

  1. Receive request artifact (experience-request.json)
  2. Four-tier parallel retrieval (keyword matching + semantic retrieval)
  3. Sort by priority and deduplicate
  4. Generate prevention checklist and recommended patterns
  5. Create result artifact (experience-result-{timestamp}.json)

Example:

## 📚 历史经验参考

### ⚠️ 错误预防(来自 CLAUDE.md)
- 预防措施1
- 预防措施2

### 🎯 可复用模式(来自 AGENT.md)
- 代码模式/流程模式

### 📖 技术知识(来自 MEMORY.md)
- 知识点1、知识点2

Capability 3: Experience Review

Trigger timing: When a milestone is completed, invoked by goal-oriented

Purpose: Keep the good, change the bad, continuously optimize

Execution steps:

  1. Read the original review file
  2. Analyze application effectiveness (number of applications, success rate)
  3. Evaluate gains and losses (keep the good, change the bad)
  4. Update the four-tier knowledge base
  5. Generate review report

Example:

## 复盘结果

### ✅ 保留好的(好则加冕)
1. **成功经验**
   - 应用效果:5次,成功率100%
   - 决策:写入 CLAUDE.md 强制规则

### ❌ 改掉坏的(错则改之)
1. **失败教训**
   - 问题:文档命名不直观
   - 改进:优化命名规范

Capability 4: Experience Reflection

Trigger timing: Experience may be outdated, tech stack upgrades, periodic reflection

Purpose: Verify effectiveness, distill wisdom

Execution steps:

  1. Identify experiences that need reflection (outdated/low success rate)
  2. Deeply analyze effectiveness (application statistics, failure cases)
  3. Distill wisdom (surface experience → deep wisdom)
  4. Update the four-tier knowledge base (mark old experience, save new experience)

Example:

## 经验反思 - 目录检查

### 有效性分析
- 应用次数:8次,成功率:87.5%
- 问题:未考虑版本差异

### 智慧提炼
**表层经验**:测试前检查目录
**深层智慧**:防御性思维 + 版本意识 + 避免过度防御

**更新决策**:区分版本环境,优化检查流程

Capability 5: Error Prevention

Trigger timing: Potential error risk detected

Execution steps:

  1. Detect risks (missing configuration, incorrect API usage, etc.)
  2. Retrieve similar historical errors
  3. Generate prevention suggestions and checklist
  4. Show to user for confirmation

Example:

## 💡 错误预防提醒

检测到风险:国际化配置缺失
预防措施:
- 检查 next.config.js 中的 i18n 配置
- 使用标准配置模板

历史错误:2026-03-20 类似错误

Capability 6: Effect Tracking

Trigger timing: When experience is applied

Execution steps:

  1. Record application scenario and context
  2. Evaluate application effectiveness (whether errors were prevented, time saved)
  3. Update experience statistics
  4. Continuously optimize the knowledge base

Example:

{
  "experience_id": "2026-03-24_i18n_config",
  "applied_count": 3,
  "error_prevented": 2,
  "time_saved": "50分钟"
}

Difference between review and reflection

Dimension Review Reflect
Object Completed task/milestone Existing experience
Timing Some time after completion When experience may be outdated
Purpose Keep the good, change the bad Verify effectiveness, distill wisdom
Depth Medium (focus on gains and losses) Deep (focus on essence)

Usage examples

Scenario 1: Complete process after task completion

# 1. goal-oriented 创建目标
用户:"优化文档结构"

# 2. 自动检索经验
experience-manager → 四层级检索 → 返回预防措施

# 3. 执行任务
应用经验或最佳实践

# 4. 里程碑复盘
experience-manager.review → 保留好的,改掉坏的

# 5. 整体完成
experience-manager.deep-review → 提炼智慧

# 6. 沉淀经验
四层级同步更新

Scenario 2: Retrieve historical experience

# 用户提出任务
用户:"修复英文页面404错误"

# goal-oriented 调用
experience-manager.retrieve(
  keywords=["英文页面", "404", "路由"]
)

# 返回结果
- 错误预防:检查 i18n 配置
- 可复用模式:国际化路由配置模板
- 历史案例:2026-03-20 修复详情

Common pitfalls

  1. ❌ Only accumulating without reading → Experience must be retrieved before each task starts
  2. ❌ Only accumulating in a single location → Accumulate synchronously across four tiers to ensure knowledge is not lost
  3. ❌ Only accumulating without reviewing → Review is required when milestones and the overall project are completed
  4. ❌ Outdated experience not reflected on → Reflect periodically and promptly update outdated experience
  5. ❌ Reviews become a formality → In-depth analysis of gains and losses, develop actionable improvement plans
  6. ❌ Neglecting wisdom distillation → Distill methodologies and transferable patterns from experience

Artifact formats

Request artifacts:

{
  "requesting_skill": "skill-name",
  "action": "save|retrieve|review|reflect",
  "task_keywords": ["关键词"],
  // 其他参数...
}

Result artifacts:

{
  "status": "success",
  "timestamp": "2026-03-24T10:00:00Z",
  "layers_updated": ["CLAUDE.md", "AGENT.md", "MEMORY.md", "MCP Memory"],
  // 结果数据...
}

Detailed format: Refer to templates/ directory


Template files

  • templates/retrospective-template.md - Retrospective report template
  • templates/experience-request-template.json - Retrieval request template
  • templates/experience-retrieve-template.json - Retrieval result template
  • templates/review-request-template.json - Retrospective request template
  • templates/reflection-request-template.json - Reflection request template

Reference materials

Core concepts:

Methodology:

Detailed guide: Refer to detailed-guide.md for complete execution steps, examples, and best practices.


Skill collaboration

Called entry points:

  • ✅ goal-oriented - Retrieve when creating goals, retrospect and reflect upon milestone/overall completion, consolidate after completion
  • ✅ pilot - Retrieve before scheduling, prevent when detecting risks
  • ✅ Other skills - Called as needed

Invocation method: Artifact transfer (recommended) or direct user invocation