← 返回 Skills 市场
mmyg11

Agent Reflect Temp

作者 mmyg11 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
210
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install agent-reflect-temp
功能描述
Self-improvement through conversation analysis. Extracts learnings from corrections and success patterns, permanently encoding them into agent definitions. P...
使用说明 (SKILL.md)

Reflect - Agent Self-Improvement Skill

Transform your AI assistant into a continuously improving partner. Every correction becomes a permanent improvement that persists across all future sessions.

Quick Reference

Command Action
reflect Analyze conversation for learnings
reflect on Enable auto-reflection
reflect off Disable auto-reflection
reflect status Show state and metrics
reflect review Review pending learnings

When to Use

  • After completing complex tasks
  • When user explicitly corrects behavior ("never do X", "always Y")
  • At session boundaries or before context compaction
  • When successful patterns are worth preserving

Workflow

Step 1: Scan Conversation for Signals

Analyze the conversation for correction signals and learning opportunities.

Signal Confidence Levels:

Confidence Triggers Examples
HIGH Explicit corrections "never", "always", "wrong", "stop", "the rule is"
MEDIUM Approved approaches "perfect", "exactly", "that's right", accepted output
LOW Observations Patterns that worked but not explicitly validated

See signal_patterns.md for full detection rules.

Step 2: Classify & Match to Target Files

Map each signal to the appropriate target:

Category Target Files
Code Style code-reviewer, backend-developer, frontend-developer
Architecture solution-architect, api-architect, architecture-reviewer
Process CLAUDE.md, orchestrator agents
Domain Domain-specific agents, CLAUDE.md
Tools CLAUDE.md, relevant specialists
New Skill Create new skill file

See agent_mappings.md for mapping rules.

Step 3: Check for Skill-Worthy Signals

Some learnings should become new skills rather than agent updates:

Skill-Worthy Criteria:

  • Non-obvious debugging (>10 min investigation)
  • Misleading error (root cause different from message)
  • Workaround discovered through experimentation
  • Configuration insight (differs from documented)
  • Reusable pattern (helps in similar situations)

Quality Gates (must pass all):

  • Reusable: Will help with future tasks
  • Non-trivial: Requires discovery, not just docs
  • Specific: Can describe exact trigger conditions
  • Verified: Solution actually worked
  • No duplication: Doesn't exist already

Step 4: Generate Proposals

Present findings in structured format:

# Reflection Analysis

## Session Context
- **Date**: [timestamp]
- **Messages Analyzed**: [count]

## Signals Detected

| # | Signal | Confidence | Source Quote | Category |
|---|--------|------------|--------------|----------|
| 1 | [learning] | HIGH | "[exact words]" | Code Style |

## Proposed Changes

### Change 1: Update [agent-name]
**Target**: `[file path]`
**Section**: [section name]
**Confidence**: HIGH

```diff
+ New rule from learning

Review Prompt

Apply these changes? (Y/N/modify/1,2,3)


### Step 5: Apply with User Approval

**On `Y` (approve):**
1. Apply each change using Edit tool
2. Commit with descriptive message
3. Update metrics

**On `N` (reject):**
1. Discard proposed changes
2. Log rejection for analysis

**On `modify`:**
1. Present each change individually
2. Allow editing before applying

**On selective (e.g., `1,3`):**
1. Apply only specified changes
2. Commit partial updates

## State Management

State is stored in `~/.reflect/` (configurable via `REFLECT_STATE_DIR`):

```yaml
# reflect-state.yaml
auto_reflect: false
last_reflection: "2026-01-26T10:30:00Z"
pending_reviews: []

Metrics Tracking

# reflect-metrics.yaml
total_sessions_analyzed: 42
total_signals_detected: 156
total_changes_accepted: 89
acceptance_rate: 78%
confidence_breakdown:
  high: 45
  medium: 32
  low: 12
most_updated_agents:
  code-reviewer: 23
  backend-developer: 18
skills_created: 5

Safety Guardrails

Human-in-the-Loop

  • NEVER apply changes without explicit user approval
  • Always show full diff before applying
  • Allow selective application

Incremental Updates

  • ONLY add to existing sections
  • NEVER delete or rewrite existing rules
  • Preserve original structure

Conflict Detection

  • Check if proposed rule contradicts existing
  • Warn user if conflict detected
  • Suggest resolution strategy

Output Locations

Project-level (versioned with repo):

  • .claude/reflections/YYYY-MM-DD_HH-MM-SS.md - Full reflection
  • .claude/skills/{name}/SKILL.md - New skills

Global (user-level):

  • ~/.reflect/learnings.yaml - Learning log
  • ~/.reflect/reflect-metrics.yaml - Aggregate metrics

Examples

Example 1: Code Style Correction

User says: "Never use var in TypeScript, always use const or let"

Signal detected:

  • Confidence: HIGH (explicit "never" + "always")
  • Category: Code Style
  • Target: frontend-developer.md

Proposed change:

## Style Guidelines
+ * Use `const` or `let` instead of `var` in TypeScript

Example 2: Process Preference

User says: "Always run tests before committing"

Signal detected:

  • Confidence: HIGH (explicit "always")
  • Category: Process
  • Target: CLAUDE.md

Proposed change:

## Commit Hygiene
+ * Run test suite before creating commits

Example 3: New Skill from Debugging

Context: Spent 30 minutes debugging a React hydration mismatch

