Open-source project
ReflexioAI/claude-smart avatar
ReflexioAI/claude-smart

claude-smart stores the version in five files and the benchmark claim in another

Turns corrections into Preferences, Project-specific skills, and Shared skills for Claude Code, Codex, and OpenCode.

797 stars87 forksPythonApache-2.0

At a glance

What is it?
A plugin for Claude Code, Codex and OpenCode that distils corrections into rules and keeps revising them. The mechanics worth reading are the rule lifecycle, the in-process embedder, and a header claim about being three times better at something that is evidenced in a separate document.
Who is it for?
claude-smart fits a team that keeps hitting the same correction twice and wants the lesson to survive the conversation, and it fits hosts that can be restarted and plugins that can reach a local backend. Three things to weigh first.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 25, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • ReflexioAI/claude-smart797 ★ · +20
Star history
Repository2026-09-112026-11-25
ReflexioAI/claude-smart777797

20 Stars in the last 75 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The 3x claim is in the header and the evidence is in EXPERIMENT.md

The first substantive line of the README is a comparison, and it should be read as a claim rather than a measurement. It says that against `claude-mem` the plugin is about three times better at turning corrections into rules the assistant follows, and that about 50% more of your guidance is retained, with a link to a benchmark document.

Two things make that line worth care. The comparison target is named, which is more than most, and the evidence is deliberately kept out of the README and in a separate file. The repository also carries a `benchmarks/` directory alongside `EXPERIMENT.md`, so the artefacts are in the tree rather than on a personal page.

What is not stated anywhere in the header is what the 3x measures: how many prompts, which correction categories, which model, how retention is scored. Those questions are exactly what a benchmark document is for, and the honest position is that the number is the project's own until someone reads that file.

The plugin is built on an open-source engine called reflexio, from the same organisation, and the README asks readers to star that project rather than this one.

The memory versus learning split is argued with two broken commands

The argument for the plugin's approach is made by contrast, and the two examples are more useful than the claim.

The first is a deploy failure. An ORM driver is bumped from 5.x to 6.0, the deploy breaks, and a rollback restores service because 6.0 breaks nested writes in one order flow. A memory tool writes down that the deploy broke and the user rolled back. This plugin claims to write down the transferable rule instead: treat major-version bumps of ORMs and database drivers as breaking, and verify with integration tests rather than only unit tests.

The second is a dev server. Several iterations are spent trying to start the local environment before the correct command turns out to be `pnpm dev:all`, where `npm run dev` only starts the frontend and produces missing service errors. The memory version records that `npm run dev` did not work; the learned version records which command to use for this repository and what the wrong one costs you.

Both examples turn a one-off observation into a directive, which is the whole claim: fewer planning steps, less latency and fewer tokens, because the path is already known.

Rules get revised and archived, not appended next to their contradictions

The rule lifecycle is the part that separates this from a transcript store, and it is described concretely.

New evidence does not just add a rule. Wording gets clearer, and the when-to-apply trigger tightens or broadens as evidence accumulates, so a rule's scope is a moving target rather than a fixed string. Near-duplicates merge, stale rules are superseded, and dead ones are archived rather than deleted.

The worked example follows one gotcha through its life. The same `npm test --run` problem is corrected twice and the two corrections consolidate into a single rule. Later evidence shows the problem also applies to `vitest`, so the scope broadens. The project then switches policy to `pnpm test`, at which point the old rule is archived and a new one supersedes it.

Everything is captured automatically: every user turn, tool call and assistant response passes through lifecycle hooks and is extracted into rules without a command being run. Learning is automatic, revision is manual, and the scope of a rule is maintained by the system while its priority is set by the evidence it accumulated.

Semantic search runs in-process on an ONNX embedder, and the data is local

The privacy story is specific about the mechanism. There is no external API call for search: semantic search runs on an in-process ONNX embedder, all-MiniLM-L6-v2, and skills and preferences are indexed with both vector search and BM25, the two combined as hybrid retrieval.

Data lands in two directories on the machine, `~/.reflexio/` and `~/.claude-smart/`. Those directories are shared across hosts, which is what lets you install into Claude Code, then switch to Codex, then uninstall, without losing the rules. The uninstall path is explicit about this: it removes the plugin and the learned data survives.

The backend is a separate thing from the embedder, and the plugin is written to survive it being unavailable. If the reflexio backend is down, hooks buffer to disk, and the next successful publish drains them. So there is a queue that grows while the backend is unreachable, and no stated cap on it.

Alongside it is a dashboard, a web interface for browsing session histories, inspecting preferences, and editing project-specific and shared skills. It starts with the backend, so localhost:3001 is the address to open. The last sentence of that section, describing how to open it from inside Claude Code, ends mid-word.

Three hosts, three different restart rituals

Installation is one command with a host flag, and the differences between hosts are all in what has to be reloaded afterwards.

For Claude Code, `npx claude-smart install` and a restart. For Codex, the same command with `--host codex`, and then Codex has to be fully quit and reopened so the hooks reload, which is a stronger requirement than a restart. For OpenCode, install into the project and restart OpenCode so it loads the plugin from `opencode.json`, with `--global` available to install for every project on the machine instead.

bash
npx claude-smart install
bash
npx claude-smart install --host codex
bash
npx claude-smart install --host opencode

Uninstall mirrors the three forms and also asks for a restart. Node 20 or newer is required for `npx`, and the host CLI has to be on the path.

