Menu
Coding Agents

claude-smart Plugin

A Claude Code plugin, powered by Reflexio, that turns your corrections and successful execution paths into rules Claude follows in future sessions.

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 test hanging.” Learning: “always pass --run to npm test in this repo — default watch mode blocks CI.”

Optimized paths, not just past events

Successful tool sequences become recipes so Claude reuses what works. For example: “use pnpm dev:all to start the full local stack — npm run dev only starts the frontend.”

Project-wide, not session-siloed

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:

ArtifactScopeExample
User ProfileSession-scoped preferences and working style (stack, role, quirks)“Uses pnpm, not npm”; “prefers terse answers.”
Project PlaybookDurable, generalized rules across sessions in the repo, with when and why they apply“Always pass --run to npm 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.

Installation & Setup

Before you begin, install and sign in to Claude Code, and have Node.js ≥ 18, Python ≥ 3.12, and uv on your PATH.

Add the marketplace and install the plugin

In a Claude Code session, run:

text
/plugin marketplace add ReflexioAI/claude-smart
/plugin install claude-smart@reflexioai
Terminal
npx claude-smart install

Or with uv:

Terminal
uvx claude-smart install

Both commands run the equivalent marketplace flow on your behalf.

Restart Claude Code

Close and reopen Claude Code so the plugin's hooks are registered. The first session will take a few extra seconds — the Setup hook syncs the Python environment, downloads the ONNX embedder (~80 MB), and prebuilds the dashboard.

Verify the backend is up

On SessionStart, claude-smart spawns a local Reflexio backend on localhost:8081 and a dashboard on localhost:3001. Check the backend:

Terminal
curl -H "User-Agent: my-agent-reflexio" http://localhost:8081/health
# {"status":"healthy"}

Then open http://localhost:3001 in a browser to see the dashboard.

Check what Claude is being told

Inside Claude Code, run:

text
/show

On a brand-new install, this prints empty sections. As you work, profiles and playbook rules populate here — /show always reflects the exact markdown that SessionStart injects into Claude's system prompt.

Teach it your first rule

Have a short conversation that contains a correction, for example:

You: run the tests Claude: runs npm test You: stop — in this repo always pass --run, watch mode hangs CI

Then force extraction instead of waiting for the end of the session:

text
/learn

Wait 20–30 seconds, then run /show again. The new rule appears in the Project Playbook section. It will be reinjected on every future session in this project.

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 — /tag flags the last turn as a correction so the extractor weights it heavily.