/ 目錄 / 演練場 / claude-reflect
● 社群 BayramAnnakov ⚡ 即開即用

claude-reflect

作者 BayramAnnakov · BayramAnnakov/claude-reflect

Claude Code 默默學習你的糾正方式——捕捉規則、偏好和讚美,然後寫入 CLAUDE.md 和 AGENTS.md。

claude-reflect 在 Claude Code 對話的背景中運作,觀察你糾正、讚美或重述偏好的時機。它將這些提煉為持久規則,並更新 CLAUDE.md 和 AGENTS.md,讓未來的對話繼承這些規則。相比手動維護指令檔案,這是一種更輕盈的替代方案。

為什麼要用

核心特性

即時演示

實際使用效果

就緒

安裝

選擇你的客戶端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "claude-reflect-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/BayramAnnakov/claude-reflect",
        "~/.claude/skills/claude-reflect"
      ],
      "_inferred": true
    }
  }
}

開啟 Claude Desktop → Settings → Developer → Edit Config。儲存後重啟應用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "claude-reflect-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/BayramAnnakov/claude-reflect",
        "~/.claude/skills/claude-reflect"
      ],
      "_inferred": true
    }
  }
}

Cursor 使用與 Claude Desktop 相同的 mcpServers 格式。專案級設定優先於全域。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "claude-reflect-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/BayramAnnakov/claude-reflect",
        "~/.claude/skills/claude-reflect"
      ],
      "_inferred": true
    }
  }
}

點擊 Cline 側欄中的 MCP Servers 圖示,然後選 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "claude-reflect-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/BayramAnnakov/claude-reflect",
        "~/.claude/skills/claude-reflect"
      ],
      "_inferred": true
    }
  }
}

格式與 Claude Desktop 相同。重啟 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "claude-reflect-skill",
      "command": "git",
      "args": [
        "clone",
        "https://github.com/BayramAnnakov/claude-reflect",
        "~/.claude/skills/claude-reflect"
      ]
    }
  ]
}

Continue 使用伺服器物件陣列,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "claude-reflect-skill": {
      "command": {
        "path": "git",
        "args": [
          "clone",
          "https://github.com/BayramAnnakov/claude-reflect",
          "~/.claude/skills/claude-reflect"
        ]
      }
    }
  }
}

加入 context_servers。Zed 儲存後熱重載。

claude mcp add claude-reflect-skill -- git clone https://github.com/BayramAnnakov/claude-reflect ~/.claude/skills/claude-reflect

一行命令搞定。用 claude mcp list 驗證,claude mcp remove 移除。

使用場景

實戰用法: claude-reflect

無需手動維護即可讓 CLAUDE.md 持續演進

👤 討厭維護文件檔案的獨立開發者 ⏱ ~5 min beginner

何時使用: 你希望 CLAUDE.md 跟上你的偏好,但不想把它當成寫作苦差事。

前置條件
  • Skill 已安裝 — git clone https://github.com/BayramAnnakov/claude-reflect ~/.claude/skills/claude-reflect
  • 已啟用反思功能 — 在專案的 CLAUDE.md 前言加入 use claude-reflect
步驟
  1. 正常工作
    Just code with Claude as usual. Correct it when wrong, praise it when right.✓ 已複製
    → Skill 靜默捕捉——你不會察覺到它
  2. 每日下班前審查
    Use claude-reflect. Show me today's drafted rule additions. Approve or skip each.✓ 已複製
    → 5–10 個候選規則,附有來源(哪次對話、哪個 prompt)
  3. 提交差異
    Apply approved rules and commit CLAUDE.md.✓ 已複製
    → 乾淨的 git 差異;規則現已生效

結果: CLAUDE.md 隨你一起成長,無需手動維護的代價。

注意事項
  • Skill 將一次性的脈絡捕捉為持久規則 — 務必審查每日候選規則;拒絕任何情境性的內容
搭配使用: filesystem

從集體修正中建立全團隊的 AI 慣例

👤 標準化 AI 工作流程的技術主管 ⏱ ~60 min intermediate

何時使用: 多位開發者都在糾正 Claude 相似的問題;你希望有共用的規則集。

