[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-74308":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":15,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":16,"starSnapshotCount":16,"syncStatus":34,"lastSyncTime":35,"discoverSource":36},74308,"claude-reflect","BayramAnnakov\u002Fclaude-reflect","BayramAnnakov","A self-learning system for Claude Code that captures corrections, positive feedback, and preferences — then syncs them to CLAUDE.md and AGENTS.md.","",null,"Python",1056,93,5,7,0,1,30,3,62.42,"MIT License",false,"main",true,[26,27,28,29,30],"claude-code","claude-skills","memory","productivity","self-learning","2026-06-12 04:01:14","# claude-reflect\n\n[![GitHub stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002FBayramAnnakov\u002Fclaude-reflect?style=flat-square)](https:\u002F\u002Fgithub.com\u002FBayramAnnakov\u002Fclaude-reflect\u002Fstargazers)\n[![Version](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fversion-2.6.0-blue?style=flat-square)](https:\u002F\u002Fgithub.com\u002FBayramAnnakov\u002Fclaude-reflect\u002Freleases)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-green?style=flat-square)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n[![Tests](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Ftests-160%20passing-brightgreen?style=flat-square)](https:\u002F\u002Fgithub.com\u002FBayramAnnakov\u002Fclaude-reflect\u002Factions)\n[![Platform](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fplatform-macOS%20%7C%20Linux%20%7C%20Windows-lightgrey?style=flat-square)](https:\u002F\u002Fgithub.com\u002FBayramAnnakov\u002Fclaude-reflect#platform-support)\n\nA self-learning system for Claude Code that captures corrections and discovers workflow patterns — turning them into permanent memory and reusable skills.\n\n## What it does\n\n### 1. Learn from Corrections\n\nWhen you correct Claude (\"no, use gpt-5.1 not gpt-5\"), it remembers forever.\n\n```\n┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐\n│  You correct    │ ──► │  Hook captures  │ ──► │  \u002Freflect adds  │\n│  Claude Code    │     │  to queue       │     │  to CLAUDE.md   │\n└─────────────────┘     └─────────────────┘     └─────────────────┘\n      (automatic)            (automatic)            (manual review)\n```\n\n### 2. Discover Workflow Patterns (NEW in v2)\n\nAnalyzes your session history to find repeating tasks that could become reusable commands.\n\n```\n┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐\n│  Your past      │ ──► │ \u002Freflect-skills │ ──► │   Generates     │\n│  sessions       │     │ finds patterns  │     │   \u002Fcommands     │\n└─────────────────┘     └─────────────────┘     └─────────────────┘\n    (68 sessions)         (AI-powered)            (you approve)\n```\n\nExample: You've asked \"review my productivity\" 12 times → suggests creating `\u002Fdaily-review`\n\n## Key Features\n\n| Feature | What it does |\n|---------|--------------|\n| **Permanent Memory** | Corrections sync to CLAUDE.md — Claude remembers across sessions |\n| **Skill Discovery** | Finds repeating patterns in your history → generates commands |\n| **Multi-language** | AI understands corrections in any language |\n| **Skill Improvement** | Corrections during `\u002Fdeploy` improve the deploy skill itself |\n\n## Installation\n\n```bash\n# Add the marketplace\nclaude plugin marketplace add bayramannakov\u002Fclaude-reflect\n\n# Install the plugin\nclaude plugin install claude-reflect@claude-reflect-marketplace\n\n# IMPORTANT: Restart Claude Code to activate the plugin\n```\n\nAfter installation, **restart Claude Code** (exit and reopen). Then hooks auto-configure and commands are ready.\n\n> **First run?** When you run `\u002Freflect` for the first time, you'll be prompted to scan your past sessions for learnings.\n\n### Prerequisites\n\n- [Claude Code](https:\u002F\u002Fclaude.ai\u002Fcode) CLI installed\n- Python 3.6+ (included on most systems)\n\n### Platform Support\n\n- **macOS**: Fully supported\n- **Linux**: Fully supported\n- **Windows**: Fully supported (native Python, no WSL required)\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| `\u002Freflect` | Process queued learnings with human review |\n| `\u002Freflect --scan-history` | Scan ALL past sessions for missed learnings |\n| `\u002Freflect --dry-run` | Preview changes without applying |\n| `\u002Freflect --targets` | Show detected config files (CLAUDE.md, AGENTS.md) |\n| `\u002Freflect --review` | Show queue with confidence scores and decay status |\n| `\u002Freflect --dedupe` | Find and consolidate similar entries in CLAUDE.md |\n| `\u002Freflect --include-tool-errors` | Include tool execution errors in scan |\n| `\u002Freflect-skills` | Discover skill candidates from repeating patterns |\n| `\u002Freflect-skills --days N` | Analyze last N days (default: 14) |\n| `\u002Freflect-skills --project \u003Cpath>` | Analyze specific project |\n| `\u002Freflect-skills --all-projects` | Scan all projects for cross-project patterns |\n| `\u002Freflect-skills --dry-run` | Preview patterns without generating skill files |\n| `\u002Fskip-reflect` | Discard all queued learnings |\n| `\u002Fview-queue` | View pending learnings without processing |\n\n## How It Works\n\n![claude-reflect in action](assets\u002Freflect-demo.jpg)\n\n### Two-Stage Process\n\n**Stage 1: Capture (Automatic)**\n\nHooks run automatically to detect and queue corrections:\n\n| Hook | Trigger | Purpose |\n|------|---------|---------|\n| `session_start_reminder.py` | Session start | Shows pending learnings reminder |\n| `capture_learning.py` | Every prompt | Detects correction patterns and queues them |\n| `check_learnings.py` | Before compaction | Backs up queue and informs user |\n| `post_commit_reminder.py` | After git commit | Reminds to run \u002Freflect after completing work |\n\n**Stage 2: Process (Manual)**\n\nRun `\u002Freflect` to review and apply queued learnings to CLAUDE.md.\n\n### Detection Methods\n\nClaude-reflect uses a **hybrid detection approach**:\n\n**1. Regex patterns (real-time capture)**\n\nFast pattern matching during sessions detects:\n\n- **Corrections**: `\"no, use X\"` \u002F `\"don't use Y\"` \u002F `\"actually...\"` \u002F `\"that's wrong\"`\n- **Positive feedback**: `\"Perfect!\"` \u002F `\"Exactly right\"` \u002F `\"Great approach\"`\n- **Explicit markers**: `\"remember:\"` — highest confidence\n\n**2. Semantic AI validation (during \u002Freflect)**\n\nWhen you run `\u002Freflect`, an AI-powered semantic filter:\n- **Multi-language support** — understands corrections in any language\n- **Better accuracy** — filters out false positives from regex\n- **Cleaner learnings** — extracts concise, actionable statements\n\nExample: A Spanish correction like `\"no, usa Python\"` is correctly detected even though it doesn't match English patterns.\n\nEach captured learning has a **confidence score** (0.60-0.95). The final score is the higher of regex and semantic confidence.\n\n### Human Review\n\nWhen you run `\u002Freflect`, Claude presents a summary table with options:\n- **Apply** - Accept the learning and add to CLAUDE.md\n- **Edit before applying** - Modify the learning text first\n- **Skip** - Don't apply this learning\n\n### Multi-Target Sync\n\nApproved learnings are synced to:\n- `~\u002F.claude\u002FCLAUDE.md` (global - applies to all projects)\n- `.\u002FCLAUDE.md` (project-specific)\n- `.\u002F**\u002FCLAUDE.md` (subdirectories - auto-discovered)\n- `.\u002F.claude\u002Fcommands\u002F*.md` (skill files - when correction relates to a skill)\n- `AGENTS.md` (if exists - works with Codex, Cursor, Aider, Jules, Zed, Factory)\n\nRun `\u002Freflect --targets` to see which files will be updated.\n\n### Skill Discovery\n\nRun `\u002Freflect-skills` to discover repeating patterns in your sessions that could become reusable skills:\n\n```\n\u002Freflect-skills                 # Analyze current project (last 14 days)\n\u002Freflect-skills --days 30       # Analyze last 30 days\n\u002Freflect-skills --all-projects  # Analyze all projects (slower)\n\u002Freflect-skills --dry-run       # Preview patterns without generating files\n```\n\n**Features:**\n- **AI-powered detection** — uses reasoning, not regex, to find patterns\n- **Semantic similarity** — detects same intent across different phrasings\n- **Project-aware** — groups patterns by project, suggests correct location\n- **Smart assignment** — asks where each skill should go (project vs global)\n- **Generates skill files** — creates draft skills in `.claude\u002Fcommands\u002F`\n\n**How it works:**\n\nThe skill discovers patterns by analyzing your session history semantically. Different phrasings of the same intent are recognized:\n\n```\nSession 1: \"review my productivity for today\"\nSession 2: \"how was my focus this afternoon?\"\nSession 3: \"check my ActivityWatch data\"\nSession 4: \"evaluate my work hours\"\n```\n\nClaude reasons: *\"These 4 requests have the same intent - reviewing productivity data. The workflow is: fetch time tracking data → categorize activities → calculate focus score. This is a strong candidate for \u002Fdaily-review.\"*\n\n**Example output:**\n```\n════════════════════════════════════════════════════════════\nSKILL CANDIDATES DISCOVERED\n════════════════════════════════════════════════════════════\n\nFound 2 potential skills from analyzing 68 sessions:\n\n1. \u002Fdaily-review (High) — from my-productivity-tools\n   → Review productivity using time tracking data\n   Evidence: 15 similar requests\n   Corrections learned: \"use local timezone\", \"chat apps can be work\"\n\n2. \u002Fdeploy-app (High) — from my-webapp\n   → Deploy application with pre-flight checks\n   Evidence: 10 similar requests\n   Corrections learned: \"always run tests first\"\n\n════════════════════════════════════════════════════════════\n\nWhich skills should I generate?\n> [1] \u002Fdaily-review, [2] \u002Fdeploy-app\n\nWhere should each skill be created?\n┌──────────────────────┬─────────────────────────┐\n│ \u002Fdaily-review        │ my-productivity-tools   │\n│ \u002Fdeploy-app          │ my-webapp               │\n└──────────────────────┴─────────────────────────┘\n\nSkills created:\n  ~\u002Fprojects\u002Fmy-productivity-tools\u002F.claude\u002Fcommands\u002Fdaily-review.md\n  ~\u002Fprojects\u002Fmy-webapp\u002F.claude\u002Fcommands\u002Fdeploy-app.md\n```\n\n**Generated skill file example:**\n\n```markdown\n---\ndescription: Deploy application with pre-flight checks\nallowed-tools: Bash, Read, Write\n---\n\n## Context\nDeployment scripts in .\u002Fscripts\u002Fdeploy\u002F\n\n## Your Task\nDeploy the application to the specified environment.\n\n### Steps\n1. Run test suite\n2. Build production assets\n3. Deploy to target environment\n4. Verify deployment health\n\n### Guardrails\n- Always run tests before deploying\n- Never deploy to production on Fridays\n- Check for pending migrations\n\n---\n*Generated by \u002Freflect-skills from 10 session patterns*\n```\n\n### Skill Improvement Routing\n\nWhen you correct Claude while using a skill (e.g., `\u002Fdeploy`), the correction can be routed back to the skill file itself:\n\n```\nUser: \u002Fdeploy\nClaude: [deploys without running tests]\nUser: \"no, always run tests before deploying\"\n\n→ \u002Freflect detects this relates to \u002Fdeploy\n→ Offers to add learning to .claude\u002Fcommands\u002Fdeploy.md\n→ Skill file updated with new step\n```\n\nThis makes skills smarter over time, not just CLAUDE.md.\n\n## Upgrading\n\n### From v2.0.x or earlier\n\nIf you see errors like \"Duplicate hooks file detected\" or \"No such file or directory\" after updating, you need to clear the plugin cache. This is due to known Claude Code caching issues:\n- [#14061](https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-code\u002Fissues\u002F14061) - `\u002Fplugin update` doesn't invalidate cache\n- [#15369](https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-code\u002Fissues\u002F15369) - Uninstall doesn't clear cached files\n\n```bash\n# 1. Uninstall the plugin\nclaude plugin uninstall claude-reflect@claude-reflect-marketplace\n\n# 2. Clear both caches (required!)\nrm -rf ~\u002F.claude\u002Fplugins\u002Fmarketplaces\u002Fclaude-reflect-marketplace\nrm -rf ~\u002F.claude\u002Fplugins\u002Fcache\u002Fclaude-reflect-marketplace\n\n# 3. Exit Claude Code completely (restart terminal or close app)\n\n# 4. Reinstall\nclaude plugin install claude-reflect@claude-reflect-marketplace\n```\n\n### Standard Update\n\nFor normal updates (when no cache issues):\n\n```bash\n# Use the \u002Fplugin menu in Claude Code\n\u002Fplugin\n# Select \"Update now\" for claude-reflect\n```\n\n## Uninstall\n\n```bash\nclaude plugin uninstall claude-reflect@claude-reflect-marketplace\n```\n\n## File Structure\n\n```\nclaude-reflect\u002F\n├── .claude-plugin\u002F\n│   └── plugin.json         # Plugin manifest (auto-registers hooks)\n├── commands\u002F\n│   ├── reflect.md          # Main command\n│   ├── reflect-skills.md   # Skill discovery\n│   ├── skip-reflect.md     # Discard queue\n│   └── view-queue.md       # View queue\n├── hooks\u002F\n│   └── hooks.json          # Auto-configured when plugin installed\n├── scripts\u002F\n│   ├── lib\u002F\n│   │   ├── reflect_utils.py      # Shared utilities\n│   │   └── semantic_detector.py  # AI-powered semantic analysis\n│   ├── capture_learning.py       # Hook: detect corrections\n│   ├── check_learnings.py        # Hook: pre-compact check\n│   ├── post_commit_reminder.py   # Hook: post-commit reminder\n│   ├── compare_detection.py      # Compare regex vs semantic detection\n│   ├── extract_session_learnings.py\n│   ├── extract_tool_errors.py\n│   ├── extract_tool_rejections.py\n│   └── legacy\u002F                   # Bash scripts (deprecated)\n├── tests\u002F                  # Test suite\n└── SKILL.md                # Skill context for Claude\n```\n\n## Features\n\n### Historical Scan\n\nFirst time using claude-reflect? Run:\n\n```bash\n\u002Freflect --scan-history\n```\n\nThis scans all your past sessions for corrections you made, so you don't lose learnings from before installation.\n\n### Smart Filtering\n\nClaude filters out:\n- Questions (not corrections)\n- One-time task instructions\n- Context-specific requests\n- Vague\u002Fnon-actionable feedback\n\nOnly reusable learnings are kept.\n\n### Duplicate Detection\n\nBefore adding a learning, existing CLAUDE.md content is checked. If similar content exists, you can:\n- Merge with existing entry\n- Replace the old entry\n- Skip the duplicate\n\n### Semantic Deduplication\n\nOver time, CLAUDE.md can accumulate similar entries. Run `\u002Freflect --dedupe` to:\n- Find semantically similar entries (even with different wording)\n- Propose consolidated versions\n- Clean up redundant learnings\n\nExample:\n```\nBefore:\n  - Use gpt-5.1 for complex tasks\n  - Prefer gpt-5.1 for reasoning\n  - gpt-5.1 is better for hard problems\n\nAfter:\n  - Use gpt-5.1 for complex reasoning tasks\n```\n\n## Tips\n\n1. **Use explicit markers** for important learnings:\n   ```\n   remember: always use venv for Python projects\n   ```\n\n2. **Run \u002Freflect after git commits** - The hook reminds you, but make it a habit\n\n3. **Historical scan on new machines** - When setting up a new dev environment:\n   ```\n   \u002Freflect --scan-history --days 90\n   ```\n\n4. **Project vs Global** - Model names and general patterns go global; project-specific conventions stay in project CLAUDE.md\n\n5. **Discover skills monthly** - Run `\u002Freflect-skills --days 30` monthly to find automation opportunities you might have missed\n\n6. **Skills get smarter** - When you correct Claude during a skill, that correction can be routed back to the skill file itself via `\u002Freflect`\n\n7. **Extend session retention** - Claude Code deletes local sessions after 30 days by default. Since claude-reflect relies on session history for `\u002Freflect --scan-history` and `\u002Freflect-skills`, extend this in `~\u002F.claude\u002Fsettings.json`:\n   ```json\n   { \"cleanupPeriodDays\": 99999 }\n   ```\n\n## Contributing\n\nPull requests welcome! Please read the contributing guidelines first.\n\n## License\n\nMIT\n","claude-reflect 是一个用于 Claude Code 的自学习系统，能够捕捉更正、积极反馈和偏好，并将这些信息同步到 CLAUDE.md 和 AGENTS.md 中。其核心功能包括永久记忆（通过将更正同步到 CLAUDE.md 以实现跨会话记忆）和技能发现（分析会话历史记录以找出重复任务并生成可复用命令）。此外，该系统支持多语言输入，并能根据用户在特定命令如 `\u002Fdeploy` 中的更正来改进相应技能。适用于需要提高编程效率、自动化常见任务以及希望持续优化开发流程的开发者。",2,"2026-06-11 03:49:54","high_star"]