Skip to main content
command CX Codex

reflect · johnrogers — Claude Code command: what it does, how to install

reflect is a Claude Code command that reviews chat context and project settings, then suggests changes to instructions, commands, and configuration.

MIT ★ 233 updated 2026-01-18

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add johnrogers/claude-swift-engineering
/plugin install swift-engineering@claude-swift-engineering
Open on GitHub

What reflect does

The reflect command reviews the conversation history together with Claude Code instructions, command files, and settings. It looks for inconsistent answers, missed user intent, gaps in task guidance, command changes, and locally approved permissions or MCP tools.

It reports each issue, proposes a concrete instruction change, and pauses for human feedback. Once a change is approved, the command describes the edited section, supplies replacement text, and explains the connection to the original issue. Implementation waits for approval.

What it helps with

  • spot causes of inconsistent Claude Code responses
  • find gaps in project instructions and configuration
  • propose new commands or changes to existing ones
  • review local permissions and MCP tools needed by commands

Example prompts for the agent

  • Run /reflect and review the chat history plus the current project instructions.
  • Inspect CLAUDE.md, .claude/commands/*, and Claude Code settings for improvements.
  • Suggest changes one at a time, wait for my approval, and prepare the approved instruction updates.

How to install reflect

1Plugin marketplace

/plugin marketplace add johnrogers/claude-swift-engineering
/plugin install swift-engineering@claude-swift-engineering

2Manually: put the files in place

.claude/commands/reflect.md

Call it with /reflect. For all projects use ~/.claude/commands/

Questions about reflect

How do I install reflect in Claude Code?

Add the marketplace with /plugin marketplace add johnrogers/claude-swift-engineering, then install the plugin with /plugin install swift-engineering@claude-swift-engineering. The command file is .claude/commands/reflect.md.

What does reflect do?

It examines chat history, Claude Code instructions, commands, and configuration. The command proposes targeted changes, waits for human approval, and prepares the approved updates.

Which files does reflect inspect?

It checks /CLAUDE.md, /.claude/commands/*, **/CLAUDE.md, .claude/settings.json, and .claude/settings.local.json, along with the chat history.

Source text

reflect.md · MIT
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. Follow these steps carefully:

Analysis Phase: Review the chat history in your context window.
Then, examine the current Claude instructions, commands and config <claude_instructions> /CLAUDE.md /.claude/commands/* **/CLAUDE.md .claude/settings.json .claude/settings.local.json </claude_instructions>

Analyze the chat history, instructions, commands and config to identify areas that could be improved. Look for:

Inconsistencies in Claude's responses
Misunderstandings of user requests
Areas where Claude could provide more detailed or accurate information
Opportunities to enhance Claude's ability to handle specific types of queries or tasks
New commands or improvements to a commands name, function or response
Permissions and MCPs we've approved locally that we should add to the config, especially if we've added new tools or require them for the command to work
Interaction Phase: Present your findings and improvement ideas to the human. For each suggestion: a) Explain the current issue you've identified b) Propose a specific change or addition to the instructions c) Describe how this change would improve Claude's performance
Wait for feedback from the human on each suggestion before proceeding. If the human approves a change, move it to the implementation phase. If not, refine your suggestion or move on to the next idea.

Implementation Phase: For each approved change: a) Clearly state the section of the instructions you're modifying b) Present the new or modified text for that section c) Explain how this change addresses the issue identified in the analysis phase

Output Format: Present your final output in the following structure:

[List the issues identified and potential improvements] [For each approved improvement: 1. Section being modified 2. New or modified instruction text 3. Explanation of how this addresses the identified issue]
<final_instructions> [Present the complete, updated set of instructions for Claude, incorporating all approved changes] </final_instructions>

Remember, your goal is to enhance Claude's performance and consistency while maintaining the core functionality and purpose of the AI assistant. Be thorough in your analysis, clear in your explanations, and precise in your implementations.

© John Rogers (@johnrogers) · MIT · johnrogers/claude-swift-engineering

Similar slash commands

All slash commands for Agent setup: memory, context, orchestration →

reflect by other authors comes first.

reflect SuperClaude-Org reflect evaluates task adherence and session progress using Serena MCP analysis tools. Useful for quality checks before marking tasks as complete. CX Codex +1 ★ 23,950repo stars reflect ccplugins The reflect command gathers session corrections and proposes changes to CLAUDE.md for human review. It can also inspect sync targets and spot similar entries. CX Codex +1 ★ 1,013repo stars writing-agents-md Pedro Nauck writing-agents-md is a Claude Code skill for writing and reviewing AGENTS.md and CLAUDE.md files. It covers projects with rules agents cannot infer from code or tooling alone. CX Codex +1 305installs instructions official github instructions is a GitHub Copilot rule that defines instruction file structure and glob-based targeting. It guides the creation of .instructions.md files. CX Codex +1 ★ 41,430repo stars automatic-stateful-prompt-improver curiositech automatic-stateful-prompt-improver intercepts complex prompts to refine them via DSPy, APE, and OPRO techniques. Stores optimization outcomes in an MCP server to learn across sessions. CX Codex +1 207installs github-copilot-starter official github github-copilot-starter sets up GitHub Copilot for a new project from its technology stack and team conventions. Useful when the repository needs a ready structure for instructions, skills, and agents. CX Codex +1 8,900installs ce-setup EveryInc ce-setup — a Claude Code skill that inspects Compound Engineering tools, fixes repository configuration, scaffolds packs, and refreshes code standards. Runs during setup or as a scheduled CI job. CX Codex +1 3,600installs mantis-reflect official google mantis-reflect extracts insights, failures, and false assumptions from Mantis agent transcripts, appending them to workspace/learnings.jsonl. CX Codex +1 1,600installs

From the same set33

The whole set →
five-whys The five-whys rule guides Claude Code through a five-question root-cause review. Use it when a visible failure needs a deeper process or system explanation. CX Codex +1 ★ 233repo stars swift-test-creator swift-test-creator writes unit and integration tests with Swift Testing — @Test, #expect, #require. Meant to run once the feature code is in place. CX Codex ★ 233repo stars swift-documenter swift-documenter is a Claude Code subagent that creates and updates README files and Swift doc comments after a feature is finished or during package documentation revisions. CX Codex ★ 233repo stars swift-modernizer The swift-modernizer subagent updates legacy Swift code toward async/await, modern APIs, and SwiftUI. Use it to plan and verify incremental migrations in an existing project. CX Codex ★ 233repo stars swift-networking swift-networking guides Network.framework implementation in Swift, handling low-level TCP and UDP traffic, concurrency queues, and connection state transitions. CX Codex +1 ★ 233repo stars ios-hig ios-hig is a Claude Code skill that applies Apple's iOS interface guidance to accessibility, visual design, and interaction. It supports screen creation and control review. CX Codex +1 ★ 233repo stars swift-engineer swift-engineer — a Claude subagent that writes vanilla Swift for models, services, networking and persistence when the plan rules out TCA. CX Codex ★ 233repo stars grdb Guides Claude Code in writing direct SQLite queries, schema migrations, and reactive observations with GRDB.swift on iOS and macOS. CX Codex +1 ★ 233repo stars

Project sponsors

Companies that keep this analytics open