The unsupported list is stated in the same section rather than discovered at runtime: Claude Code Cowork, claude.ai/code web, and remote Codex environments without local plugin hooks. The reason given is mechanical, not a policy: they run outside the local machine, so the local backend, the dashboard and `~/.reflexio/` are simply not reachable from them.

One version string lives in five files and three lockfiles guard the release

The release tooling is where this repository is most unusual, and the Makefile documents itself in comments.

`VERSION_FILES` names five files that have to agree: `package.json`, `plugin/pyproject.toml`, `plugin/.claude-plugin/plugin.json`, `plugin/.codex-plugin/plugin.json` and `README.md`. A Python packaging manifest, three plugin manifests of different ecosystems, and the README, all carrying the same number. The current value is 0.3.3, which the npm manifest records with no GitHub release behind it.

`LOCK_FILES` names three more: `package-lock.json`, `plugin/uv.lock` and `reflexio.lock.json`. A release always vendors the current reflexio submodule, so the published artefact does not drift, and the `.PHONY` list carries check targets for the reflexio pin, the reflexio lock, the standalone lock and the locked project version.

Two comments explain the odd bits. The marketplace manifest is intentionally not in the version list, because it is generated at pack time from the package version by a script run from npm's prepack hook. And the plugin is distributed exclusively through npm: it is no longer published to PyPI, `uvx install` is unsupported, while the `reflexio-ai` dependency itself still resolves from PyPI.

A Python plugin with a CommonJS wrapper, published as one npm tarball

The package manifest explains how three hosts are served from one artefact.

It is CommonJS by type, declares a single binary named `claude-smart` pointing at a script in `bin/`, and exports one entry, `./server`, which resolves to a compiled ESM module at `plugin/opencode/dist/server.mjs`. That module is built from TypeScript through a separate project config, and the build only runs as part of `prepack`, which also regenerates the marketplace manifest. So the OpenCode server in the published tarball is compiled during publish rather than checked in as source.

The file list is explicit about what travels: the bin directory, one setup shell script, two marketplace manifests, the plugin directory, the README and the license, with exclusions for Python caches, `.venv`, `node_modules` and Next.js cache directories. Engine requirements are `node >=20.9.0` and `opencode >=1.17.0`, which is narrower than the Node 20 plus wording in the installation section.

The manual correction path is the other place the two languages meet. In Claude Code it is `/claude-smart:learn`; in Codex it is a shell invocation of `bash ~/.reflexio/plugin-root/scripts/cli.sh learn`. Both flag the last turn as a correction so the extractor weights it heavily, which is the escape hatch for when it guesses wrong.

Editorial conclusion

claude-smart fits a team that keeps hitting the same correction twice and wants the lesson to survive the conversation, and it fits hosts that can be restarted and plugins that can reach a local backend. Three things to weigh first. The plugin is a Python codebase published as an npm package, so a Node 20 environment still ends up running Python, and the version has to be bumped in five manifests at once. The competitive claim in the header is the project's own, and the evidence lives in EXPERIMENT.md rather than in the README, so read that before repeating the number. And the rules it writes are inferred from your turns, not stated by you: the manual marker exists because the extractor can be wrong, and it is worth checking the dashboard at localhost:3001 to see what it decided before you trust it in a repo with real conventions. It is not usable in remote or web-hosted agent environments, which is stated rather than discovered later.

Frequently asked questions

What does claude-smart do in Claude Code, Codex and OpenCode?

It captures every user turn, tool call and assistant response through lifecycle hooks and extracts corrections into structured, deduplicated rules. Those become project-specific skills for repo-local conventions and shared skills for patterns that should transfer between projects, with preferences kept scoped to the current project.

Does claude-smart send conversation data to a remote service?

Search does not make an external API call. Semantic search runs on an in-process ONNX embedder, all-MiniLM-L6-v2, combined with BM25, and preferences, skills and interaction buffers are stored locally in ~/.reflexio/ and ~/.claude-smart/. If the local reflexio backend is down, hooks buffer to disk and the next successful publish drains them.

How do I install claude-smart and why does it need a restart?

Run npx claude-smart install, or add --host codex or --host opencode, with Node 20 or newer and the host CLI on the path. Restart Claude Code afterwards, fully quit and reopen Codex so hooks reload, or restart OpenCode in the project so it loads the plugin from opencode.json. Learned data survives uninstall, and remote or web environments are not supported because the local backend is unreachable there.

Is claude-smart still installable from PyPI?

No. The release notes in the Makefile state that claude-smart is distributed exclusively via npm, that it is no longer published to PyPI, and that uvx install is unsupported. The reflexio-ai dependency it needs still resolves from PyPI, and a release always vendors the current reflexio submodule.

How do I tell claude-smart that the last turn was a mistake?

Run /claude-smart:learn in Claude Code, or bash ~/.reflexio/plugin-root/scripts/cli.sh learn in Codex. Either flags the last turn as a correction so the extractor weights it heavily, which is the manual path when automatic extraction picks the wrong lesson.

Official sources

  1. Issues
  2. License: Apache-2.0
  3. Project website
  4. README
  5. ReflexioAI/claude-smart on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/reflexioai-claude-smart.svg)](https://hysenlabs.com/projects/reflexioai-claude-smart)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/reflexioai-claude-smart.svg)](https://hysenlabs.com/projects/reflexioai-claude-smart)

Was this useful?