数据安装
- 作者仓库星标 216
- 作者更新于 实时读取
- 作者仓库 kagenti
- 领域
- 工程开发
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @kagenti · 未声明 license
- Token 消耗评级
- 中等消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: skills:retrospective
description: End-of-session review to identify improvements, skill gaps, and refactoring opportunities START(…
category: 工程开发
runtime: 无特殊运行时
---
# skills:retrospective 输出预览
## PART A: 任务判断
- 适用问题:代码实现、重构、调试或代码审查。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Table of Contents / When to Use / Phase 1: Session Analysis”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于代码实现、重构、调试或代码审查,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Table of Contents / When to Use / Phase 1: Session Analysis”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“Table of Contents / When to Use / Phase 1: Session Analysis”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: skills:retrospective
description: End-of-session review to identify improvements, skill gaps, and refactoring opportunities START(…
category: 工程开发
source: kagenti/kagenti
---
# skills:retrospective
## 什么时候使用
- 用于审阅代码、文档或方案并给出可执行反馈 适合处理工程开发场景下的代码实现、调试、重构、测试或代码审查,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤;通常…
- 面向代码实现、重构、调试或代码审查,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Table of Contents / When to Use / Phase 1: Session Analysis」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "skills:retrospective" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Table of Contents / When to Use / Phase 1: Session Analysis
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件、执行终端命令 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Session Retrospective
flowchart TD
START(["/skills:retrospective"]) --> P1["Phase 1: Session Analysis"]:::skills
P1 --> P1B["Phase 1b: Commit History"]:::skills
P1B --> P2["Phase 2: Skill Inventory"]:::skills
P2 --> P3["Phase 3: Create Plan"]:::skills
P3 --> APPROVE{"User approves?"}
APPROVE -->|Yes| P4["Phase 4: Execute"]:::skills
APPROVE -->|Changes| P3
P4 --> DONE([Commit changes])
classDef skills fill:#607D8B,stroke:#333,color:white
Follow this diagram as the workflow.
Table of Contents
- When to Use
- Phase 1: Analysis
- Phase 2: Skill Inventory Review
- Phase 3: Create Plan
- Phase 4: Execute with Approval
- Skill Gap Patterns
- Refactoring Patterns
When to Use
Run at the end of significant sessions:
- After debugging a complex issue
- After implementing a new feature
- After onboarding to a new area of the codebase
- When you notice repeated patterns
- Periodically (weekly/monthly) for skill hygiene
Phase 1: Session Analysis
Review the current session for patterns. Do NOT make changes yet.
1.1 Repeated Commands
What commands did you run more than 3 times?
# Check bash history for patterns
history | grep -E "kubectl|helm|git" | sort | uniq -c | sort -rn | head -20
1.2 Long Debugging Cycles
What took longest to figure out?
- Did I try multiple approaches before finding the right one?
- Was there a "trick" that finally worked?
- Would a checklist have helped?
1.3 Repeated Lookups
What information did you search for repeatedly?
- API endpoints, configuration keys, command flags
- Error message meanings
- "How do I..." questions
1.4 Missing Workflows
Signs of missing workflow:
- "I wish I had known to do X first"
- "The order matters: A before B before C"
- "This only works if Y is configured"
Phase 1b: Commit History Analysis
Analyze recent commit history to identify blind paths and wasted iterations.
1b.1 Review Recent Commits
git log --oneline -30
1b.2 Identify Revert/Fix Chains
Look for patterns that indicate wrong paths were taken:
git log --oneline -50 | grep -iE "revert|fix:|fixup|undo|retry|attempt"
1b.3 Classify Blind Paths
For each revert/fix chain, classify the root cause:
| Pattern | Root Cause | Skill Fix |
|---|---|---|
| Fix → Fix → Fix same thing | Wrong initial approach | Add decision tree to skill |
| Revert then different approach | First approach was wrong | Add "don't do X" anti-pattern |
| Multiple commits changing same file | Incremental guessing | Add diagnostic steps before fix |
| Commit then immediately fix | Didn't verify before commit | Strengthen verification step |
| Applied fix that broke other tests | Didn't check impact | Add "check related tests" step |
1b.4 Count Wasted Iterations
# Count fix/revert commits vs feature commits in last 30
echo "Feature commits:"
git log --oneline -30 | grep -cvE "fix:|revert|fixup|undo"
echo "Fix/revert commits:"
git log --oneline -30 | grep -ciE "fix:|revert|fixup|undo"
A healthy ratio is 3:1 (feature:fix). Below 2:1 means the agent is taking too many blind paths.
1b.5 Analyze What the Agent Explored
Review the session conversation for:
- Hypotheses tested: How many guesses before finding the right fix?
- Commands that returned nothing useful: Ran a command, got no insight, tried another
- Repeated "let me try another approach": Sign of missing decision guidance
- Correct exploration: Some unknown paths are expected — the agent should explore options when the situation is genuinely ambiguous
1b.6 Build Skills from Bad Paths
For each blind path identified, determine if a skill can prevent it:
| Blind Path | Preventable? | Action |
|---|---|---|
| Tried approach A, failed, tried B, B worked | YES — add "use B when [condition]" | Update skill with decision tree |
| Explored 3 approaches, all reasonable, #3 worked | PARTIALLY — ambiguous situation | Add "try in this order" guidance |
| Guessed at fix without diagnosing first | YES — skipped diagnostic step | Add "diagnose before fixing" rule |
| Tried approach that can't work in this env | YES — env-specific constraint | Add environment check to skill |
| Novel problem, had to explore | NO — genuinely unknown | Document solution for next time |
Phase 2: Skill Inventory Review
Review existing skills for refactoring opportunities. Do NOT make changes yet.
2.1 List All Skills
find .claude/skills -name "SKILL.md" | sort
2.2 Check for Duplicates
Look for skills that cover similar ground:
| Pattern | Action |
|---|---|
| Two skills with overlapping commands | Consider merging |
| One skill doing too many things | Consider splitting |
| Similar skills in different categories | Consider consolidating |
| Skill references outdated patterns | Update to best practices |
2.3 Best Practices Check
For each skill, verify:
- Frontmatter has
nameanddescription - TOC included if over 50 lines
- Commands are copy-pasteable and tested
- Troubleshooting section exists
- Links to related skills are valid
- No outdated information
2.4 Identify Refactoring Candidates
Common refactoring needs:
- Merge:
k8s:podsandk8s:healthhave overlapping pod checks - Split: A skill covers both Kind and OpenShift but patterns differ
- Rename: Skill name doesn't match what it actually does
- Restructure: Category no longer makes sense
Phase 3: Create Plan
Write a plan document for approval. Include all proposed changes.
Plan Template
Create docs/SKILL_RETROSPECTIVE_<date>.md:
# Skill Retrospective Plan - [Date]
## Session Context
[What was the session about?]
## Proposed Changes
### New Skills to Create
| Skill | Reason | Priority |
|-------|--------|----------|
| `category/name` | Gap identified when... | High/Medium/Low |
### Skills to Update
| Skill | Change | Reason |
|-------|--------|--------|
| `category/name` | Add X | Missing from workflow |
### Skills to Refactor
| Action | Skills | Reason |
|--------|--------|--------|
| Merge | `a`, `b` → `c` | Overlapping content |
| Split | `x` → `y`, `z` | Too broad |
| Rename | `old` → `new` | Clarity |
### Skills to Delete
| Skill | Reason |
|-------|--------|
| `category/name` | Superseded by X |
## Questions for Review
- Should X and Y be merged?
- Is category Z still relevant?
## Estimated Effort
- New skills: N
- Updates: M
- Refactors: K
Present Plan
Show the plan to the user and ask:
Here's my retrospective plan. Before I make any changes:
- Do these proposed changes make sense?
- Should I prioritize any specific items?
- Are there changes you'd skip or modify?
Phase 4: Execute with Approval
Only after user approves the plan, execute changes.
4.1 Execute in Order
- Refactors first - Prevents creating skills that will be immediately restructured
- Updates second - Improve existing before adding new
- New skills last - Build on clean foundation
4.2 Checkpoint After Each Major Change
After significant changes, pause and confirm:
Completed: [description]. Continue with next item?
4.3 Final Commit
Commit all changes with comprehensive message:
docs: Session retrospective skill updates
- Created: auth/new-skill
- Updated: k8s:health with pod debugging
- Merged: testing/a + testing/b → testing/combined
- Deleted: obsolete/skill
Based on [session context].
Skill Gap Patterns
| Session Pattern | Likely Gap |
|---|---|
| "I had to google..." | Missing reference skill |
| "After trying X, Y, Z, W worked" | Missing debugging decision tree |
| "The pattern for this is..." | Missing pattern skill |
| "You need A before B" | Missing prerequisite skill |
| "Different on OpenShift vs Kind" | Missing env-specific skill |
| 401/403 errors | Missing auth skill |
| Connection/routing issues | Missing networking skill |
| Commit → revert → different approach | Missing anti-pattern in skill |
| 3+ fix commits for same issue | Missing diagnostic step in skill |
| Agent explored multiple approaches | Add "try in this order" to skill |
Refactoring Patterns
When to Merge Skills
- Two skills share >50% of commands
- Users always use them together
- Distinction is confusing
When to Split Skills
- Skill has multiple "modes" or use cases
- Different audiences need different parts
- Skill is over 200 lines
When to Rename/Move
- Name doesn't match actual purpose
- Category has changed
- Consistency with other skills
When to Delete
- Superseded by better skill
- No longer applicable (deprecated tool/pattern)
- Never actually used
Related Skills
skills:write- Template for new skillsskills:scan- Full repo audit and gap analysis
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核