{"id":"72da7d14-2677-4935-858c-080e93c966f8","slug":"enhanced-claude","kind":"skill","name":"ENHANCED-CLAUDE","summary":"This is an experiment to supercharge CLAUDE CODE USING RLM PRINCIPLES (Auto skills, persistent memory and infinite input context window)","owner":"RohanRamanna","repoUrl":"https://github.com/RohanRamanna/ENHANCED-CLAUDE","license":"MIT","licenseTier":"permissive","trust":"community","stars":0,"match":null,"fewStars":true,"format":"skill","createdAt":"2026-01-18T16:26:19.000Z","addedAt":"2026-10-21T22:25:10.206Z","logoUrl":"https://avatars.githubusercontent.com/u/120951477?v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["memory-knowledge","developer-tools"],"tags":[],"runtime":"binary","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-23T22:24:04.673Z","sample":false,"url":"https://conduits.dev/tools/enhanced-claude","language":"Shell","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# Enhanced Claude\n\n**Self-Improving AI with Infinite Context and Auto-Learning Skills - Powered by Automatic Hooks**\n\n[![Status](https://img.shields.io/badge/status-fully_automatic-brightgreen)]()\n[![Systems](https://img.shields.io/badge/systems-5-blue)]()\n[![Hooks](https://img.shields.io/badge/hooks-9-purple)]()\n[![Skills](https://img.shields.io/badge/skills-18-orange)]()\n[![License](https://img.shields.io/badge/license-MIT-blue)]()\n\n## Overview\n\nThis repository transforms Claude Code into **Enhanced Claude** - a self-improving AI that:\n\n1. **Never forgets** - RLM-based session persistence with intelligent segment recovery\n2. **No limits** - Large inputs automatically detected, RLM workflow suggested\n3. **Self-improves** - Skills automatically matched, tracked, and learning moments detected\n4. **Searchable history** - Find past solutions without filling context\n\n**Everything is automatic via 9 Claude Code hooks.**\n\n## Quick Start\n\nInstall the systems you need:\n\n```bash\n# Clone the repo\ngit clone https://github.com/RohanRamanna/ENHANCED-CLAUDE.git\ncd ENHANCED-CLAUDE/installers\n\n# Install all systems (recommended)\n./system-a-session-persistence/install.sh\n./system-b-rlm/install.sh\n./system-c-auto-skills/install.sh\n\n# Or install just what you need\n./system-a-session-persistence/install.sh  # Session persistence only\n```\n\nAfter installation:\n1. Run `/hooks` in Claude Code to reload hooks\n2. Read the `INSTRUCTIONS.md` in each installer for CLAUDE.md configuration\n\n---\n\n## The Five Systems (All Automatic)\n\n| System | Hook | What It Does |\n|--------|------|-------------|\n| **Session Persistence** | `live-session-indexer.py` | Chunks live conversation into semantic segments |\n| | `session-recovery.py` | RLM-based intelligent recovery with segment scoring |\n| **RLM Detection** | `large-input-detector.py` | Auto-detects large inputs (>50K chars), suggests RLM workflow |\n| **Auto-Skills** | `skill-matcher.py` | Auto-matches skills to every user message |\n| | `skill-tracker.py` | Auto-tracks usage when SKILL.md files are read |\n| | `detect-learning.py` | Auto-detects trial-and-error, offers skill creation |\n| **Searchable History** | `history-indexer.py` | Indexes conversations on session end |\n| | `history-search.py` | Suggests relevant past sessions |\n| **Skills Library** | Manual | 18 skills invoked via `/skill-name` |\n\n---\n\n## The Hooks System\n\nAll automation is powered by **9 Python hooks** in `~/.claude/hooks/`:\n\n```\n~/.claude/hooks/\n├── skill-matcher.py          # Every message: suggests matching skills\n├── large-input-detector.py   # Every message: detects large inputs\n├── history-search.py         # Every message: suggests relevant past work\n├── learning-moment-pickup.py # Every message: picks up pending learning moments\n├── skill-tracker.py          # After Read: tracks skill usage\n├── detect-learning.py        # Before stop: detects learning moments, saves to file\n├── history-indexer.py        # Before stop: indexes conversation history\n├── live-session-indexer.py   # Before stop: chunks session into segments\n└── session-recovery.py       # After compact: RLM-based intelligent recovery\n```\n\n### Hook Events\n\n| Event | When | Hook | Action |\n|-------|------|------|--------|\n| `UserPromptSubmit` | Every message | `skill-matcher.py` | Match skills, suggest if score ≥10 |\n| `UserPromptSubmit` | Every message | `large-input-detector.py` | Detect >50K chars, suggest RLM |\n| `UserPromptSubmit` | Every message | `history-search.py` | Suggest relevant past sessions |\n| `UserPromptSubmit` | Every message | `learning-moment-pickup.py` | Pick up pending learning moments |\n| `PostToolUse` | After Read | `skill-tracker.py` | Track SKILL.md reads |\n| `Stop` | Before finish | `detect-learning.py` | Detect 3+ failures, save for pickup |\n| `Stop` | Before finish | `history-indexer.py` | Update searchable history index |\n| `Stop` | Before finish | `live-session-indexer.py` | Chunk conversation into segments |\n| `SessionStart` | After /compact | `session-recovery.py` | RLM-based intelligent context recovery |\n\n---\n\n## What Happens Automatically\n\n| You Do This | Claude Gets This |\n|-------------|------------------|\n| Send any message | `[SKILL MATCH]` if relevant skill exists |\n| Send any message | `[HISTORY MATCH]` if relevant past work exists |\n| Paste >50K chars | `[LARGE INPUT DETECTED - RLM RECOMMENDED]` |\n| Context compacts | Persistence files + relevant conversation segments (RLM-based) |\n| Claude finishes responding | Live session chunked into semantic segments |\n| Claude finishes responding | History index updated |\n| Solve via trial-and-error | `[LEARNING MOMENT DETECTED]` with skill creation offer |\n| Read a SKILL.md | Usage count and lastUsed updated |\n\n---\n\n## Skills Library (18 Skills)\n\n| Category | Skills |\n|----------|--------|\n| **Meta** (9) | skill-index, skill-matcher, skill-loader, skill-tracker, skill-creator, skill-updater, skill-improver, skill-validator, skill-health |\n| **Setup** (2) | deno2-http-kv-server, hono-bun-sqlite-api |\n| **API** (1) | llm-api-tool-use |\n| **Utility** (3) | markdown-to-pdf, history, rlm |\n| **Workflow** (1) | udcp |\n| **Development** (1) | hook-development |\n| **Fallback** (1) | web-research |\n\n**Usage**: Skills are auto-suggested, or invoke manually with `/skill-name`\n\n---\n\n## RLM: Infinite Context\n\nBased on MIT CSAIL's paper [arXiv:2512.24601v1](https://arxiv.org/abs/2512.24601).\n\nWhen `large-input-detector.py` suggests RLM:\n\n```bash\n# 1. Probe structure\npython rlm_tools/probe.py input.txt\n\n# 2. Chunk\npython rlm_tools/chunk.py input.txt --output rlm_context/chunks/\n\n# 3. Process with Task subagents (Claude does this)\n\n# 4. Aggregate\npython rlm_tools/aggregate.py rlm_context/results/\n```\n\n### Verified Results\n\n| Test | Size | Result |\n|------|------|--------|\n| 8-Book Corpus | 4.86M chars (~1.2M tokens) | ✅ Verified via grep |\n| FastAPI Codebase | 3.68M chars (~920K tokens) | ✅ Verified via grep |\n| Session Recovery | 3 segments, ~2K tokens | ✅ Verified via /compact |\n\n---\n\n## Session Persistence (RLM-Based)\n\nThree files that persist across context compaction, plus intelligent segment recovery:\n\n| Component | Purpose |\n|-----------|---------|\n| `context.md` | Current goal, key decisions |\n| `todos.md` | Task progress tracking |\n| `insights.md` | Accumulated learnings |\n| `segments.json` | Live session chunks with scoring |\n\n**After compaction**:\n1. `live-session-indexer.py` has already chunked conversation into semantic segments\n2. `session-recovery.py` loads persistence files + scores and retrieves the most relevant segments\n3. Claude sees actual conversation excerpts, not just summaries - **zero data loss**\n\n---\n\n## Repository Structure\n\n```\nPERSISTANT MEMORY/\n├── CLAUDE.md              # Main guidance (hooks, systems, reference)\n├── context.md             # Session persistence: current goal\n├── todos.md               # Session persistence: task tracking\n├── insights.md            # Session persistence: learnings\n├── skills/                # Skills library (18 skills)\n│   └── */SKILL.md\n├── rlm_tools/             # RLM processing tools\n│   ├── probe.py           # Analyze structure\n│   ├── chunk.py           # Split files (semantic code chunking, progress tracking)\n│   ├── aggregate.py       # Combine results\n│   ├── parallel_process.py # Parallel processing coordination\n│   └── sandbox.py         # Safe execution\n├── rlm_context/           # RLM working directory\n├── docs/\n│   ├── HOW_TO_USE.md      # Complete guide\n│   └── VERIFIED_TEST_RESULTS.md\n└── requirements.txt\n\n~/.claude/                 # User-level Claude Code config\n├── settings.json          # Hook configuration (9 hooks)\n├── hooks/                 # The 8 automation hooks + shared utilities\n│   ├── hook_logger.py     # Shared logging utility\n│   ├── skill-matcher.py\n│   ├── large-input-detector.py\n│   ├── history-search.py\n│   ├── skill-tracker.py\n│   ├── detect-learning.py\n│   ├── history-indexer.py\n│   ├── live-session-indexer.py\n│   └── session-recovery.py\n├── sessions/              # Live session segment indexes\n│   └── <session-id>/segments.json\n├── history/               # Searchable history index\n│   └── index.json\n└── skills/                # Skills library\n```\n\n---\n\n## Installation\n\n### Modular Installers\n\nInstall systems independently:\n\n```\ninstallers/\n├── system-a-session-persistence/   # Session Persistence & Searchable History\n│   ├── install.sh / install.bat    # Installers\n│   ├── uninstall.sh / uninstall.bat\n│   └── INSTRUCTIONS.md             # Claude instructions for setup\n├── system-b-rlm/                   # RLM Detection & Processing\n│   └── ...\n└── system-c-auto-skills/           # Auto Skills & Skills Library\n    └── ...\n```\n\n**macOS/Linux:**\n```bash\ncd /path/to/your/project\n/path/to/installers/system-a-session-persistence/install.sh\n```\n\n**Windows:**\n```cmd\ncd \\path\\to\\your\\project\n\\path\\to\\installers\\system-a-session-persistence\\install.bat\n```\n\n### What Each System Installs\n\n| System | Hooks | Skills | Template Files | Features |\n|--------|-------|--------|----------------|----------|\n| **A: Session Persistence** | 5 | 1 (history) | context.md, todos.md, insights.md | Context recovery, searchable history |\n| **B: RLM Detection** | 2 | 1 (rlm) | - | Large input detection, RLM tools |\n| **C: Auto Skills** | 5 | 18 | - | Skill matching, learning detection |\n\nEach installer includes an `INSTRUCTIONS.md` with:\n- Installation commands for macOS/Linux and Windows\n- CLAUDE.md configuration (copy-paste ready)\n- Verification steps\n\n### Install All Systems\n\n```bash\n# macOS/Linux\n./installers/system-a-session-persistence/install.sh\n./installers/system-b-rlm/install.sh\n./installers/system-c-auto-skills/install.sh\n```\n\n```cmd\n:: Windows\ninstallers\\system-a-session-persistence\\install.bat\ninstallers\\system-b-rlm\\install.bat\ninstallers\\system-c-auto-skills\\install.bat\n```\n\n### After Installation\n\n1. Run `/hooks` in Claude Code to reload hooks\n2. Read each system's `INSTRUCTIONS.md` for CLAUDE.md configuration\n3. See `installers/TESTING.md` for verification steps\n\n---\n\n## Inspiration & References\n\n### Original Idea: Dylan Davis\n\nThe 3-file persistence system (`context.md`, `todos.md`, `insights.md`) was inspired by [Dylan Davis's video on Claude Code persistent memory](https://youtu.be/H-uwnpmziGA?si=VGerxvUFGksgMtBX).\n\nWe extended this idea by applying RLM (Recursive Language Model) principles to conversation history, enabling intelligent segment-based recovery after context compaction.\n\n### RLM Research Paper\n\n```bibtex\n@article{zhang2025rlm,\n  title={Recursive Language Models},\n  author={Zhang, Alex L. and Kraska, Tim and Khattab, Omar},\n  journal={arXiv preprint arXiv:2512.24601},\n  year={2025}\n}\n```\n\n## License\n\nMIT\n"}