reflect

reflect is a command for Claude Code from kam-l/claude-coach. It costs 41 tokens per session (889 once invoked), scanned A, original, MIT.

A command for reviewing proposed notes and lessons from earlier coding sessions.

In plain words
What is it for?
Use it to review or apply session reflections, including proposed memory updates, CLAUDE.md changes, and skill changes.
Why use it?
It gives you a way to inspect pending memories, tips, and project-instruction changes before accepting them.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; names the AskUserQuestion tool.

Part of the claude-coach plugin — 1 skill, 1 command, 4 hooks shipped together

Good fit Use it to review or apply session reflections, including proposed memory updates, CLAUDE.md changes, and skill changes.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/kam-l/claude-coach/reflect
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.

Clone the repo
git clone --depth 1 https://github.com/kam-l/claude-coach

Made for: Claude Code.

Or install claude-coach, the plugin that ships this one along with the rest of its 1 skill, 1 command, 4 hooks.

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 reflect

README.md
[![agentmods](https://agentmods.dev/badge/commands/kam-l/claude-coach/reflect.svg)](https://agentmods.dev/commands/kam-l/claude-coach/reflect)
Your own site
<a href="https://agentmods.dev/commands/kam-l/claude-coach/reflect"><img src="https://agentmods.dev/badge/commands/kam-l/claude-coach/reflect.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 889 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00889
Opus 5 $0.00020 $0.00445
Sonnet 5 $0.00008 $0.00178
Haiku 4.5 $0.00004 $0.00089

Measured 7d ago against content hash 7950c827a49a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

reflect 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 7d 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.

commands/reflect.md · 66 lines

How it starts

The opening of the file, as written. The whole thing — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Review pending session reflections — proposed memories, tips, CLAUDE.md patches, and skill patches extracted from past sessions.

Steps

  1. Read pending reflections from the project JSONL:

    • Derive project slug from the current working directory: strip trailing slashes, replace :, \, / with -
    • Resolve $HOME to the absolute home path. Read {home}/.claude/projects/{slug}/pending-reflections.jsonl (one JSON per line)
    • If file doesn't exist or is empty, tell the user and exit
  2. For each pending reflection, parse the JSON and print as regular text output (not inside AskUserQuestion):

    • Session timestamp and working directory
    • Extracted signals as a numbered list with tier label (correction / approval / observation)
    • Each proposed item as a labeled line: [type] name — description
  3. If $ARGUMENTS is "accept-all", apply all reflections without prompting (batch mode).

  4. Otherwise, use one AskUserQuestion call batching up to 4 reflections:

    • One multi-select question per reflection (max 4 questions per call)
    • Question: "Session {date} — select items to accept:", header: date string (e.g. "Mar 31")
    • Each proposed item is an option: label=[type] name, description=content summary
    • User selects which items to accept; unselected items are skipped
    • No separate cherry-pick flow — the multi-select IS the cherry-pick
    • If >4 reflections pending, process in sequential batches of 4
  5. For accepted memories:

    • Derive project slug from the reflection's cwd field: strip trailing slashes, replace :, \, / with - (e.g., C:\Projects\fooC--Projects-foo)
    • Write memory file to {home}/.claude/projects/{project-slug}/memory/{name}.md (resolve $HOME to absolute path — Write tool doesn't expand tilde)
    • Use frontmatter format: name, description, type fields
    • Update {home}/.claude/projects/{project-slug}/memory/MEMORY.md index with a link to the new file
    • Check for duplicates against existing MEMORY.md entries before writing
  6. For accepted tips:

    • Display the tip and suggest the user run /setup refresh to include it
  7. For accepted CLAUDE.md patches:

    • Read the project's CLAUDE.md (from the reflection's cwd)
    • Find the target ## Section heading
    • Append the patch content under that section (before the next ## heading)
    • If section doesn't exist, create it at the appropriate position
    • Show the diff to the user before writing
  8. For accepted skill patches:

    • Find the skill at skills/{skill_name}/SKILL.md (check both project and {home}/.claude/skills/)
    • Read the file, find the target section
    • Append the patch content under that section
    • If the skill or section doesn't exist, show the content and ask where to put it
    • Show the diff to the user before writing
  9. After processing, truncate pending-reflections.jsonl (clear the file).

Read the full file on GitHub · 66 lines

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. 7d ago First seen · 66 lines · 41 tokens per session scan A 7950c827a49a

Subscribe to this mod's changes

reflect is a command published in the GitHub repository kam-l/claude-coach (11 stars, last pushed 5mo ago), licensed MIT. It adds 41 tokens to every session and 889 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-30.