BrennerSpear

Self Reflection

生活服務v1.0.0
作者:BrennerSpear更新於 2026-05-17agent-self-reflection@clawhub_brennerspear/agent-self-reflection
個人計劃效率習慣#Cron Job

據 AlphaMoat 統計,截至 2026-09,Self Reflection 累計下載 3,405 次、獲 0 個星標,在全部 5,078 個 AI 技能中排名第 3,289 位,在「生活服務」分類(246 個)中排名第 159 位。

累計安裝
101
累計下載
3405
星標
-
全站排名
#3,289
全站前 65% · 「生活服務」前 65%
平台累計安裝累計下載星標評論
ClawHub ↗1013088--
SkillHub ↗973405-—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

流程會讀取會話記錄片段並可能持續寫入高信任檔案;會話內容可能私密,提煉出的內容也可能不準確或包含敏感資訊。應限制會話範圍、擷取必要片段、進行脫敏,並在寫入 AGENTS.md、TOOLS.md、MEMORY.md 或技能檔案前由負責人稽核批准。

資料釋出於 2026-10-29

可以用來做什麼

  • 規劃對近期會話進行有界回顧。
  • 歸納具體、可執行且非重複的經驗。
  • 為寫入工作區檔案設計審閱與脫敏步驟。

什麼時候用

  • 需要回顧近期 agent 會話並提煉操作經驗時。
  • 需要將有價值的發現路由到指令、工具、記憶或技能檔案時。
  • 啟用定時執行或準備編輯高信任檔案前,需要限制 transcript 範圍、脫敏並取得負責人稽核時。

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

概述 Self-Reflection 如何讀取近期會話並整理經驗,同時列出寫入檔案前的保護措施。
設計一個只生成草稿、不修改工作區檔案的會話回顧流程。

月度資料趨勢

累計下載3405
1316243835602026-03 · 累計下載 14712026-05 · 累計下載 23152026-07 · 累計下載 28212026-08 · 累計下載 29662026-09 · 累計下載 340526-0326-09
星標-
0112026-03 · 星標 -2026-05 · 星標 -2026-07 · 星標 -2026-08 · 星標 -2026-09 · 星標 -26-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。 該技能有同名的其他版本,調整前的資料歸屬當前下載量最大的這一個。

月份累計下載環比星標
2026-093405—-
2026-082966+5.1%-
2026-072821—-
2026-052315—-
2026-031471—-

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

4.7 KB · ClawHub v1.0.0
---
name: self-reflection
slug: agent-self-reflection
version: 1.0.0
description: Periodic self-reflection on recent sessions. Analyzes what went well, what went wrong, and writes concise, actionable insights to the appropriate workspace files. Designed to run as a cron job.
---

# Self-Reflection Skill

Reflect on recent sessions and extract actionable insights. Runs hourly via cron.
展開全部(共 142 行)

## Step 1: Gather Recent Sessions

```bash
# List sessions active in the last 2 hours
openclaw sessions --active 120 --json
```

Parse the output to get session keys and IDs. Skip subagent sessions (they're task workers, not interesting for reflection). Focus on:
- Telegram group/topic sessions (real user interactions)
- Direct sessions (1:1 with Brenner)
- Cron-triggered sessions (how did automated tasks go?)

## Step 2: Read Session History

For each interesting session from Step 1, read the JSONL transcript:

```bash
# Read the last ~50 lines of each session file (keep it bounded!)
tail -50 ~/.openclaw/agents/main/sessions/<sessionId>.jsonl
```

**⚠️ CRITICAL: Never load full session files. Use `tail -50` or `Read` with offset/limit. Sessions can be 100k+ tokens.**

Parse the JSONL to understand what happened. Look for:
- `type: "user"` or `type: "human"` — what was asked
- `type: "assistant"` — what you responded
- `type: "tool_use"` / `type: "tool_result"` — what tools were called and results
- Error patterns, retries, confusion

## Step 3: Analyze & Extract Insights

For each session, ask yourself:

### What went well?
- Tasks completed smoothly on first try
- Good tool usage patterns worth reinforcing
- Efficient approaches to remember

### What went wrong?
- Errors, retries, wrong approaches
- Misunderstandings of user intent
- Tools that didn't work as expected
- Context that was missing

### Lessons learned?
- "Next time, do X instead of Y"
- "Remember that Z works this way"
- "Tool A needs parameter B or it fails"
- "When user says X, they usually mean Y"

**Quality bar:** Each insight must be:
- **Specific** — not "be more careful" but "check if file exists before editing"
- **Actionable** — something future-you can directly apply
- **Non-obvious** — skip things any competent agent would know
- **New** — don't repeat insights already captured

## Step 4: Route Insights to the Right Files

Each insight belongs somewhere specific. Route them:

### → `AGENTS.md`
- Process improvements (how to handle sessions, memory, etc.)
- New conventions or workflow rules
- Safety lessons

### → `TOOLS.md`
- Tool-specific gotchas ("gog needs --json flag for parsing")
- Environment details (paths, configs, quirks)
- New tool patterns discovered

### → `memory/YYYY-MM-DD.md` (today's date)
- Session-specific context ("Brenner asked about X project")
- Temporary facts that matter today but not forever
- What happened today (events, decisions, requests)

### → `memory/about-user.md`
- New preferences discovered
- Communication style observations
- Project/interest updates

### → `skills/<skill-name>/SKILL.md`
- Improvements to specific skill instructions
- Bug fixes in skill workflows
- New parameters or approaches for a skill

### → `MEMORY.md`
- Updates to the memory index if new memory files are created

## Step 5: Write the Insights

For each insight, append or edit the appropriate file. Use the `Edit` tool for surgical changes to existing content. Use append (write to end) for daily memory files.

**Format for daily memory files:**
```markdown
## Self-Reflection — HH:MM ET

### Insights
- [source: session-key] Lesson learned here
- [source: session-key] Another insight

### Tool Notes
- Discovered: tool X needs Y configuration

### User Context
- Brenner mentioned interest in Z
```

## Step 6: Summary

After writing all insights, produce a brief summary of what you reflected on and what you wrote. This is your output — keep it to 2-4 sentences max.

If there's nothing interesting to reflect on (quiet period, only heartbeats), just say so. Don't manufacture insights.

## Quality Checklist

Before writing any insight:
- [ ] Is this actually new? (Check existing files first)
- [ ] Is this specific and actionable?
- [ ] Am I routing it to the right file?
- [ ] Am I keeping daily memory files concise (not dumping full transcripts)?
- [ ] Did I respect the token budget (no huge file reads)?

## Anti-Patterns (Don't Do These)

- ❌ Don't summarize every session — only extract *lessons*
- ❌ Don't read full JSONL files — tail/limit only
- ❌ Don't write vague insights ("improve response quality")
- ❌ Don't duplicate existing knowledge
- ❌ Don't create new files when appending to existing ones works
- ❌ Don't reflect on your own reflection sessions (skip cron:self-reflection sessions)

「生活服務」分類下的熱門技能

BrennerSpear 的其他技能

資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。