/reflecting-on-skills:reflecting-on-skillsfrom reflecting-on-skills
Analyzes skill usage and suggests improvements. Automatically invoked after other skills via PostToolUse hook. Enables continuous improvement through self-reflection on errors, inefficiencies, and gaps.
Ships in reflecting-on-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill is automatically triggered after any other skill completes (via a PostToolUse hook).
Claude Code Only: This skill uses PostToolUse hooks and the Task tool for background subagent execution. These features are specific to Claude Code and not available in Claude apps or via the API.
For the cross-platform Agent Skills specification, see agentskills.io.
When invoked after another skill completes:
Identify the skill - Determine which skill was just used from conversation context
Launch background analysis - Use the Task tool:
Task tool with:
subagent_type: "general-purpose"
run_in_background: true
prompt: [see below]
Subagent prompt template:
Analyze the skill that was just used in this conversation.
1. Read the skill's SKILL.md file at: ~/.claude/skills/[skill-name]/SKILL.md
2. Review the conversation to identify:
- Errors or exceptions encountered
- Unclear or missing instructions that caused confusion
- Edge cases the skill didn't handle
- Inefficiencies or unnecessary steps
- Deviations from the skill's guidance (may indicate gaps)
3. If issues found, draft SPECIFIC improvements:
- Exact text to add/change in SKILL.md
- Keep changes minimal and focused
- Only address observed issues, not hypotheticals
4. If improvements warranted, use AskUserQuestion:
- Present the issue observed
- Show the proposed change
- Ask: "Apply this improvement to [skill-name]?"
5. If approved, use Edit tool to update the skill's SKILL.md
If no issues observed, complete silently without prompting.
Continue conversation - Don't wait for reflection to complete
This skill is triggered by a PostToolUse hook in ~/.claude/settings.json:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Skill",
"hooks": [
{
"type": "command",
"command": "python3 ~/.claude/hooks/post-skill-reflect.py"
}
]
}
]
}
}
The hook script at ~/.claude/hooks/post-skill-reflect.py excludes this skill to prevent infinite loops.
Good (observed issue):
Bad (hypothetical):
After managing-jira skill completes with an error:
acli jira workitem create --type Epic and got "Capitalize field required"Refuse (do not suggest changes):
Escalate (always ask before proceeding):
Before proposing a change, verify:
~/.claude/settings.json has the PostToolUse hook configured per Hook Configuration sectionpost-skill-reflect.py excludes "reflecting-on-skills"~/.claude/skills/[skill-name]/SKILL.md formatWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub mdsakalu/agent-plugins --plugin reflecting-on-skills