# Self-Improving Skills in Claude Code

Source: https://www.youtube.com/watch?v=-4nUCaMNBR8
Recap page: https://rapidrecap.app/video/-4nUCaMNBR8
Generated: 2026-01-05T04:32:58.248+00:00

---
## Quick Overview

The video demonstrates a self-improving skills system for Claude Code where user corrections during a session are extracted via a /reflect command, reviewed, and then automatically committed and pushed to GitHub, creating a permanent feedback loop that makes the skill smarter over time without requiring manual session restarts.

**Key Points:**
- The core problem addressed is that standard LLMs do not learn from user corrections across separate sessions, forcing users to repeat instructions (00:04).
- The solution involves a /reflect command which analyzes the current session, extracts corrections (signals) and approvals (confirmations), and proposes skill updates (01:35, 03:06).
- The manual flow requires the user to run /reflect after a session, which references the skill file (e.g., /~/.claude/skills/code-review/SKILL.md) to update it (02:15, 03:10).
- The automatic flow uses a 'Stop Hook' configured in ~/.claude/settings.json to trigger the /reflect skill script automatically when Claude stops responding (04:56, 05:28).
- The /reflect skill analyzes the conversation for corrections (High/Medium confidence) and success patterns, then proposes Git changes including a commit message (03:26, 04:14).
- If approved, Claude executes edits to the skill file, runs git add/commit, and pushes to origin/main, ensuring the next session uses the improved skill (04:33, 04:42).
- The benefits include seeing skill evolution over time, easy rollback of bad changes via Git history, synchronization across machines, and sharing improvements (06:57).

![Screenshot at 00:03: The slide titled "The Core Problem" illustrates the issue that LLMs don't learn from user corrections, showing that the same mistake is repeated across Session 1, Session 2, and Session 3, emphasizing that every conversation starts from zero.](https://ss.rapidrecap.app/screens/-4nUCaMNBR8/00-00-03.jpg)

**Context:** This video explains a system implemented in Claude Code designed to enable Large Language Models (LLMs) to continuously improve their specialized 'skills' based on direct user feedback during coding sessions. The primary challenge addressed is the stateless nature of current LLM interactions, where corrections made in one session are forgotten in the next. The proposed solution centers around a '/reflect' mechanism that captures user feedback (corrections and confirmations) and integrates these learned patterns directly back into the skill's configuration file using Git version control.

## Detailed Analysis

The video details a self-improving skill framework for Claude Code, designed to overcome the fundamental limitation that LLMs do not retain user-provided corrections between sessions. The process involves three main stages: Manual Flow, Automatic Detection via Hooks, and Git Integration. In the manual flow (Part 1), the user interacts with Claude, provides corrections (e.g., "Always check for SQL injection too"), and upon completion, runs the `/reflect code-review` command. This command forces Claude to analyze the conversation, extract corrections (signals) and approvals (confirmations), and propose specific updates to the skill file (e.g., updating the `code-review` skill file located at `~/.claude/skills/code-review/SKILL.md`). The user then reviews these proposed changes, which include a Git commit message, and accepts them ('Y'), leading to Git operations (add, commit, push) that update the skill. The second part introduces the automatic flow, which uses a 'Stop Hook' defined in `~/.claude/settings.json`. This hook automatically triggers the reflection script (`reflect/reflect.sh`) when Claude stops responding, perfectly suited for end-of-session analysis without user intervention. The hook analyzes the session, learns patterns (categorized as High, Medium, or Low confidence), and updates the skill, all silently, resulting in the session ending normally but with an improved skill ready for the next interaction. The skills that can be learned cover Code Review, API Design, Testing, and Documentation. The entire process ensures every improvement becomes a Git commit, preserving a full history, allowing users to see skill evolution, roll back bad changes, and synchronize skills across machines.

### The Core Problem

- LLMs don't learn from you
- Every conversation starts from zero
- Corrections from Session 1 are forgotten in Session 2 (00:04)

### The Solution

- Introducing the /reflect command
- Analyzes session, extracts corrections, updates skill file, pushes to GitHub (01:28)

### Step 1

- Use a Skill: User types /code-review check the auth module
- Skill reads instructions from its SKILL.md file (02:27)

### Step 2

- Work & Correct: Corrections are signals, Approvals are confirmations
- The /reflect command extracts both signals and confirmations (02:36)

### Step 3

- Run /reflect (Manual Flow): Run /reflect [skill-name] to analyze conversation, identify patterns, and propose skill updates based on confidence levels (High, Medium, Low) (03:08, 03:32)

### Step 4

- Review & Approve: Claude proposes changes (e.g., adding SQL injection checks) with a commit message
- User applies changes by typing 'Y' (04:04)

### Step 5

- Updated & Pushed: Claude executes edits, git add/commit, and git push origin main, ensuring the next session uses the improved skill (04:32)

### Part 2

- The Automatic Flow: Hooks trigger reflection automatically when the session ends (e.g., Stop Hook configured in settings.json) (04:50, 04:56)
- Flow: Work + Correct -> Session Ends -> Hook Analyzes -> Learned (05:30)
- This enables continuous learning without manual intervention (05:54)
- Benefits: See skill evolution, rollback bad changes, sync across machines, share with others (06:57)

![Screenshot at 00:03: Title slide introducing the concept of 'Claude Code Self-Improving Skills'.](https://ss.rapidrecap.app/screens/-4nUCaMNBR8/00-00-03.jpg)
![Screenshot at 00:05: Visual representation of the core problem: LLMs don't learn from you, repeating mistakes across sessions 1, 2, and 3.](https://ss.rapidrecap.app/screens/-4nUCaMNBR8/00-00-05.jpg)
![Screenshot at 01:30: Screenshot of the GitHub file structure showing where the skill definitions \(SKILL.md\) reside and are updated.](https://ss.rapidrecap.app/screens/-4nUCaMNBR8/00-01-30.jpg)
![Screenshot at 02:36: Illustration of Step 2 \(Work & Correct\), distinguishing between corrections \(signals\) and approvals \(confirmations\) during interaction.](https://ss.rapidrecap.app/screens/-4nUCaMNBR8/00-02-36.jpg)
![Screenshot at 04:04: Example output from Step 4 \(Review & Approve\) showing proposed Git changes, commit message, and the prompt to apply changes \('Y/n/change Y'\).](https://ss.rapidrecap.app/screens/-4nUCaMNBR8/00-04-04.jpg)
