claude-smart
A Claude Code plugin, powered by Reflexio, that turns your corrections and successful execution paths into rules Claude follows in future sessions.
claude-smart
claude-smart is a Claude Code plugin, powered by Reflexio, that makes Claude Code self-improve as you use it — not by remembering past sessions, but by turning your corrections and successful execution paths into rules it actually follows next time.
It runs entirely on your machine: Claude Code lifecycle hooks capture every user turn, tool call, and assistant response; Reflexio's extractors distill them into profiles and playbook rules; and on every new session those rules are injected back into Claude's system prompt.
Why Learning, Not Memory
Most memory solutions re-inject transcripts or summaries from prior sessions — Claude remembers what happened without necessarily changing what it does next. claude-smart focuses on learning instead.
- Actionable, not just informative. Corrections become rules Claude can follow. Memory: "user was annoyed about
npm testhanging." Learning: "always pass--runtonpm testin this repo — default watch mode blocks CI." - Optimized paths, not just past events. Successful tool sequences become recipes so Claude reuses what works. Learning: "for this repo, always use
pnpm dev:allto start the full local stack —npm run devonly starts the frontend." - Project-wide, not session-siloed. Session memory disappears with the conversation. The project playbook persists and improves across every session in that repo.
- Compact. Distilled, deduplicated rules stay in dozens of tokens — not thousands — even as the project grows.
Two Artifacts
claude-smart produces two artifacts as you work and reinjects them at the start of every new session:
- User Profile — session-scoped preferences and working style (stack, role, quirks). e.g. "uses pnpm, not npm"; "prefers terse answers."
- Project Playbook — durable, generalized rules accumulated across every session in the repo. Each rule says when it applies and why. e.g. "always pass
--runtonpm test— watch mode hangs CI."
Rules self-maintain: correct the same thing twice and they merge; change your mind and the old one is archived.
Key Features
- Learn, don't just remember — Corrections become structured, deduplicated rules, not transcript replays.
- Fully automatic — Every user turn, tool call, and assistant response is captured via lifecycle hooks and extracted into rules without you running anything.
- Compounds with every session — Rules auto-merge, supersede, and archive as your project evolves — the playbook sharpens with use instead of bloating.
- Two-tier scope — Per-session profiles for the current conversation; cross-session playbooks for the whole project.
- No external API call — Semantic search runs on an in-process ONNX embedder, and all data is stored locally under
~/.reflexio/and~/.claude-smart/. - Hybrid search — Playbooks and profiles are indexed with vector + BM25 search for fast, robust retrieval.
- Offline resilience — If the Reflexio backend is down, hooks buffer to disk; the next successful publish drains them.
- Manual correction tag —
/tagflags the last turn as a correction so the extractor weights it heavily.
Read Next
Getting Started
Install the plugin, verify it's running, and see your first rule.
How It Works
The hook lifecycle, extraction signals, and how Reflexio turns interactions into rules.
Slash Commands
Reference for /show, /learn, /tag, /clear-all, and /restart.
Dashboard
Browse sessions, inspect profiles, and edit playbook rules from the web UI.
Configuration
Environment variables, data directories, scope, and troubleshooting.
Reflexio Core Concepts
Background on the profiles, playbooks, and extraction pipeline that powers claude-smart.