Airsc miễn phí cho tất cả. Nếu nó giúp bạn, hãy ủng hộ $2–$20.

Ủng hộ
PluginAn toànQuy trình & bộ nhớ agentDễ cho người mới

claude-smart

ReflexioAI · ReflexioAI/claude-smart

Một plugin cho phép các tác nhân AI như Claude Code học hỏi từ các chỉnh sửa của người dùng và biến chúng thành các kỹ năng cụ thể cho dự án hoặc kỹ năng chia sẻ cho các phiên làm việc sau.

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

783 sao88Giấy phép: Apache-2.0Cập nhật 13 ngày trước0 lượt mở

Xem kết quả thực tế

Bảng điều khiển Playbooks hiển thị các kỹ năng học được từ các lần sửa lỗi

Ảnh từ README của tác giảBảng điều khiển Playbooks hiển thị các kỹ năng học được từ các lần sửa lỗi

1/2

Ảnh từ README của tác giả ReflexioAI ·Nguồn

Bạn có thể làm gì với nó

  • Dạy Claude Code các mẫu lập trình ưu tiên có thể áp dụng cho nhiều dự án.
  • Ngăn chặn một tác nhân AI lặp lại các lỗi trong quá khứ bằng cách học hỏi từ các chỉnh sửa.
  • Thiết lập các quy tắc lập trình cụ thể cho dự án mà một tác nhân AI sẽ tự động tuân theo.

Kiểm tra an toàn

An toàn

Không thấy dấu hiệu rủi ro trong các file đã quét.

Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.

Trích từ README

claude-smart

A self-improvement plugin for Claude Code, Codex, and OpenCode that turns interactions into durable skills they follow in future sessions.

Quick Start • How It Works • Commands • Dashboard • Configuration • Troubleshooting • License

claude-smart learns from your corrections and from what's already working — so the assistant stops repeating mistakes and reuses proven paths. Project-specific skills capture repo-local rules, and shared skills roll up durable patterns for reuse across projects.

vs claude-mem: ~3× better at turning your corrections into rules Claude follows, ~50% more of your guidance is retained. Read the benchmark →

⭐ Built on the open-source reflexio engine — if claude-smart helps you, star reflexio on GitHub.


Quick Start

Requires Node.js 20+ (for npx) and the host CLI you're installing into (claude, codex, or opencode) on PATH.

Claude Code

npx claude-smart install

Then restart Claude Code.

Codex

npx claude-smart install --host codex

Then fully quit and reopen Codex so hooks reload.

OpenCode

npx claude-smart install --host opencode

Then restart OpenCode in your project so it loads the plugin from opencode.json. Add --global to install for all OpenCode projects on this machine instead.

Uninstall

npx claude-smart uninstall                    # Claude Code
npx claude-smart uninstall --host codex       # Codex
npx claude-smart uninstall --host opencode    # OpenCode

Restart the host afterward. Learned data under ~/.reflexio/ and ~/.claude-smart/ is preserved and shared across hosts, so you can uninstall or switch hosts without losing skills or preferences.

For per-host details — what the installers and uninstallers touch, OpenCode config resolution and model/env overrides, and Windows notes — see Host install notes in DEVELOPER.md. Developing the plugin itself? See Developing locally.

Not supported: Claude Code Cowork, claude.ai/code web, or remote Codex environments without local plugin hooks — they run outside your local machine, so the local backend/dashboard and ~/.reflexio/ aren't reachable.


Why Learning, Not Memory

Most memory tools just record. Claude remembers what happened, but doesn't change what it does next.

claude-smart focuses on learning instead.

Four things this changes:

  • 💡 Stop repeating the same mistakes: Produces actionable skills Claude can follow next time; memory only records what happened.

    Example: a deploy fails after Claude bumps prisma from 5.x to 6.0; you tell it to roll back because 6.0 breaks nested writes in your order flow. Memory: “deploy broke after prisma bump; user rolled back” Learning: “treat major-version bumps of ORMs/DB drivers as breaking — verify with integration tests, not just unit tests”

  • 🚀 Start from the optimized path: Records and optimizes the steps that worked so Claude can reuse them, instead of re-exploring each session.

    Example: Claude spends several iterations trying to start the local dev environment before discovering that this repo requires pnpm dev:all instead of the usual npm run dev. Memory: “user mentioned that npm run dev did not work” Learning: “for this repo, always use pnpm dev:all to start the full local stack — npm run dev only starts the frontend and causes missing service errors”

    Instead of re-exploring, Claude Code starts from the proven path—reducing planning steps, latency, and token usage.

  • 🌐 Project-specific and shared skills: Session memory disappears with the conversation. Project-specific skills preserve repo-local rules, while shared skills roll up patterns that should transfer across projects. Preferences stay scoped to the current project so per-repo preferences don't leak across projects.

  • 🪶 Better context without prompt bloat: Distilled, deduplicated skills stay in dozens of tokens—not thousands—even as the project grows.


Demo

https://github.com/user-attachments/assets/ed84d73a-d5b7-4a0d-ab2c-f2c060c3f276


Key Features

  • 🧠 Learn, don't just remember — Corrections become structured, deduplicated rules, not transcript replays.
  • ⚡ Fully automatic learning — Every user turn, tool call, and assistant response is captured via lifecycle hooks and extracted into rules without you running anything.
  • 📈 Continuously self-tuning, not just append-on-conflict — Existing rules are continuously refined, not just appended to. Wording gets clearer, when-to-apply triggers tighten or broaden as evidence accumulates, near-duplicates merge, stale rules are superseded, and dead ones are archived. The library gets sharper, not just bigger.

    e.g. correct the same npm test --run gotcha twice → consolidated into one rule. New evidence shows it applies to vitest too → scope broadened. Switch policy to pnpm test → old rule archived, new one supersedes it.

  • 🔌 No external API call — semantic search runs on an in-process ONNX embedder (all-MiniLM-L6-v2), and all data (preferences, skills, interaction buffers) is stored locally on your machine (~/.reflexio/ and ~/.claude-smart/).
  • 🔎 Hybrid search — Skills and preferences 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 marker — /claude-smart:learn in Claude Code, or bash ~/.reflexio/plugin-root/scripts/cli.sh learn in Codex, flags the last turn as a correction so the extractor weights it heavily.

Dashboard

A web UI for browsing session histories, inspecting preferences, and editing project-s

Xem mã nguồn trên GitHub