ReflexioAI/claude-smart

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

What it solves

claude-smart is a self-improvement plugin for AI coding assistants (Claude Code, Codex, and OpenCode) that prevents the assistant from repeating the same mistakes. Instead of just recording a history of what happened (memory), it extracts actionable rules and durable skills from user corrections and successful paths, ensuring the AI follows these rules in future sessions.

How it works

The plugin uses lifecycle hooks to capture every user turn, tool call, and assistant response. These interactions are processed by the reflexio engine to extract three types of artifacts:

  1. Preferences: Project-scoped settings (e.g., "uses pnpm, not npm").
  2. Project-specific skills: Rules learned from corrections within a specific repository (e.g., "always pass --run to npm test").
  3. Shared skills: General patterns that are rolled up from project-specific skills to be reused across different projects.

These artifacts are stored locally in a SQLite database and retrieved using a hybrid search (vector + BM25) via an in-process ONNX embedder. Relevant rules are then injected into the AI's context during new prompts to guide its behavior.

Who it’s for

Developers using Claude Code, Codex, or OpenCode who want their AI assistant to remember project-specific quirks, coding standards, and corrections without manually updating documentation or prompt bloat.

Highlights

  • Automatic Learning: Extracts rules from interactions without requiring manual input, though a /claude-smart:learn command exists for manual flagging.
  • Self-Tuning: Continuously refines, merges, and archives rules as new evidence accumulates to keep the skill library sharp.
  • Local-First Privacy: All data, including embeddings and preferences, is stored locally on the user's machine with no external API calls for semantic search.
  • Management Dashboard: Includes a web UI (localhost:3001) for browsing session histories and editing learned skills and preferences.