claudecodex

reflect

Agent self-improvement + retrieval. Captures learnings via colon-namespaced sub-skills (reflect, reflect:consolidate, reflect:ingest, reflect:recall, reflect-status) and auto-injects relevant prior learnings via SessionStart/UserPromptSubmit hooks. PostToolUse arms low-cost mini-learning capture; Stop enqueues short-session reflection. Philosophy: Correct once, never again; recall everything next time.

27 on GitHubby stevengonsalvezv5.2.5MITupdated 1 month ago
/

Plugin reflect from marketplace agents-in-a-box in stevengonsalvez/agents-in-a-box. Commands read from the repo's manifest — 1 month ago.

This plugin runs code on your machine — its hooks fire automatically on events like tool use. The exact commands are listed below; read them before installing.

What it installs

Skills (10)

  • reflect:consolidate

    Project-level memory consolidation. Merges orphaned worktree memory directories into a single .agents/MEMORY.md for the current project. Deduplicates, sections, and proposes cleanup of orphan dirs. Does NOT index into the global knowledge base — use reflect:ingest for that. - reflect:consolidate - c

  • reflect:corpus

    Build a long-lived, filtered SLICE of the global learnings KB and answer a question-set over it ("ask the auth subsystem", "ask the migration log"). Unlike /reflect:recall (a fresh hybrid query each time), a corpus is a saved filter snapshotted to disk — prime it once, ask many questions, reprime wh

  • reflect:cost

    Report reflect drain spend over a time window — tokens split by cached (cache_read), uncached writes (cache_creation), and io (input+output), with a $ estimate, grouped by day / outcome / model / transcript. Reads the drainer's cost log and surfaces outlier runs and cache-reuse health (the 41.5M-tok

  • reflect:errors-ack

    Triage and acknowledge entries in the reflect errors sink (~/.reflect/errors.json). Invoked from the statusline ⚠N badge when pipeline errors accumulate (drain poison, parser crashes, ingest failures, hook timeouts). - reflect:errors-ack - errors-ack - ack reflect errors - clear reflect errors - wha

  • reflect:export

    Export or import the reflect knowledge base as a deterministic, git-friendly tarball — the learnings markdown corpus plus the reflect.db rows in one snapshot. Use to back up the KB, move it to another machine, or restore it: `export` writes the tarball, `import` restores it (with an optional GraphRA

  • reflect:ingest

    The global knowledge indexer. Harvests ALL memory sources across all tools (Claude, Codex, Copilot, Gemini) and all project types into the unified GraphRAG + QMD knowledge base. Archives originals, generates entity sidecars, and dual-indexes for future retrieval. This is THE command that makes the k

  • reflect:recall

    Retrieve relevant prior learnings from the global knowledge base. Hybrid vector + graph search over 170+ indexed learnings, reranked by confidence, recency, and tag overlap. Use when starting work, debugging a recurring problem, or before implementing a feature that may have prior art. - reflect:rec

  • reflect

    Full conversation scan for self-improvement. Detects behavioral corrections and knowledge signals, classifies them, proposes agent updates and knowledge notes with entity sidecars for GraphRAG indexing. Correct once, never again. - reflect - self-reflect - review session - what did I learn - extract

  • reflect:slots

    Read and edit the pinned memory slots — a fixed set of named, size-capped, agent-editable scratchpads (persona, user_preferences, tool_guidelines, project_context, guidance, pending_items, session_patterns, self_notes). Slots are the agent's fast working memory: they auto-inject at SessionStart ahea

  • reflect:status

    Show reflection metrics, pending reviews, sidecar coverage, and GraphRAG health. Read-only views into the reflect system state. Can also approve/reject pending low-confidence items. - reflect:status - reflect status - reflect review - reflection metrics - learning stats - Read - Grep - Glob - Bash

Hooks (14)

  • SessionStart

    uv run --script ${CLAUDE_PLUGIN_ROOT}/skills/recall/hooks/session_start_recall.py

  • SessionStart

    (nohup ${CLAUDE_PLUGIN_ROOT}/hooks/reflect-drain-bg.sh >/dev/null 2>&1 &) >/dev/null 2>&1

  • UserPromptSubmit

    uv run --script ${CLAUDE_PLUGIN_ROOT}/skills/recall/hooks/user_prompt_submit_recall.py

  • Notification

    uv run --script ${CLAUDE_PLUGIN_ROOT}/hooks/notification_reflect.py

  • PreToolUse

    uv run --script ${CLAUDE_PLUGIN_ROOT}/hooks/pretooluse_context.py

  • PermissionRequest

    uv run --script ${CLAUDE_PLUGIN_ROOT}/hooks/permission_request_reflect.py

  • PostToolUse

    uv run --script ${CLAUDE_PLUGIN_ROOT}/hooks/posttooluse_minilearning.py

  • PostToolUseFailure

    uv run --script ${CLAUDE_PLUGIN_ROOT}/hooks/posttoolusefailure_minilearning.py

  • Stop

    uv run --script ${CLAUDE_PLUGIN_ROOT}/hooks/stop_reflect.py

  • PostCompact

    uv run --script ${CLAUDE_PLUGIN_ROOT}/hooks/postcompact_bookkeeping.py

  • SubagentStart

    uv run --script ${CLAUDE_PLUGIN_ROOT}/hooks/subagent_start_recall.py

  • SubagentStop

    uv run --script ${CLAUDE_PLUGIN_ROOT}/hooks/subagent_stop_reflect.py

  • SessionEnd

    uv run --script ${CLAUDE_PLUGIN_ROOT}/hooks/session_end_reflect.py

  • PreCompact

    uv run --script ${CLAUDE_PLUGIN_ROOT}/hooks/precompact_reflect.py --auto --verbose

View source on GitHub stevengonsalvez.github.io

More from stevengonsalvez/agents-in-a-box

All 5 plugins →

LLM-facing skill teaching agents how to spawn ainb sessions correctly and how to use `ainb fleet ...` orchestration subcommands. Spawning covers the `ainb run` contract (always into a git worktree, plus the `--parent` shapes that silently misfire). Fleet covers multi-session broadcast, ack-gated sequence, blocked-session needs, the auto-continue daemon, and ATC. Replaces the deprecated `popa` plugin: the Node code is gone; the orchestration logic now lives in ainb's Rust binary.

12 skills

27

illustration

claudecodex

Explanatory and brand illustration skill starring Popa (a pink blob with a notepad) drawn as intricate hand-drawn sketchnotes. Digest -> shot list -> per-image generation -> QA -> deliver. Invoke illustration or illustration:popa. Sourced from ainb-toolkit.

2 skills

27

Emit actionable host-agent lifecycle events to the ainb notification inbox: Claude/Copilot Notification, Codex PermissionRequest, and Stop/agentStop are delivered to ainb-notifyd over a Unix socket, surfacing as native OS banners, the ainb-tui Inbox screen, and per-session attention markers. Telemetry events are intentionally not hooked. Install via `/plugin install ainb-hooks@agents-in-a-box` (Claude); Codex/Copilot wiring is handled by `ainb notifyd install`.

hooks

27

Caveman mode lifecycle hooks. PostToolUse watermark-tracks output tokens per session and writes .caveman-statusline-suffix so the statusline badge updates live. PreCompact re-injects the full caveman ruleset into the compaction summary so mode survives context compaction. Pair with caveman@caveman for full caveman setup. Sourced from ainb-toolkit.

hooks

27

Similar plugins

Adds educational insights about implementation choices and codebase patterns (mimics the deprecated Explanatory output style)

hooks

anthropics/claude-code 155,476

claude-mem

claudecodex

Persistent memory for Claude Code: the next session starts where the last one left off.

29 skills · 1 MCP server · hooks

thedotmack/claude-mem 116,618

Agentic QE (external: maintained in proffesor-for-testing/agentic-qe, pinned to v3.15.17): a quality-engineering fleet with 11 QE agents, 9 skills, 9 commands, the agentic-qe MCP server pinned to the plugin version, and the aqe-mod guard that refuses destructive operations on AQE learning data

9 skills · 9 commands · 11 agents · 1 MCP server

ruvnet/ruflo 81,589

mem0

claudecodex

Cross-session memory and token savings for coding agents.

6 skills · 1 agent · 1 MCP server · hooks

mem0ai/mem0 68,893

mempalace

claudecodex

AI memory system — mine projects and conversations into a searchable palace. 47 MCP tools, auto-save hooks, guided setup.

3 skills · 6 commands · 1 MCP server · hooks

MemPalace/mempalace 60,536

pensyve

claude

Universal memory runtime for Claude Code with cross-session memory, entity-aware recall, lifecycle hooks, skills, commands, and memory-curator agents

7 skills · 7 commands · 2 agents · hooks

wshobson/agents 42,461

Maintain reflect?

This page updates itself from your repo. Add the badge to your README, or get it Featured to pin it above the organic results with a followed link to your site.

claude & codex plugins5 plugins