reflect

A session-review command that examines how an AI coding session was carried out rather than what code it produced.

In plain words
What is it for?
Recording lessons about problem-solving, tool use, communication, planning, blockers, and course corrections in a dated Markdown file.
Why use it?
It helps identify useful techniques, weak points, and ways to improve future work.

Command

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 commands/nikiforovall/claude-code-rules/reflect
Clone the repo
git clone --depth 1 https://github.com/NikiforovAll/claude-code-rules
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 689 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 $0.00024 $0.00689
Opus 5 $0.00012 $0.00345
Sonnet 5 $0.00005 $0.00138
Haiku 4.5 $0.00002 $0.00069

Measured 2d ago against content hash 8c65d625afd7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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/handbook-extras/commands/reflect.md · 99 lines

How it starts

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

Session Reflection

Create a reflective analysis of this Claude Code session.

Purpose

This reflection focuses on META aspects of the session - not what was implemented/fixed, but HOW the work was done:

  • Techniques and approaches used
  • What worked well vs. what didn't
  • Lessons learned for future sessions
  • Actionable improvements

Instructions

  1. Analyze the Current Session

    Review the conversation history and identify:

    • Problem-solving approaches used
    • Tool usage patterns (which tools, how effectively)
    • Communication patterns (clarifications, iterations)
    • Planning and execution strategies
    • Any blockers, pivots, or course corrections
  2. Generate the Reflection

    Create a markdown file at: .claude/reflections/<date>-<name>.md

    Where:

    • <date> is today's date in YYYY-MM-DD format
    • <name> is a short kebab-case slug (2-4 words) derived from the gist of the conversation (e.g., api-debugging, test-refactoring, feature-planning)

    Ensure the .claude/reflections/ directory exists before writing.

  3. Use This Structure

# Session Reflection: [Brief Title]

**Date**: YYYY-MM-DD
**Session Goal**: [One-line summary of what the session aimed to accomplish]

---

## What Went Well

- [Effective technique or approach]
- [Tool usage that was particularly helpful]
- [Communication pattern that worked]

## What Went Wrong

- [Approach that didn't work or caused delays]
- [Tool misuse or inefficiency]
- [Unnecessary iteration or backtracking]

## Lessons Learned

1. **[Lesson Title]**: [Explanation of the insight and why it matters]
2. **[Lesson Title]**: [Explanation of the insight and why it matters]

## Action Items

- [ ] [Specific improvement to apply in future sessions]
- [ ] [Process or workflow change to consider]

## Tips & Tricks for Claude Code

Based on this session, useful patterns for future reference:

- **Tip**: [Specific Claude Code tip discovered or reinforced]
- **Tip**: [Another useful pattern or shortcut]

## Generalization Opportunities

Consider creating reusable artifacts if this session revealed repeatable patterns. For example:

- **Slash Command**: [If a specific workflow could be automated]
- **Agent**: [If a specialized task could be delegated]
- **Skill**: [If a multi-step process with assets would help]

[Only include this section if genuinely applicable. Before generalizing, ensure the pattern is genuinely reusable across multiple contexts. Premature abstraction can add complexity without benefit.]

---

*Generated by `/reflect` command*

Read the full file on GitHub · 99 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. 2d ago First seen · 99 lines · 24 tokens per session scan A 8c65d625afd7

Subscribe to this mod's changes

reflect is a command published in the GitHub repository NikiforovAll/claude-code-rules (141 stars, last pushed 3d ago), licensed Apache-2.0. It adds 24 tokens to every session and 689 once invoked, about $0.0001 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.