Persistent memory for Claude Code. Also: loop detection, scope guards, code analysis, and a local LLM for second opinions. Claude Code forgets everything between sessions and after context compaction. Mini Claude provides: - Checkpoints - Save task state, auto-restore after compaction - Mistake memory - Log errors, get warned next time you touch that file - Decision memory - Log WHY you chose some
Add this skill
npx mdskills install 20alexl/mini-claudeComprehensive memory and code analysis toolkit with well-documented tools and clear setup instructions
1# Mini Claude23Persistent memory for Claude Code. Also: loop detection, scope guards, code analysis, and a local LLM for second opinions.45## What It Does67Claude Code forgets everything between sessions and after context compaction. Mini Claude provides:89- **Checkpoints** - Save task state, auto-restore after compaction10- **Mistake memory** - Log errors, get warned next time you touch that file11- **Decision memory** - Log WHY you chose something12- **Loop detection** - Warns when editing same file 3+ times (death spiral)13- **Scope guards** - Declare allowed files, prevent over-refactoring14- **Impact analysis** - See what depends on a file before changing it15- **Convention storage** - Store project rules, check code against them1617Runs locally with Ollama for semantic search and code analysis. No cloud, no API costs.1819## Install2021### Requirements2223- Python 3.10+24- [Ollama](https://ollama.ai) with `qwen2.5-coder:7b`25- Claude Code (VSCode extension or CLI)2627### Steps2829```bash30# 1. Install Ollama and pull model31ollama pull qwen2.5-coder:7b3233# 2. Clone and install34git clone https://github.com/20alexl/mini_claude.git35cd mini_claude36python -m venv venv3738# Linux/Mac39source venv/bin/activate4041# Windows (PowerShell)42.\venv\Scripts\Activate.ps143# Windows (cmd)44venv\Scripts\activate.bat4546pip install -e mini_claude/4748# 3. Run installer49python install.py50```5152The installer creates launcher scripts and MCP configuration.5354**Don't delete the venv folder** - VSCode runs Mini Claude from it.5556## Setup Per Project5758**Option 1: Use the installer**59```bash60python install.py --setup /path/to/your/project61```6263**Option 2: Copy manually**64- Copy `.mcp.json` to your project root (required - tells VSCode where the MCP server is)65- Copy [`CLAUDE.md`](CLAUDE.md) to your project root (tells Claude how to use Mini Claude)6667## Auto-Tracking6869Mini Claude automatically tracks without you needing to call tools:7071| What | How |72|------|---------|73| **Edits** | Auto-logged after each Edit/Write. Shows "Edit tracked: file.py (edit #3)" |74| **Tests** | Auto-logged after pytest/npm test. Shows "PASS/FAIL Test tracked" |75| **Mistakes** | Auto-detected from common error patterns in failed commands |7677Parallel LLM requests are automatically queued to prevent GPU contention.7879## Tools8081### Session Management8283| Tool | Purpose |84|------|---------|85| `session_start` | Load memories, mistakes, checkpoint, last session context |86| `session_end` | Optional - shows session summary (memories auto-save) |87| `pre_edit_check` | Check mistakes, loops, scope before editing |8889### Memory & Work Tracking9091| Tool | Purpose |92|------|---------|93| `memory(remember/search/clusters)` | Store and find discoveries |94| `work(log_mistake)` | Record error + how to avoid |95| `work(log_decision)` | Record choice + reasoning |9697### Context Protection9899| Tool | Purpose |100|------|---------|101| `context(checkpoint_save)` | Save task state for compaction survival |102| `context(checkpoint_restore)` | Restore after compaction |103| `context(verify_completion)` | Verify task is actually done |104105### Scope & Loop Detection106107| Tool | Purpose |108|------|---------|109| `scope(declare)` | Set allowed files for task |110| `scope(check)` | Verify file is in scope |111| `loop(check)` | Check if editing too much |112113### Code Analysis114115| Tool | Purpose |116|------|---------|117| `impact_analyze` | What depends on this file |118| `deps_map` | Map imports/dependencies |119| `scout_search` | Semantic codebase search (reads actual code) |120| `scout_analyze` | Analyze code snippet with LLM |121| `file_summarize` | Quick file purpose summary |122| `code_quality_check` | Detect AI slop |123| `audit_batch` | Audit multiple files |124| `find_similar_issues` | Find bug patterns |125126### Conventions127128| Tool | Purpose |129|------|---------|130| `convention(add)` | Store project rule |131| `convention(check)` | Check code against rules |132| `code_pattern_check` | Check against conventions with LLM |133134### Validation135136| Tool | Purpose |137|------|---------|138| `output(validate_code)` | Check for silent failures |139140## Configuration141142```bash143# Different model144export MINI_CLAUDE_MODEL="qwen2.5-coder:14b"145146# Remote Ollama147export MINI_CLAUDE_OLLAMA_URL="http://192.168.1.100:11434"148```149150## Troubleshooting151152### MCP Server Not Connecting1531541. Check Ollama is running: `ollama list`1552. Restart VSCode1563. Check Claude Code → MCP Servers status157158### Ollama Not Running159160```bash161ollama serve162ollama pull qwen2.5-coder:7b163```164165## Architecture166167```text168Claude Code169 │170 ├── MCP Server (Mini Claude)171 │ │172 │ └── ~/.mini_claude/ (state files)173 │174 └── Ollama (local LLM)175```176177State is stored in `~/.mini_claude/` per project.178179## Issues180181Report bugs or request features: https://github.com/20alexl/mini_claude/issues182183## License184185MIT186
Full transparency — inspect the skill content before installing.