Signal detected:

  • Confidence: HIGH (non-trivial debugging)
  • Category: New Skill
  • Quality gates: All passed

Proposed skill: react-hydration-fix/SKILL.md

Troubleshooting

No signals detected:

  • Session may not have had corrections
  • Check if using natural language corrections

Conflict warning:

  • Review the existing rule cited
  • Decide if new rule should override
  • Can modify before applying

Agent file not found:

  • Check agent name spelling
  • May need to create agent file first
安全使用建议
Before installing: 1) Expect this skill to read and write files under your home and project (~/.claude, .claude/, and a state dir ~/.reflect). Back up those directories or run in a disposable environment. 2) The SKILL.md promises a human-in-the-loop review but also exposes an "auto-reflect" mode — confirm default auto_reflect is disabled and test with auto-reflect turned off until you trust its proposals. 3) Review agent_mappings.md and signal_patterns.md to understand what textual cues will become rules (regexes can create false positives). 4) Limit its state dir by setting REFLECT_STATE_DIR to a sandbox path and ensure your VCS is enabled (so you can revert commits it makes). 5) Because allowed-tools include Bash/Edit, monitor the first few runs, require diffs before applying, and only enable automatic application after you’re confident. If you cannot or do not want the skill to edit global agent files, do not install or run it in a project where those paths are writable by the agent.
功能分析
Type: OpenClaw Skill Name: agent-reflect-temp Version: 1.0.0 The 'reflect' skill is a meta-learning utility designed to help an AI agent improve by analyzing conversation history for user corrections and success patterns. While it requests high-privilege tools (Bash, Edit, Write) to modify agent definition files in `~/.claude/agents/` and `~/.reflect/`, the instructions in `SKILL.md` and `agent_mappings.md` include mandatory safety guardrails, such as human-in-the-loop approval and mandatory diff previews. No evidence of malicious intent, data exfiltration, or unauthorized persistence was found; the logic is transparently focused on the stated goal of self-improvement.
能力评估
Purpose & Capability
The skill's name/description (persisting conversation learnings into agent definitions) aligns with the runtime instructions which read, propose diffs, and write agent files. However, the registry metadata declares no required config paths or credentials while the SKILL.md explicitly targets many user and project paths (e.g., ~/.claude/, ~/.claude/agents/, .claude/skills/, ~/.reflect/). The skill therefore assumes filesystem access that is not declared in its metadata — a mismatch the user should be aware of.
Instruction Scope
SKILL.md instructs scanning conversation logs, mapping signals to agent files, generating diffs, and applying edits (creating/updating SKILL.md and agent files). It also requires reading/writing user-level and project-level configuration (examples reference ~/.claude, project .claude paths, and ~/.reflect state). While it documents a human-in-the-loop review step, the skill also provides an 'auto-reflect' mode (toggleable via 'reflect on') and default settings that mention auto_reflect — the interplay is ambiguous: the guardrail 'NEVER apply changes without explicit user approval' conflicts with an explicit auto-reflect feature and the capacity to auto-create/update files. Allowed-tools include Bash, Edit, Write, Read, Glob, Grep — these enable broad filesystem and shell actions, so absence of clearer constraints is concerning.
Install Mechanism
This is an instruction-only skill with no install spec and no code files; that minimizes installer risk because nothing is downloaded or executed at install time. The highest-risk runtime capability comes from the allowed runtime tools and the instructions, not from an install step.
Credentials
The skill requests no credentials or environment variables in metadata, but SKILL.md refers to an optional REFLECT_STATE_DIR environment variable and expects to write to ~/.reflect and various ~/.claude and project-level files. Declaring no required config paths while the instructions assume write access to many user and repo locations is a proportionality mismatch. There are no secrets requested, which is appropriate, but the filesystem access scope is broad relative to the metadata.
Persistence & Privilege
The skill is not forced always-on (always:false) and does not declare elevated privileges. However, by design it persists changes to user and project agent files and keeps state in ~/.reflect. That persistence is coherent with its purpose, but combined with broad allowed-tools (Bash, Edit, Write) it gives the skill potential to make permanent, cross-session modifications — so you should treat it like a tool that can modify your configuration and codebase and restrict/monitor it accordingly.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agent-reflect-temp
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agent-reflect-temp 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial public release of the reflect skill – automated, guided self-improvement for agents. - Analyze conversations to extract learnings from user corrections and success patterns. - Propose permanent agent definition updates with explicit user approval and full diff review. - Classifies signals by confidence (HIGH, MEDIUM, LOW) and intelligently routes changes to the correct agent files or suggests new skills. - Tracks and persists metrics, state, and detailed change logs both globally and per-project. - Includes safety guardrails: only adds rules, requires explicit approval, detects conflicts, and enables incremental, auditable improvements. - Provides flexible commands for reflection review, status, and enabling/disabling auto-reflection.
元数据
Slug agent-reflect-temp
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Agent Reflect Temp 是什么?

Self-improvement through conversation analysis. Extracts learnings from corrections and success patterns, permanently encoding them into agent definitions. P... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 210 次。

如何安装 Agent Reflect Temp?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install agent-reflect-temp」即可一键安装,无需额外配置。

Agent Reflect Temp 是免费的吗?

是的,Agent Reflect Temp 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Agent Reflect Temp 支持哪些平台?

Agent Reflect Temp 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Agent Reflect Temp?

由 mmyg11(@mmyg11)开发并维护,当前版本 v1.0.0。

💬 留言讨论