mcpField
R
reflection

reflection

github.com/davidkissAgent workflows4730 installsUpdated 25w ago
Repository

About reflection

Reflection is an Agent skill that derives potential improvements and recurring preferences from conversations, tool failures, and user corrections. It proposes one change and waits for explicit approval before applying it.

Key features

  1. 01Analyze conversations and tool-call outcomes
  2. 02Identify skill gaps and user preferences
  3. 03Propose one concise change at a time
  4. 04Show a diff or preference proposal
  5. 05Apply changes only after confirmation

Use cases

  1. 01Improve skill instructions after tool failures
  2. 02Record recurring preferences in AGENT.md
  3. 03Propose CLAUDE.md updates in Claude Code

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/davidkiss/smart-ai-skills --skill reflection

After installing, type/reflectionin Claude Code to confirm it loaded.

Details

From the project README

Reflection Skill

Overview

This skill is used to learn from interaction with the user and failures in tool calls. It analyzes what worked, what didn't (tool failures), and identifies recurring patterns or explicit user preferences that should be formalized.

Objectives

  • Improve Skills: Identify gaps or inefficiencies in existing skill definitions and propose concise updates.
  • Store Preferences: Capture user preferences, project-specific rules, or recurring instructions in a AGENT.md or CLAUDE.md (when used in Claude Code) file.

Process

  1. Analyze: Review the conversation history, tool calls, and any failures or corrections from the user.
  2. Identify: Determine if a specific behavior should be codified in a skill or if a user preference has emerged.
  3. Propose: Formulate a single, concise change.
    • If updating a skill, show a diff of the proposed change.
    • If adding a preference, show the proposed addition to CLAUDE.md.
  4. Confirm: Present the proposal to the user and ask for explicit confirmation without making any changes first.
  5. Apply Changes: Once user confirmed the changes, only then apply them

Guidelines

  • One at a time: Only propose one change per invocation to maintain focus and allow for careful review.
  • Conciseness: Keep changes as brief as possible. Often a few words are enough to clarify a requirement or fix a common mistake.
  • Accuracy: Ensure the proposal directly addresses a real issue or preference observed in the session.
  • Specificity: Think how you could make the learnings more generic to apply to other use cases, but don't make the changes too generic so that it would not address the original learnings
  • Failure Analysis: Pay special attention to tool failures or when the user has to correct your approach. These are primary candidates for reflection.
  • Conflict Resolution: If a proposed change conflicts with details of an existing skill or user preference, propose a resolution that best serves the user's current intent.

Comments

Markdown supported