{
  "schemaVersion": "1.0",
  "item": {
    "slug": "agent-self-reflection",
    "name": "Self Reflection",
    "source": "tencent",
    "type": "skill",
    "category": "效率提升",
    "sourceUrl": "https://clawhub.ai/BrennerSpear/agent-self-reflection",
    "canonicalUrl": "https://clawhub.ai/BrennerSpear/agent-self-reflection",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/agent-self-reflection",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=agent-self-reflection",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "scripts/summarize-sessions.sh"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/agent-self-reflection"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/agent-self-reflection",
    "agentPageUrl": "https://openagent3.xyz/skills/agent-self-reflection/agent",
    "manifestUrl": "https://openagent3.xyz/skills/agent-self-reflection/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/agent-self-reflection/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Self-Reflection Skill",
        "body": "Reflect on recent sessions and extract actionable insights. Runs hourly via cron."
      },
      {
        "title": "Step 1: Gather Recent Sessions",
        "body": "# List sessions active in the last 2 hours\nopenclaw sessions --active 120 --json\n\nParse the output to get session keys and IDs. Skip subagent sessions (they're task workers, not interesting for reflection). Focus on:\n\nTelegram group/topic sessions (real user interactions)\nDirect sessions (1:1 with Brenner)\nCron-triggered sessions (how did automated tasks go?)"
      },
      {
        "title": "Step 2: Read Session History",
        "body": "For each interesting session from Step 1, read the JSONL transcript:\n\n# Read the last ~50 lines of each session file (keep it bounded!)\ntail -50 ~/.openclaw/agents/main/sessions/<sessionId>.jsonl\n\n⚠️ CRITICAL: Never load full session files. Use tail -50 or Read with offset/limit. Sessions can be 100k+ tokens.\n\nParse the JSONL to understand what happened. Look for:\n\ntype: \"user\" or type: \"human\" — what was asked\ntype: \"assistant\" — what you responded\ntype: \"tool_use\" / type: \"tool_result\" — what tools were called and results\nError patterns, retries, confusion"
      },
      {
        "title": "Step 3: Analyze & Extract Insights",
        "body": "For each session, ask yourself:"
      },
      {
        "title": "What went well?",
        "body": "Tasks completed smoothly on first try\nGood tool usage patterns worth reinforcing\nEfficient approaches to remember"
      },
      {
        "title": "What went wrong?",
        "body": "Errors, retries, wrong approaches\nMisunderstandings of user intent\nTools that didn't work as expected\nContext that was missing"
      },
      {
        "title": "Lessons learned?",
        "body": "\"Next time, do X instead of Y\"\n\"Remember that Z works this way\"\n\"Tool A needs parameter B or it fails\"\n\"When user says X, they usually mean Y\"\n\nQuality bar: Each insight must be:\n\nSpecific — not \"be more careful\" but \"check if file exists before editing\"\nActionable — something future-you can directly apply\nNon-obvious — skip things any competent agent would know\nNew — don't repeat insights already captured"
      },
      {
        "title": "Step 4: Route Insights to the Right Files",
        "body": "Each insight belongs somewhere specific. Route them:"
      },
      {
        "title": "→ AGENTS.md",
        "body": "Process improvements (how to handle sessions, memory, etc.)\nNew conventions or workflow rules\nSafety lessons"
      },
      {
        "title": "→ TOOLS.md",
        "body": "Tool-specific gotchas (\"gog needs --json flag for parsing\")\nEnvironment details (paths, configs, quirks)\nNew tool patterns discovered"
      },
      {
        "title": "→ memory/YYYY-MM-DD.md (today's date)",
        "body": "Session-specific context (\"Brenner asked about X project\")\nTemporary facts that matter today but not forever\nWhat happened today (events, decisions, requests)"
      },
      {
        "title": "→ memory/about-user.md",
        "body": "New preferences discovered\nCommunication style observations\nProject/interest updates"
      },
      {
        "title": "→ skills/<skill-name>/SKILL.md",
        "body": "Improvements to specific skill instructions\nBug fixes in skill workflows\nNew parameters or approaches for a skill"
      },
      {
        "title": "→ MEMORY.md",
        "body": "Updates to the memory index if new memory files are created"
      },
      {
        "title": "Step 5: Write the Insights",
        "body": "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.\n\nFormat for daily memory files:\n\n## Self-Reflection — HH:MM ET\n\n### Insights\n- [source: session-key] Lesson learned here\n- [source: session-key] Another insight\n\n### Tool Notes\n- Discovered: tool X needs Y configuration\n\n### User Context\n- Brenner mentioned interest in Z"
      },
      {
        "title": "Step 6: Summary",
        "body": "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.\n\nIf there's nothing interesting to reflect on (quiet period, only heartbeats), just say so. Don't manufacture insights."
      },
      {
        "title": "Quality Checklist",
        "body": "Before writing any insight:\n\nIs this actually new? (Check existing files first)\n Is this specific and actionable?\n Am I routing it to the right file?\n Am I keeping daily memory files concise (not dumping full transcripts)?\n Did I respect the token budget (no huge file reads)?"
      },
      {
        "title": "Anti-Patterns (Don't Do These)",
        "body": "❌ Don't summarize every session — only extract lessons\n❌ Don't read full JSONL files — tail/limit only\n❌ Don't write vague insights (\"improve response quality\")\n❌ Don't duplicate existing knowledge\n❌ Don't create new files when appending to existing ones works\n❌ Don't reflect on your own reflection sessions (skip cron:self-reflection sessions)"
      }
    ],
    "body": "Self-Reflection Skill\n\nReflect on recent sessions and extract actionable insights. Runs hourly via cron.\n\nStep 1: Gather Recent Sessions\n# List sessions active in the last 2 hours\nopenclaw sessions --active 120 --json\n\n\nParse the output to get session keys and IDs. Skip subagent sessions (they're task workers, not interesting for reflection). Focus on:\n\nTelegram group/topic sessions (real user interactions)\nDirect sessions (1:1 with Brenner)\nCron-triggered sessions (how did automated tasks go?)\nStep 2: Read Session History\n\nFor each interesting session from Step 1, read the JSONL transcript:\n\n# Read the last ~50 lines of each session file (keep it bounded!)\ntail -50 ~/.openclaw/agents/main/sessions/<sessionId>.jsonl\n\n\n⚠️ CRITICAL: Never load full session files. Use tail -50 or Read with offset/limit. Sessions can be 100k+ tokens.\n\nParse the JSONL to understand what happened. Look for:\n\ntype: \"user\" or type: \"human\" — what was asked\ntype: \"assistant\" — what you responded\ntype: \"tool_use\" / type: \"tool_result\" — what tools were called and results\nError patterns, retries, confusion\nStep 3: Analyze & Extract Insights\n\nFor each session, ask yourself:\n\nWhat went well?\nTasks completed smoothly on first try\nGood tool usage patterns worth reinforcing\nEfficient approaches to remember\nWhat went wrong?\nErrors, retries, wrong approaches\nMisunderstandings of user intent\nTools that didn't work as expected\nContext that was missing\nLessons learned?\n\"Next time, do X instead of Y\"\n\"Remember that Z works this way\"\n\"Tool A needs parameter B or it fails\"\n\"When user says X, they usually mean Y\"\n\nQuality bar: Each insight must be:\n\nSpecific — not \"be more careful\" but \"check if file exists before editing\"\nActionable — something future-you can directly apply\nNon-obvious — skip things any competent agent would know\nNew — don't repeat insights already captured\nStep 4: Route Insights to the Right Files\n\nEach insight belongs somewhere specific. Route them:\n\n→ AGENTS.md\nProcess improvements (how to handle sessions, memory, etc.)\nNew conventions or workflow rules\nSafety lessons\n→ TOOLS.md\nTool-specific gotchas (\"gog needs --json flag for parsing\")\nEnvironment details (paths, configs, quirks)\nNew tool patterns discovered\n→ memory/YYYY-MM-DD.md (today's date)\nSession-specific context (\"Brenner asked about X project\")\nTemporary facts that matter today but not forever\nWhat happened today (events, decisions, requests)\n→ memory/about-user.md\nNew preferences discovered\nCommunication style observations\nProject/interest updates\n→ skills/<skill-name>/SKILL.md\nImprovements to specific skill instructions\nBug fixes in skill workflows\nNew parameters or approaches for a skill\n→ MEMORY.md\nUpdates to the memory index if new memory files are created\nStep 5: Write the Insights\n\nFor 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.\n\nFormat for daily memory files:\n\n## Self-Reflection — HH:MM ET\n\n### Insights\n- [source: session-key] Lesson learned here\n- [source: session-key] Another insight\n\n### Tool Notes\n- Discovered: tool X needs Y configuration\n\n### User Context\n- Brenner mentioned interest in Z\n\nStep 6: Summary\n\nAfter 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.\n\nIf there's nothing interesting to reflect on (quiet period, only heartbeats), just say so. Don't manufacture insights.\n\nQuality Checklist\n\nBefore writing any insight:\n\n Is this actually new? (Check existing files first)\n Is this specific and actionable?\n Am I routing it to the right file?\n Am I keeping daily memory files concise (not dumping full transcripts)?\n Did I respect the token budget (no huge file reads)?\nAnti-Patterns (Don't Do These)\n❌ Don't summarize every session — only extract lessons\n❌ Don't read full JSONL files — tail/limit only\n❌ Don't write vague insights (\"improve response quality\")\n❌ Don't duplicate existing knowledge\n❌ Don't create new files when appending to existing ones works\n❌ Don't reflect on your own reflection sessions (skip cron:self-reflection sessions)"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/BrennerSpear/agent-self-reflection",
    "publisherUrl": "https://clawhub.ai/BrennerSpear/agent-self-reflection",
    "owner": "BrennerSpear",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/agent-self-reflection",
    "downloadUrl": "https://openagent3.xyz/downloads/agent-self-reflection",
    "agentUrl": "https://openagent3.xyz/skills/agent-self-reflection/agent",
    "manifestUrl": "https://openagent3.xyz/skills/agent-self-reflection/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/agent-self-reflection/agent.md"
  }
}