無料GitHub で公開
claude-reflect
Self-learning system that captures corrections during sessions and reminds users to run /reflect to update CLAUDE.md. Use when discussing learnings, corrections, or when the user mentions remembering something for future sessions.
含まれるファイル(51)
- SKILL.md2.4 KB
- .claude-plugin/marketplace.json590 B
- .claude-plugin/plugin.json481 B
- .github/FUNDING.yml22 B
- .github/workflows/test.yml1010 B
- .gitignore122 B
- assets/reflect-demo.jpg80.1 KB
- assets/reflect-mod-band.png38.0 KB
- BACKLOG.md10.1 KB
- CHANGELOG.md17.7 KB
- CLAUDE.md7.6 KB
- commands/reflect-skills.md12.6 KB
- commands/reflect.md63.7 KB
- commands/skip-reflect.md997 B
- commands/view-queue.md4.3 KB
- DISTRIBUTION.md10.2 KB
- hooks/hooks.json990 B
- LICENSE1.0 KB
- mod/.claude-plugin/plugin.json461 B
- mod/hooks/hooks.json34 B
- mod/hooks/reflect.test.tsx10.7 KB
- mod/hooks/register.tsx17.3 KB
- mod/README.md4.0 KB
- mod/types/index.d.ts956 B
- README.md17.9 KB
- RELEASING.md1.0 KB
- scripts/capture_learning.py3.6 KB
- scripts/check_learnings.py1.5 KB
- scripts/clear_queue.py704 B
- scripts/compare_detection.py14.0 KB
- scripts/extract_session_learnings.py1.1 KB
- scripts/extract_tool_errors.py5.1 KB
- scripts/extract_tool_rejections.py1.0 KB
- scripts/legacy/capture-learning.sh5.2 KB
- scripts/legacy/check-learnings.sh741 B
- scripts/legacy/extract-session-learnings.sh1.4 KB
- scripts/legacy/extract-tool-rejections.sh1.0 KB
- scripts/legacy/post-commit-reminder.sh1.1 KB
- scripts/lib/__init__.py39 B
- scripts/lib/reflect_utils.py73.8 KB
- scripts/lib/semantic_detector.py17.4 KB
- scripts/post_commit_reminder.py1.7 KB
- scripts/project_paths.py2.2 KB
- scripts/read_queue.py291 B
- scripts/session_start_reminder.py2.0 KB
- tests/__init__.py47 B
- tests/test_integration.py17.3 KB
- tests/test_memory_hierarchy.py60.0 KB
- tests/test_reflect_utils.py53.8 KB
- tests/test_semantic_detector.py25.9 KB
- tests/test_tool_errors.py12.0 KB
SKILL.md(原文)
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Claude Reflect - Self-Learning System
A two-stage system that helps Claude Code learn from user corrections.
How It Works
Stage 1: Capture (Automatic)
Hooks detect correction patterns ("no, use X", "actually...", "use X not Y") and queue them to ~/.claude/learnings-queue.json.
Stage 2: Process (Manual)
User runs /reflect to review and apply queued learnings to CLAUDE.md files.
Available Commands
| Command | Purpose |
|---|---|
/reflect | Process queued learnings with human review |
/reflect --scan-history | Scan past sessions for missed learnings |
/reflect --dry-run | Preview changes without applying |
/reflect-skills | Discover skill candidates from repeating patterns |
/skip-reflect | Discard all queued learnings |
/view-queue | View pending learnings without processing |
When to Remind Users
Remind users about /reflect when:
- They complete a feature or meaningful work unit
- They make corrections you should remember for future sessions
- They explicitly say "remember this" or similar
- Context is about to compact and queue has items
Correction Detection Patterns
High-confidence corrections:
- Tool rejections (user stops an action with guidance)
- "no, use X" / "don't use Y"
- "actually..." / "I meant..."
- "use X not Y" / "X instead of Y"
- "remember:" (explicit marker)
Learning Destinations
~/.claude/CLAUDE.md- Global learnings (model names, general patterns)./CLAUDE.md- Project-specific learnings (conventions, tools, structure)./CLAUDE.local.md- Personal learnings (machine-specific, gitignored)./.claude/rules/*.md- Modular rules with optional path-scoping~/.claude/rules/*.md- Global modular rules~/.claude/projects/<project>/memory/*.md- Auto memory (low-confidence, exploratory)commands/*.md- Skill improvements (corrections during skill execution)
Example Interaction
User: no, use gpt-5.1 not gpt-5 for reasoning tasks
Claude: Got it, I'll use gpt-5.1 for reasoning tasks.
[Hook captures this correction to queue]
User: /reflect
Claude: Found 1 learning queued. "Use gpt-5.1 for reasoning tasks"
Scope: global
Apply to ~/.claude/CLAUDE.md? [y/n]
レビュー
まだレビューはありません。使ってみた感想をお寄せください。