retro
This skill should be used when the user asks to "capture learnings", "run retrospective", "log what we learned", "update error history", or at the end of a session to capture insights. Reviews session and selectively logs insights worth preserving.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Session Retrospective
Review the current session and capture learnings. Be selective—only log insights worth preserving for future sessions.
Tasks
1. Error Patterns
If errors occurred:
- Check
.claude/ERROR_HISTORY.mdfor existing entries - Add new entries only if: error spans >2 files, non-obvious root cause, or likely to recur
- Use format: date, type, severity, files, error, root cause, fix, prevention
2. Learnings
Update .claude/LEARNINGS.md with:
- Patterns that worked well in this codebase
- Conventions discovered (naming, structure, data flow)
- Gotchas or anti-patterns to avoid
- Skip obvious/generic knowledge
3. CLAUDE.md Updates
If session revealed:
- New verification commands needed
- Additional paths worth documenting
- MCP tool usage patterns
- Agent strategy improvements
Entry Formats
LEARNINGS.md
## YYYY-MM-DD: [Brief Topic]
**Context:** [What was being done]
**Learning:** [Key insight]
**Apply when:** [Trigger conditions]
ERROR_HISTORY.md
## YYYY-MM-DD: [Error Type]
**Severity:** Low | Medium | High | Critical
**Files:** [Affected files]
**Error:** [Error message/symptom]
**Root Cause:** [What actually caused it]
**Fix:** [How resolved]
**Prevention:** [How to avoid]
Logging Guidelines
Log if:
- Error occurred 2+ times
- Error spans multiple files
- Root cause was non-obvious
- Pattern saved significant time
- Would help future debugging
Skip if:
- Simple typo or one-off
- Generic/common knowledge
- Already documented
- Temporary workaround
Quick Checklist
- Check ERROR_HISTORY.md before logging (avoid duplicates)
- Check LEARNINGS.md before logging (avoid duplicates)
- Use terse, imperative language
- Include when to apply the learning
- Consider if pattern warrants skill update
Additional Resources
Reference Files
For detailed guidance:
-
references/logging-triggers.md— What to log, when, and format details -
references/skill-evolution.md— When to update skills vs log learnings -
references/meta-learning.md— Reflection questions, retrospective templates
Scripts
Utility scripts in scripts/:
-
validate-learnings.sh— Check for duplicates and stale entries
Quick Reference
What to Log
| Category | Example | Destination |
|---|---|---|
| Hook/API quirk | estimatedTotal not total |
LEARNINGS.md |
| Path convention | layouts/ vs layout/ |
LEARNINGS.md |
| Type pattern | as const for variants |
LEARNINGS.md |
| Route conflict | Dynamic segment collision | ERROR_HISTORY.md |
| Auth bypass | RLS exception needed | ERROR_HISTORY.md |
| Import issue | Path resolution mismatch | ERROR_HISTORY.md |
Skill Update Triggers
| If pattern... | Then update... |
|---|---|
| Motion/animation | frontend-design |
| Question revealed scope | prd-clarify |
| State/affordance | prd-ux |
| Prompt structure | ux-prompts |
| Verification command | CLAUDE.md |
Common Patterns to Watch
TypeScript/React:
- File casing (case-sensitive imports)
- Framework namespace changes
- Instrumentation patterns
Testing:
- Browser API mocks (ResizeObserver, matchMedia)
- Exact matching requirements
- Avoid class-based assertions
Build/Config:
- Version mismatches
- Path alias resolution
- Environment-specific behavior
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-26
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!