Agent skill
vibe-reflect-and-compound
Extracts learnings from completed work, feedback, or failures. Updates a persistent learnings file with capped entries. Use after receiving feedback, fixing bugs, or completing complex tasks.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/reflect-and-compound
SKILL.md
vibe-reflect-and-compound
Every problem solved should produce reusable knowledge. Don't just fix — learn.
When to Use This Skill
- After receiving feedback on your work (positive or negative)
- After a failed attempt or debugging session
- After completing a complex task
- After a code review with substantive feedback
- Periodically (e.g., end of week) to consolidate learnings
When NOT to Use This Skill
- After trivial tasks (typo fixes, simple renames)
- When there's nothing new to learn (routine work)
- During active implementation (reflect AFTER, not DURING)
Steps
-
Gather input — What happened?
- What was the task/feedback/failure?
- What was expected vs. what actually happened?
- What was the root cause?
-
Extract patterns — Ask:
- "What would I do differently next time?"
- "What pattern does this represent?"
- "Is this a recurring theme?"
- "What would have caught this earlier?"
-
Formulate learnings — Each learning should be:
- Actionable — Not "be careful" but "always run race detection before committing concurrent code"
- Specific — Not "tests are important" but "property-based tests catch edge cases that table-driven tests miss for parser code"
- Contextual — Include when it applies and when it doesn't
-
Update persistent storage — Write to:
- Project learnings file (e.g.,
docs/learnings.mdorLEARNINGS.md) - Claude memory (if available)
- Team wiki/docs
- Project learnings file (e.g.,
-
Cap management — Keep max 30 active learnings. When exceeding:
- Archive older learnings to a dated file
- Keep only the most frequently referenced ones active
- Merge similar learnings
Output Format
Reflection: [Context]
Trigger: [What prompted this reflection]
Learnings Extracted:
-
[Pattern name]: [Actionable learning]
- Applies when: [context]
- Evidence: [what happened]
-
[Pattern name]: [Actionable learning]
- Applies when: [context]
- Evidence: [what happened]
Updated: [Where learnings were saved] Active Count: X/30
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?