bayramannakov/claude-reflect

A self-learning system for Claude Code that captures corrections, positive feedback, and preferences — then syncs them to CLAUDE.md and AGENTS.md.

581 stars34 forksUpdated Jan 25, 2026
npx skills add bayramannakov/claude-reflect

README

claude-reflect

GitHub stars Version License: MIT Tests Platform

A self-learning system for Claude Code that captures corrections and discovers workflow patterns — turning them into permanent memory and reusable skills.

What it does

1. Learn from Corrections

When you correct Claude ("no, use gpt-5.1 not gpt-5"), it remembers forever.

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│  You correct    │ ──► │  Hook captures  │ ──► │  /reflect adds  │
│  Claude Code    │     │  to queue       │     │  to CLAUDE.md   │
└─────────────────┘     └─────────────────┘     └─────────────────┘
      (automatic)            (automatic)            (manual review)

2. Discover Workflow Patterns (NEW in v2)

Analyzes your session history to find repeating tasks that could become reusable commands.

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│  Your past      │ ──► │ /reflect-skills │ ──► │   Generates     │
│  sessions       │     │ finds patterns  │     │   /commands     │
└─────────────────┘     └─────────────────┘     └─────────────────┘
    (68 sessions)         (AI-powered)            (you approve)

Example: You've asked "review my productivity" 12 times → suggests creating /daily-review

Key Features

FeatureWhat it does
Permanent MemoryCorrections sync to CLAUDE.md — Claude remembers across sessions
Skill DiscoveryFinds repeating patterns in your history → generates commands
Multi-languageAI understands corrections in any language
Skill ImprovementCorrections during /deploy improve the deploy skill itself

Installation

# Add the marketplace
claude plugin marketplace add bayramannakov/claude-reflect

# Install the plugin
claude plugin install claude-reflect@claude-reflect-marketplace

# IMPORTANT: Restart Claude Code to activate the plugin

After installation, restart Claude Code (exit and reopen). Then hooks auto-configure and commands are ready.

First run? When you run /reflect for the first time, you'll be prompted to scan your past sessions for learnings.

Prerequisites

  • Claude Code CLI installed
  • Python 3.6+ (included on most systems)

Platform Support

  • macOS: Fully supported
  • Linux: Fully supported
  • Windows: Fully supported (native Python, no WSL required)

Commands

CommandDescription
/reflectProcess queued learnings with human review
/reflect --scan-historyScan ALL past sessions for missed learnings
/reflect --dry-runPreview changes without applying
/reflect --targetsShow detected config files (CLAUDE.md, AGENTS.md)
/reflect --reviewShow queue with confidence scores and decay status
/reflect --dedupeFind and consolidate similar entries in CLAUDE.md
/reflect --include-tool-errorsInclude tool execution errors in scan
/reflect-skillsDiscover skill candidates from repeating patterns
/reflect-skills --days NAnalyze last N days (default: 14)
/reflect-skills --project <path>Analyze specific project
/reflect-skills --all-projectsScan all projects for cross-project patterns
/reflect-skills --dry-runPreview patterns without generating skill files
/skip-reflectDiscard all queued learnings
/view-queueView pending learnings without processing

How It Works

claude-reflect in action

Two-Stage Process

Stage 1: Capture (Automatic)

Hooks run automatically to detect and queue corrections:

HookTriggerPurpose
session_start_reminder.pySession startShows pending learnings reminder
capture_learning.pyEvery promptDetects correction patterns and queues them
check_learnings.pyBefore compactionBacks up queue and informs user
post_commit_reminder.pyAfter git commitReminds to run /reflect after completing work

Stage 2: Process (Manual)

Run /reflect to review and apply queued learnings to CLAUDE.md.

Detection Methods

Claude-reflect uses a hybrid detection approach:

*1. Regex patterns (real-time capture)

...

Read full README

Publisher

bayramannakovbayramannakov

Statistics

Stars581
Forks34
Open Issues0
LicenseMIT License
CreatedJan 3, 2026