reflection — Claude Code skill: what it does, how to install
Inspects failed tool calls and developer corrections to record preferences in CLAUDE.md or AGENT.md. Helps agents adapt without manual edits.
npx skills add davidkiss/smart-ai-skills --skill reflection -a claude-codeWhat reflection 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.
What it helps with
- Save developer feedback into
CLAUDE.mdwithout 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 for the agent
- Remember that we run tests via
pnpm testonly and update our rules - The previous command failed. Review the log and suggest a fix for the skill
- Record this preference in
CLAUDE.mdso you do not repeat the mistake
How to install reflection
1Skills CLI (Vercel)
npx skills add davidkiss/smart-ai-skills --skill reflection -a claude-code2Manually: put the files in place
~/.claude/skills/reflection/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/reflection/
1Skills CLI (Vercel)
npx skills add davidkiss/smart-ai-skills --skill reflection -a codex2Manually: put the files in place
.agents/skills/reflection/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add davidkiss/smart-ai-skills --skill reflection -a cursor2Manually: put the files in place
.cursor/skills/reflection/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davidkiss/smart-ai-skills reflection2Manually: put the files in place
.github/skills/reflection/SKILL.md1Skills CLI (Vercel)
npx skills add davidkiss/smart-ai-skills --skill reflection -a gemini-cli2Platform CLI
gemini skills install https://github.com/davidkiss/smart-ai-skills --path skills/reflectionManually: put the files in place
.devin/skills/reflection/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add davidkiss/smart-ai-skills --skill reflection -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about reflection
How to install reflection in Claude Code?
Run npx skills add davidkiss/smart-ai-skills --skill reflection -a claude-code. You can also place it directly into ~/.claude/skills/reflection/SKILL.md.
What does the reflection skill do?
It examines conversation turns and tool errors to pinpoint recurring habits or gaps. Then it presents concise updates for AGENT.md, CLAUDE.md, or existing skill files.
Does reflection update files automatically?
No, silent edits are prevented. The agent presents a single diff or proposal and waits for your confirmation before writing any changes.