步驟
  1. 收集各開發者的草案
    Each dev runs claude-reflect daily and pushes their candidate rules to a shared review branch.✓ 已複製
    → 分支上有 N 個待審查草案
  2. 合併對話
    Use claude-reflect consolidate. Find rules captured by ≥2 people; promote those to AGENTS.md.✓ 已複製
    → 共同認可的規則集
  3. 推廣
    Merge to main. New AGENTS.md applies to everyone.✓ 已複製
    → 團隊使用相同基準線;各開發者的本機規則保持不變

結果: 自下而上的標準化,而不需要流程委員會。

注意事項
  • 聲音大的開發者主導;安靜的人的模式被忽略 — 確保所有人都執行 skill;以反思事件加權,而非以檔案編輯次數
搭配使用: github

稽核並修剪 CLAUDE.md 中的過時規則

👤 長期使用 CLAUDE.md 的使用者 ⏱ ~25 min intermediate

何時使用: 你的 CLAUDE.md 現在有 600 行,Claude 的脈絡已經臃腫。

步驟
  1. 計算相關性分數
    Use claude-reflect. Score each rule by recency-of-last-application and current-codebase-fit.✓ 已複製
    → 各規則的分數
  2. 建議刪除
    Suggest 30 rules to remove (stale or obsolete).✓ 已複製
    → 附有理由的刪除清單
  3. 差異 + 提交
    Apply approved removals; commit with message 'reflect: prune stale rules'.✓ 已複製
    → 更精簡的 CLAUDE.md

結果: 真正被閱讀的 CLAUDE.md,而非被略過的文件。

注意事項
  • 修剪了某條規則——它沒被套用只是因為 Claude 一直在遵守它 — 有疑問時保留——但標記「上次驗證日期」以便下季重新確認

組合

與其他 MCP 搭配,撬動十倍槓桿

claude-reflect-skill + pro-workflow-skill

pro-workflow 負責明確捕捉,claude-reflect 負責被動——雙通道學習

Use pro-workflow when you say 'remember this'; let claude-reflect catch the rest in the background.✓ 已複製
claude-reflect-skill + github

透過 PR 讓規則變更可審查

Each Friday, claude-reflect opens a PR with proposed CLAUDE.md edits for human review.✓ 已複製

工具

此 MCP 暴露的能力

工具輸入參數何時呼叫成本
watch_session 常駐背景程序 0
review_candidates since? 每日或每週的批准迴圈 0
consolidate scope? 定期去重複和矛盾解決 0
score_rules 修剪前的稽核 0
apply_to_files approved_ids[], files[] 將批准的候選規則寫入 CLAUDE.md 和 AGENTS.md 0

成本與限制

運行它的成本

API 配額
無——本機
每次呼叫 Token 數
背景捕捉免費;審查和整合在有設定的情況下使用本機 LLM
費用
免費
提示
謹慎批准候選規則——質比量重要

安全

權限、密鑰、影響範圍

最小權限: filesystem-write
憑證儲存: Skill 狀態在 .claude/reflect/ 中;若需共享則提交至儲存庫
資料出站: 預設不對外傳輸

故障排查

常見錯誤與修復

未捕捉到任何候選規則

確認 CLAUDE.md 前言中有呼叫 skill;在 .claude/reflect/log 中查看條目

候選規則都是雜訊

調整觸發靈敏度;只從明確的修正捕捉,而非一般聊天

AGENTS.md 與 CLAUDE.md 出現漂移

定期執行整合;工具設計為保持同步,但手動編輯會造成分歧

批准提示讓人不知所措

以 --limit 5 每日執行審查;養成習慣,而不是一次處理 50 個

替代方案

claude-reflect 對比其他方案

替代方案何時用它替代權衡
pro-workflow-skill你偏好明確的捕捉和 worktree 協調較手動;對並行工作更強大
手動維護 CLAUDE.md你有足夠的紀律自己撰寫規則經常被忽略;依賴意志力

更多

資源

📖 閱讀 GitHub 上的官方 README

🐙 查看未解決的 issue

🔍 瀏覽全部 400+ MCP 伺服器和 Skills