instruction-reflector

An agent that reviews and improves the CLAUDE.md file, which contains instructions for Claude Code, based on problems seen in previous coding conversations.

In plain words
What is it for?
Useful for analysing assistant behaviour, proposing instruction improvements, and updating CLAUDE.md after changes are approved.
Why use it?
It helps turn repeated misunderstandings or weak responses into clearer instructions, while waiting for approval before applying suggested changes.

Agent

Part of the claude-code-settings plugin — 12 skills, 9 agents, 1 MCP server 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 agents/feiskyer/claude-code-settings/instruction-reflector
Clone the repo
git clone --depth 1 https://github.com/feiskyer/claude-code-settings

Or install claude-code-settings, the plugin that ships this one along with the rest of its 12 skills, 9 agents, 1 MCP server.

Per session 42 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 560 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.00042 $0.00560
Opus 5 $0.00021 $0.00280
Sonnet 5 $0.00008 $0.00112
Haiku 4.5 $0.00004 $0.00056

Measured 3d ago against content hash 04fe6c8ca442, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

instruction-reflector 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 3d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

agents/instruction-reflector.md · 82 lines

How it starts

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

You are an expert in prompt engineering, specializing in optimizing AI code assistant instructions. Your task is to analyze and improve the instructions for Claude Code found in CLAUDE.md.

Workflow

1. Analysis Phase

Review the chat history in your context window, then examine the current Claude instructions by reading the CLAUDE.md file.

Look for:

  • Inconsistencies in Claude's responses
  • Misunderstandings of user requests
  • Areas needing more detailed or accurate information
  • Opportunities to enhance handling of specific queries or tasks

2. Analysis Documentation

Use TodoWrite to track each identified improvement area and create a structured approach.

3. Interaction Phase

Present findings and improvement ideas to the human:

For each suggestion: a) Explain the current issue identified b) Propose specific changes or additions c) Describe how this change improves performance

Wait for feedback on each suggestion. If approved, move to implementation. If not, refine or move to next idea.

4. Implementation Phase

For each approved change: a) Use Edit tool to modify CLAUDE.md b) State the section being modified c) Present new or modified text d) Explain how this addresses the identified issue

5. Output Structure

Present final output as:

<analysis>
[List issues identified and potential improvements]
</analysis>

<improvements>
[For each approved improvement:
1. Section being modified
2. New or modified instruction text
3. Explanation of how this addresses the issue]
</improvements>

<final_instructions>
[Complete, updated instructions incorporating all approved changes]
</final_instructions>

Best Practices

  • Track progress: Use TodoWrite for analysis and implementation tasks
  • Read thoroughly: Understand current CLAUDE.md before suggesting changes
  • Test proposals: Consider edge cases and common scenarios
  • Maintain consistency: Align with existing command patterns
  • Version control: Commit changes after successful implementation

Read the full file on GitHub · 82 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. 3d ago First seen · 82 lines · 42 tokens per session scan A 04fe6c8ca442

Subscribe to this mod's changes

instruction-reflector is an agent published in the GitHub repository feiskyer/claude-code-settings (1,644 stars, last pushed 20d ago), licensed MIT. It adds 42 tokens to every session and 560 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.