home / skills / project-n-e-k-o / n.e.k.o / post-work-analysis

post-work-analysis skill

/.agent/skills/post-work-analysis

This skill archives post-work learnings by analyzing complex tasks and creating reusable insights for future debugging and development.

npx playbooks add skill project-n-e-k-o/n.e.k.o --skill post-work-analysis

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.5 KB
---
name: 📝 任务完成后归档
description: |
  **重要提醒**: 每次完成复杂调试或开发任务后,主动执行此流程!
  将学到的经验归档为 skill,供以后参考。不要等用户提醒。
---

# 📝 任务完成后归档 (Post-Work Analysis)

> **🔔 触发条件**: 当你刚完成一个涉及调试、研究、或多次迭代的任务时,主动执行此流程!

## 应用场景

- ✅ 解决了非平凡的 bug
- ✅ 通过调查发现了根本原因
- ✅ 解决方案涉及多次尝试
- ✅ 知识对未来类似问题有价值

## 归档流程

### 1. 识别直接原因
```
直接原因: [一句话描述]
例: "边界检测使用模型中心点而非可见区域,导致放大后只能看到腿"
```

### 2. 分析根本原因
深入思考 - 为什么会存在这个问题?
- **设计缺陷**: 架构问题?
- **工具/平台限制**: 已知 bug?缺失功能?
- **人为因素**: 开发中常见错误?
- **文档缺失**: 文档不清晰?

### 3. 判断是否值得归档为 Skill

| 情况 | 是否归档 |
|------|---------|
| 通用算法/公式(可复用于其他项目) | ✅ 归档 |
| 特定框架/库的陷阱和解决方案 | ✅ 归档 |
| 具体项目的代码组织问题 | ❌ 不归档 |
| 简单的拼写错误或配置问题 | ❌ 不归档 |

### 4. 创建/更新 Skill 文件

路径: `.agent/skills/<topic>/SKILL.md`

```markdown
---
name: [skill-name]
description: [简要描述这个 skill 涵盖的内容]
---

# [标题]

## 症状
- [可观察的问题 1]
- [可观察的问题 2]

## 根本原因
### 原因 1: [名称]
- **问题**: [描述]
- **为什么发生**: [根因分析]
- **诊断方法**: [如何确认]
- **解决方案**: [如何修复]

## 代码解决方案
[可复用的代码片段和公式]

## 关键经验
- [要点]
```

### 5. 向用户汇报
- 修复了什么
- 根因总结
- 知识归档位置
- 遗留问题(如有)

## 归档示例

### 示例 1: VRM 物理调试
- **直接原因**: 头部碰撞体过大
- **根因**: 模型缩放不一致、Unity 导出 bug
- **归档**: `.agent/skills/vrm-physics/SKILL.md`

### 示例 2: 3D 拖拽交互
- **直接原因**: 使用固定 panSpeed 导致缩放后移动不同步
- **根因**: 未考虑相机距离对像素→世界空间映射的影响
- **归档**: `.agent/skills/3d-interaction/SKILL.md`(可选)

## 提醒

> 🚨 **不要等用户提醒!** 每次完成复杂任务后,主动问自己:
> 1. 这个问题有通用价值吗?
> 2. 以后可能再遇到类似问题吗?
> 3. 如果是,立即归档!

Overview

This skill captures lessons after finishing complex debugging, research, or multi-iteration development work and turns them into reusable knowledge. It teaches how to identify direct and root causes, decide if results are worth archiving, create a concise skill entry, and report outcomes to stakeholders. Use it proactively every time you finish a non-trivial task.

How this skill works

After a task completes, the skill guides you to record the direct cause, perform root-cause analysis across design, tools, human factors, and documentation, then evaluate whether the finding is reusable. If worthwhile, it instructs how to create or update a formal skill entry in the agent knowledge base and how to summarize the fix for users. It ends by prompting follow-up and noting any remaining issues.

When to use it

  • After resolving a non-trivial bug that required investigation
  • When a solution involved multiple attempts or novel approaches
  • After discovering the root cause of recurring failures
  • When findings are likely useful for future projects or teammates
  • Whenever documentation or process gaps are uncovered

Best practices

  • Write one clear sentence for the direct cause to make search and indexing effective
  • Distinguish symptom, direct cause, and root cause—ask why repeatedly
  • Prefer archiving reusable algorithms, framework-specific pitfalls, and diagnostic patterns
  • Skip trivial fixes (typos, simple config) unless they reveal a deeper pattern
  • Include diagnostic steps and copy-paste-ready code snippets when applicable

Example use cases

  • Fixed a rendering bug caused by using model center instead of visible bounds and saved the detection pattern
  • Tracked down a physics glitch to inconsistent model scaling and archived the diagnostic checklist
  • Documented camera-distance effects on pan/zoom math that prevented repeated regressions
  • Created a library note about a framework export bug to warn future integrators
  • Summarized a multi-step workaround so support can apply it without re-investigation

FAQ

How do I decide if something is worth archiving?

If the solution is reusable beyond a single file, addresses framework/library pitfalls, or documents a diagnostic pattern, archive it. Skip one-off code organization or trivial typos.

What key sections should a skill entry contain?

Include symptoms, root-cause analysis, diagnostic methods, the fix or code snippet, and concise key takeaways so others can reproduce the diagnosis and solution.