reflection

自我反思與學習。分析執行結果、提取教訓、改進策略。觸發:reflect, 反思, 學到, 改進, 回顧, 檢討

⭐3stars🔀1forks📁View on GitHub🕐Updated Jan 3, 2026⬇️1downloads

When & Why to Use This Skill

This Claude skill enables autonomous self-reflection and continuous learning by analyzing execution results, identifying successes and failures, and extracting actionable insights. By systematically reviewing performance and saving lessons to memory, it ensures the agent evolves its strategies and improves accuracy over time, making it essential for complex, long-term task management.

Use Cases

  • Post-Task Analysis: Automatically reviewing complex workflows after completion to identify efficiency gains and optimize future execution paths.
  • Error Root Cause Analysis: Investigating failed tasks or unexpected errors to extract specific lessons and prevent the recurrence of similar issues.
  • User Feedback Adaptation: Processing direct user critiques or praise to refine the agent's communication style and better align with specific user preferences.
  • Continuous Strategy Refinement: Evaluating the effectiveness of different problem-solving approaches to build a more robust and reliable internal knowledge base.
namereflection
description自我反思與學習。分析執行結果、提取教訓、改進策略。觸發:reflect, 反思, 學到, 改進, 回顧, 檢討

Reflection Skill

從經驗中學習,持續改進。

核心原則

每次經驗都是學習機會 - 成功要知道為何成功,失敗要知道如何改進。

反思時機

主動反思

  • 完成複雜任務後
  • 遇到錯誤或失敗時
  • 用戶給予反饋時
  • 嘗試新方法後

被動觸發

  • 用戶說「/reflect」
  • 對話即將壓縮(PreCompact)
  • Session 結束時

反思流程

1. 回顧 → 這次做了什麼?
2. 評估 → 結果如何?用戶滿意嗎?
3. 分析 → 什麼做得好?什麼可以改進?
4. 提取 → 學到了什麼?
5. 記錄 → 保存教訓到 memory

反思問題清單

任務完成後

  • 目標達成了嗎?
  • 過程中有什麼意外?
  • 有沒有更好的方法?
  • 下次可以怎麼做得更好?

遇到錯誤時

  • 錯誤的根本原因是什麼?
  • 如何避免類似錯誤?
  • 這個錯誤模式之前出現過嗎?

收到反饋時

  • 用戶真正想要什麼?
  • 我的理解哪裡有偏差?
  • 如何更好地理解用戶需求?

輸出格式

簡短反思(預設)

**反思**:[1-2 句總結]
**學到**:[關鍵教訓]
**下次**:[改進行動]

詳細反思

## 反思:[任務名稱]

### 做了什麼
- [行動 1]
- [行動 2]

### 結果
- 成功/失敗/部分成功
- 用戶反饋:[...]

### 分析
- 做得好:[...]
- 可改進:[...]

### 教訓
- [教訓 1] → 存入 memory
- [教訓 2]

### 下次行動
- [ ] [改進 1]
- [ ] [改進 2]

與 Memory 整合

重要的教訓應保存到 memory:

memory_save:
  content: "用戶偏好先看結果再看過程"
  category: "preference"
  importance: 4

反思頻率

任務類型 反思深度
簡單問答 不需反思
一般任務 心中快速回顧
複雜任務 簡短反思
失敗/錯誤 詳細反思
重要里程碑 詳細反思 + 記錄