Claude-reflect-system reflect
install
source · Clone the upstream repo
git clone https://github.com/haddock-development/claude-reflect-system
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/haddock-development/claude-reflect-system "$T" && mkdir -p ~/.claude/skills && cp -r "$T/reflect" ~/.claude/skills/haddock-development-claude-reflect-system-reflect && rm -rf "$T"
manifest:
reflect/SKILL.mdsource content
Reflect - Self-Improving Skills
Overview
This skill enables Claude Code to learn from conversations by analyzing corrections, approvals, and patterns, then proposing updates to relevant skills. It implements a "correct once, never again" learning system.
Usage Modes
1. Manual Reflection (/reflect)
Trigger analysis of the current conversation:
/reflect [skill-name]
- Without skill-name: Analyzes all skills used in conversation
- With skill-name: Focuses on specific skill
2. Automatic Reflection
When enabled via
/reflect-on, runs automatically at session end via Stop hook.
3. Toggle Commands
- Enable automatic reflection/reflect-on
- Disable automatic reflection/reflect-off
- Show current configuration/reflect-status
Confidence Levels
HIGH - Explicit corrections:
- User contradicts Claude's approach with specific alternative
- Pattern: "Don't do X, do Y instead"
- Action: Direct updates with deprecation warnings
MEDIUM - Approvals and patterns:
- User approves specific approach
- Pattern succeeds multiple times
- Action: Add to "Best Practices" section
LOW - Observations:
- User questions or suggests alternatives
- Pattern: "Have you considered..." or "Why not try..."
- Action: Add to "Considerations" section
Workflow
- Signal Detection - Scan transcript for corrections/patterns
- Context Analysis - Extract 5-message context around signals
- Skill Mapping - Match signals to relevant skills
- Change Proposal - Generate diff of proposed updates
- User Review - Interactive approval with natural language editing
- Application - Safe YAML/markdown updates with backups
- Git Commit - Automatic commit with descriptive message
Scripts
Core Engine
- Main orchestration logicscripts/reflect.py
- Pattern detection enginescripts/extract_signals.py
- Safe skill file updatesscripts/update_skill.py
- Interactive review interfacescripts/present_review.py
Automation
- Stop hook integrationscripts/hook-stop.sh
- Enable auto-reflectionscripts/toggle-on.sh
- Disable auto-reflectionscripts/toggle-off.sh
- Show statusscripts/toggle-status.sh
Safety Features
- Timestamped backups before all edits
- YAML validation before writing
- Lock files prevent concurrent runs
- Graceful error handling with rollback
- Git status checks before commits
References
See
references/signal-patterns.md for detailed pattern library.