Skip to main content
ClaudeWave
ES, Spanish
Skill1.7k estrellas del repoactualizado 1mo ago

reflection

The reflection skill analyzes development sessions to identify gaps and inconsistencies in Claude Code instructions, then proposes and implements improvements to CLAUDE.md. Use it when you want to refine your AI collaboration guidelines, capture session learnings, or optimize how Claude understands your preferences and requirements through quick mode for focused improvements or deep mode for comprehensive analysis of patterns, problems solved, and knowledge gaps.

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/feiskyer/claude-code-settings /tmp/reflection && cp -r /tmp/reflection/skills/reflection ~/.claude/skills/reflection
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

# Reflection

Analyze the current session and improve Claude Code instructions. Operates in two modes based on user input.

## Mode Selection

- **Quick mode** (default): Triggered by `/reflection` or `/reflection quick`. Focuses on analyzing chat history to identify and implement improvements to CLAUDE.md instructions.
- **Deep mode**: Triggered by `/reflection deep` or `/reflection comprehensive`. Performs a full session analysis covering problems solved, patterns established, user preferences, system understanding, and knowledge gaps, then updates CLAUDE.md accordingly.

Determine the mode from the user's input. If no mode is specified, use Quick mode. If the user says "deep", "comprehensive", or "harder", use Deep mode.

---

## Quick Mode: CLAUDE.md Improvement

### 1. Analysis Phase

Review the chat history in the context window, then read the current CLAUDE.md file in the repository root.

Analyze both to identify areas for improvement:

- Inconsistencies in Claude's responses
- Misunderstandings of user requests
- Areas where Claude could provide more detailed or accurate information
- Opportunities to enhance handling of specific query types or tasks
- Missing instructions that would have prevented mistakes made during the session

### 2. Analysis Documentation

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

### 3. Interaction Phase

Present findings and improvement ideas to the user. For each suggestion:

1. Explain the current issue identified
2. Propose a specific change or addition to the instructions
3. Describe how this change would improve Claude's performance

Wait for feedback on each suggestion before proceeding. If the user approves a change, move to implementation. If not, refine the suggestion or move on.

### 4. Implementation Phase

For each approved change:

1. Use the Edit tool to modify the CLAUDE.md file
2. State the section being modified
3. Present the new or modified text
4. Explain how this change addresses the identified issue

### 5. Output Format

Present the final output in this structure:

```
<analysis>
[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 identified issue]
</improvements>

<final_instructions>
[Complete updated set of instructions incorporating all approved changes]
</final_instructions>
```

Commit changes using git after successful implementation.

---

## Deep Mode: Comprehensive Session Analysis

### 1. Session Analysis Phase

Review the entire conversation history and identify:

#### Problems and Solutions
- What problems were encountered?
- Initial symptoms reported by the user
- Root causes discovered
- Solutions implemented
- Key insights learned

#### Code Patterns and Architecture
- Design decisions made
- Architecture choices
- Code relationships discovered
- Integration points identified

#### User Preferences and Workflow
- Communication style
- Decision-making patterns
- Quality standards
- Workflow preferences
- Direct quotes that reveal preferences

#### System Understanding
- Component interactions
- Critical paths and dependencies
- Failure modes and recovery
- Performance considerations

#### Knowledge Gaps and Improvements
- Misunderstandings that occurred
- Information that was missing
- Better approaches discovered
- Future considerations

### 2. Reflection Output Phase

Present a structured summary covering:

- **Session overview**: High-level summary of what was accomplished
- **Problems solved**: Each problem with root cause and solution
- **Patterns established**: Design and code patterns worth remembering
- **User preferences**: Workflow and communication preferences observed
- **System relationships**: Component interactions and dependencies learned
- **Knowledge updates**: New understanding gained about the codebase or domain
- **Commands and tools**: Any tools or commands that were particularly useful or problematic
- **Future improvements**: Suggestions for next steps or optimizations
- **Collaboration insights**: What worked well and what could improve in the AI-human interaction

### 3. Action Items

After presenting the analysis, propose concrete actions:

1. **Update CLAUDE.md** with specific sections reflecting learnings
2. **Add comments** to specific files where understanding was gained
3. **Create documentation** for specific topics if needed
4. **Test** anything that needs verification

Use TodoWrite to track these action items. Wait for user approval before implementing changes.

### 4. Implementation

For each approved action, implement the change and commit using git.

---

## Best Practices

- Always read the current CLAUDE.md file before proposing changes
- Use TodoWrite to track analysis progress and implementation tasks
- Test proposed changes by considering edge cases and common scenarios
- Ensure all modifications maintain consistency with existing patterns
- Be thorough in analysis, clear in explanations, and precise in implementations
- Commit changes using git after successful implementation

## Your Task

Reflect on the current session. Determine the mode from the user's input — default to Quick mode if no mode is specified.
autonomous-skillSkill

>-

brainstormingSkill

Explore user intent, requirements, and design options through collaborative dialogue before implementation. Use before building new features, components, or systems — whenever the user describes something to build and design decisions are involved. Triggers: \"brainstorm\", \"help me design\", \"think through the requirements\", \"头脑风暴\", \"设计方案\", \"梳理需求\". Not for bug fixes, config changes, or tasks with an obvious implementation path.

codex-skillSkill

Leverage OpenAI Codex/GPT models for autonomous code implementation, code review, and plan review. Triggers: "codex", "use gpt", "gpt-5", "let openai", "full-auto", "adversarial review", "second opinion review", "用codex", "让gpt实现", "对抗式审查", "让codex审查计划", "第二意见". Use this skill whenever the user wants to delegate coding tasks to OpenAI models, run code or plan reviews via codex, get a second-opinion review from a different model, or execute tasks in a sandboxed environment.

command-creatorSkill

Create Claude Code custom slash commands with proper structure, frontmatter, and best practices. Use this skill whenever the user wants to create a new command, add a slash command, build a custom command, or mentions "create-command", "new command", "add command", or "make a command" for Claude Code. Also trigger when the user wants to turn a workflow into a reusable command.

deep-reflectorSubagent

Comprehensive session analysis and learning capture specialist. Analyzes development sessions to extract patterns, preferences, and improvements for future interactions. Use after significant work sessions to capture learnings.

deep-researchSkill

Multi-agent research orchestration: split a research goal into parallel sub-goals, run each via headless `claude -p` subprocesses, aggregate results into a polished report file. Use for systematic web/document research, competitive or industry analysis, batch link/dataset processing, and long-form evidence synthesis. Triggers: "深度调研", "deep research", "wide research", "多 Agent 调研", "系统调研".

eurekaSkill

Capture technical breakthroughs and transform them into actionable, reusable documentation. Use this skill when the user has achieved a significant technical insight, solved a hard problem, discovered a non-obvious solution, or wants to document a breakthrough moment. Also trigger when the user mentions "eureka", "breakthrough", "document this insight", "capture this discovery", or wants to turn a technical win into reusable knowledge.

github-fix-issueSkill

Fix GitHub issues end-to-end — analysis, branch creation, implementation, testing, and PR submission. Use whenever the user mentions fixing a GitHub issue, says "fix issue #123", "work on this issue", "修复 issue", or references a GitHub issue number or URL.