reflectmem

reflectmem is a skill for Claude Code, Codex from King-A23/agent-reflectmem. It costs 41 tokens per session (418 once invoked), scanned A, original, MIT.

A workflow for remembering useful shell and project rules during coding work. It recalls earlier context, warns about repeated command mistakes, and records failure-to-retry-to-success patterns for later sessions.

In plain words
What is it for?
Loading project context before commands, guarding or wrapping commands, and saving resolved command failures as reusable memory.
Why use it?
It helps avoid repeating known environment and command problems, especially in shell-heavy projects or mixed Windows and Unix toolchains.

Skill for Claude CodeCodex

Part of the agent-reflectmem plugin — 1 skill shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/king-a23/agent-reflectmem/reflectmem
Any agent
npx skills add King-A23/agent-reflectmem --skill reflectmem
Clone the repo
git clone --depth 1 https://github.com/King-A23/agent-reflectmem

Made for: Claude Code, Codex.

Or install agent-reflectmem, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for reflectmem

README.md
[![agentmods](https://agentmods.dev/badge/skills/king-a23/agent-reflectmem/reflectmem.svg)](https://agentmods.dev/skills/king-a23/agent-reflectmem/reflectmem)
Your own site
<a href="https://agentmods.dev/skills/king-a23/agent-reflectmem/reflectmem"><img src="https://agentmods.dev/badge/skills/king-a23/agent-reflectmem/reflectmem.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 418 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.00418
Opus 5 $0.00020 $0.00209
Sonnet 5 $0.00008 $0.00084
Haiku 4.5 $0.00004 $0.00042

Measured 5d ago against content hash f6a353548278, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

reflectmem scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/agent-reflectmem/skills/reflectmem/SKILL.md · 51 lines

What it actually says

Agent ReflectMem Skill

When this plugin is installed, prefer using ReflectMem implicitly for shell-heavy work across Codex, Claude Code, and Gemini CLI.

The default path is plug-and-play:

  • recall relevant shell environment and project rules before risky commands
  • warn on repeated bad command patterns without blocking execution by default
  • record shell failure-retry-success loops so future sessions can reuse the fix

Use explicit skill invocation only when you want to force this workflow into the conversation or troubleshoot the automatic hook path.

Fallback Operator Commands

If hooks are unavailable or you need to operate ReflectMem directly, use these commands from the installed plugin root.

Load prior context:

py -3 "<plugin-root>/scripts/reflectmem.py" load-context --project-path "<repo-root>" --agent-name <agent-name> --shell <powershell|bash> --format text

Wrap a command so ReflectMem guards and records it:

powershell -ExecutionPolicy Bypass -File "<plugin-root>/scripts/reflectmem.ps1" -CommandText "py -m pytest"

Promote the latest resolved trace if automatic promotion was skipped:

py -3 "<plugin-root>/scripts/reflectmem.py" report-resolution --project-path "<repo-root>" --agent-name <agent-name> --shell <powershell|bash> --force

Review or clean current rules:

py -3 "<plugin-root>/scripts/reflectmem.py" rules list --format table

Rules

  • Prefer automatic hook-driven recall and capture over manual wrapper usage.
  • Prefer project-local rules first, then reusable high-confidence environment or host rules.
  • Only promote stable environment, project, or host constraints. Do not store one-off business bugs as memory.
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 51 lines · 41 tokens per session scan A f6a353548278

Subscribe to this mod's changes

reflectmem is a skill published in the GitHub repository King-A23/agent-reflectmem (1 stars, last pushed 3mo ago), licensed MIT. It adds 41 tokens to every session and 418 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

build-personal-brain

Create, resume, validate, connect, or maintain a private cross-project memory for AI assistants. Use when a person asks to build a personal memory from local work folders and past assistant conversations, continue an interrupted memory audit, connect an existing memory to another local assistant, verify that the…

mikeshu2001/personal-brain-builder · 81 tokens

Context Doctor

Identify and repair degradation in system prompt, external memory, and skills preventing you from following instructions or remembering information as well as you should.

letta-ai/letta-code · 30 tokens

memanto-companion

Inspect and manage the cross-session engineering memory that Memanto maintains for your Claude Code skills. Use when the user asks what Memanto remembers, wants to see their engineering profile, manually recall context for a skill, or store a decision. The automatic lifecycle hooks handle capture/injection on their…

moorcheh-ai/memanto · 72 tokens

memory-recall

Search and recall relevant memories from past sessions via memsearch. Use when the user's question could benefit from historical context, past decisions, debugging notes, previous conversations, or project knowledge -- especially questions like 'what did I decide about X', 'why did we do Y', or 'have I seen this…

zilliztech/memsearch · 149 tokens

system-monitor

Monitor system health: CPU, memory, disk, processes, and network. Alert on thresholds via any channel.

fuyuxiang/echo-agent · 25 tokens

mnemon

Persistent memory CLI for LLM agents. Store facts, recall past knowledge, link related memories, manage lifecycle.

mnemon-dev/mnemon · 25 tokens