# reflection

Inspects failed tool calls and developer corrections to record preferences in CLAUDE.md or AGENT.md. Helps agents adapt without manual edits.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 730 installs · ★ 4
- Author: davidkiss
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davidkiss/smart-ai-skills/tree/HEAD/skills/reflection/SKILL.md
- Updated: 2026-05-08
- HTML: https://affpapa.org/en/nevibecode/skills/reflection

## What it does

This skill triggers after failed tool executions or explicit corrections from the user. It scans the recent exchange and isolates recurring feedback. The output targets project instruction files like `AGENT.md` and `CLAUDE.md`, or improves neighboring skill definitions.

Discipline is built into the workflow. The assistant formulates a single concise adjustment at a time, displaying a unified diff or raw snippet. Files remain untouched until you grant explicit approval.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add davidkiss/smart-ai-skills --skill reflection -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/reflection/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/reflection/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add davidkiss/smart-ai-skills --skill reflection -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/reflection/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add davidkiss/smart-ai-skills --skill reflection -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/reflection/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install davidkiss/smart-ai-skills reflection
```

2. **Manually: put the files in place**
- File: `.github/skills/reflection/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add davidkiss/smart-ai-skills --skill reflection -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/davidkiss/smart-ai-skills --path skills/reflection
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/reflection/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add davidkiss/smart-ai-skills --skill reflection -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/davidkiss/smart-ai-skills/tree/HEAD/skills/reflection/SKILL.md

## When to use it
- Save developer feedback into `CLAUDE.md` without manually editing the file
- Refine existing skill instructions after broken tool invocations
- Turn repeated workflow corrections into permanent guidelines in `AGENT.md`
- Resolve contradictions between old project instructions and new requirements

## Example prompts
- Remember that we run tests via `pnpm test` only and update our rules
- The previous command failed. Review the log and suggest a fix for the skill
- Record this preference in `CLAUDE.md` so you do not repeat the mistake

## Similar
- [journal-reflection](https://affpapa.org/en/nevibecode/skills/journal-reflection.md) — skill · 717 installs
- [session-history](https://affpapa.org/en/nevibecode/skills/session-history.md) — skill · 13900 installs
- [memory-bridge](https://affpapa.org/en/nevibecode/skills/memory-bridge.md) — skill · 2400 installs
- [hermes-history-ingest](https://affpapa.org/en/nevibecode/skills/hermes-history-ingest.md) — skill · 2400 installs
- [self-improvement](https://affpapa.org/en/nevibecode/skills/self-improvement.md) — skill · 2000 installs
- [memory-curate](https://affpapa.org/en/nevibecode/skills/memory-curate.md) — skill · 1300 installs

From the same set: [davidkiss/smart-ai-skills](https://affpapa.org/en/nevibecode/by/davidkiss/smart-ai-skills.md) — 2 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
