reflect
Skill1 starsChanged 33 days agoApache-2.0View on GitHub
经验提取与自我进化(整合自原 improve + retrospect,v0.82 合并)。/reflect 单次事件提取(默认,刚踩坑/讨论完用);/reflect version 版本级回顾(扫描日志 + feedback 毕业)。修完 bug、排查完故障、踩完坑、完成产品讨论后立即触发 single 模式;版本发布后触发 version 模式。不适用于:删改或重组既有教训(走 harness-groom,AI 只有标记权无删除权)、工作日志(走 log)、线上故障当场处置(走 incident)。
186 other projects use a version of this.
Adopted by
Most recently taken up by
- andrewsoonqn/skillstheir own version, first seen Nov 29, 2026
- romerma/mstacktheir own version, first seen Nov 29, 2026
- mlschodkowski/skillstheir own version, first seen Nov 29, 2026
- MondayNotAGoodDay/skillstheir own version, first seen Nov 29, 2026
- sodejm/copilot-operation-plugin-for-securitytheir own version, first seen Nov 29, 2026
- sirius-cc-wu/sirius-skillstheir own version, first seen Nov 29, 2026
Used with
Projects with it also use setup-pstack, make-bot-ui and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
bnemaSkillsetup-pstack
Configure which Pi models pstack uses per role. Detects available provider/model specs and writes pstack's user configuration. Use for /setup-pstack, "configure pstack models", or changing pstack model choices.
Also in 29 projects that use this
eryzerzSkillmake-bot-ui
Use when building a custom UI (page, dashboard, buttons) that should wake a Grok Bot over a webhook, when the user must provide a webhook sender key, or when exposing that UI on Tailscale.
Also in 22 projects that use this
jaydubya818Skillpoteto-mode
Use when non-trivial work should follow the smallest rigorous Jstack workflow.
Also in 34 projects that use this
jaydubya818Skillautomate-me
Use when the user wants working preferences captured in a reusable mode skill.
Also in 47 projects that use this
- +8 more from jaydubya818
Other versions186 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 186
- Yeachan-Heo/oh-my-claude-sisyphus★ 41ksame name
- Yeachan-Heo/oh-my-claudecode★ 41ksame name
- github/gh-aw★ 5.7ksame name
- backnotprop/pstack★ 5.4ksame name
- github/squad★ 3.5ksame name
- rilldata/rill★ 3ksame name
- microsoft/waza★ 1.5ksame name
- osmlab/name-suggestion-index★ 893same name
- llama-farm/llamafarm★ 837same name
- haddock-development/claude-reflect-system★ 373same name
176 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- cleanupSkill
- code-de-rustSkill
- coding-practiceSkill
- concept-namingSkill
- dev-machine-cleanupSkill
- drift-checkSkill
- essay-writingSkill
- harness-groomSkill
- logSkill
- makeskillSkill
- methodologySkill
- reviewSkill
- typograph-wxSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 168 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 208
NEVER 自动修改 skill 或 rule,所有变更 MUST 经用户确认
“Common” is measured: kept by at least 6 in 10 of the 168 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
经验提取与自我进化
定位
整合自原 /improve(单次)+ /retrospect(版本级)— v0.82 合并。统一入口,统一纪律(NEVER 自动写入 / MUST 全仓 grep / 一次性问题不回写),只有"扫描范围"不同。
路径约定(可参数化):日志目录默认
memory/、保养待办默认memory/harness-inbox.md,均为可按仓库替换的约定;下文扫描表中的 skill 文件名以你自己 harness 里实际存在的为准,缺哪个跳过哪个。
模式
| 模式 | 触发 | 扫描范围 |
| single(默认) | /reflect 或 /reflect single | 当前会话 / 单次事件 |
| version | /reflect version [日期范围] | 多日工作日志(默认最近 7 天) + feedback 毕业 |
模式 1: single — 单次事件提取(默认)
触发: 刚修完一个具体问题 / 完成一次产品讨论 / 架构设计之后,立即评估这次经验是否值得回写到技能包或规则中。
输入
$ARGUMENTS 可选,描述刚经历的问题。未提供时,读取当天工作日志的最新 session。
步骤
1. 理解经验
从用户描述或工作日志中提取:
- 问题是什么: 根因、表现、影响范围
- 怎么解决的: 修复方案、关键决策
- 为什么会发生: 流程/架构/认知上的漏洞
2. 扫描现有技能与规则
读取所有相关 skill 和 rule 文件,判断:
| 问题类别 | 检查哪些文件 |
| 线上故障类 | incident/SKILL.md(已知模式表、排查步骤) |
| 代码质量类 | review/SKILL.md、.claude/rules/ |
| 架构漂移类 | drift-check/SKILL.md、.claude/rules/ |
| 部署发布类 | release/SKILL.md(原 ship + releaselog 合并) |
| 运维教训类 | docs/ops/deployment-lessons.md |
| 移动端设计类 | mobile-design/SKILL.md |
| 产品讨论/架构设计类 | product/SKILL.md(讨论流程、决策原则、3 提问纪律、主体一致性) |
| 代码理解走弯路类 | yuanfen-* skill / methodology §5.B |
| 通用工程类 | CLAUDE.md |
3. 输出评估报告
## Reflect (single) — [问题简述]
### 经验摘要
- 问题: ...
- 根因: ...
- 教训: ...
### 技能/规则影响评估
| # | 目标文件 | 现状 | 建议变更 | 理由 |
|---|---|---|---|---|
| 1 | incident/SKILL.md | 已知假阳性表无此模式 | 新增一行 | 这次踩坑的模式可复用 |
| 2 | .claude/rules/xxx.md | 已覆盖 | 无需变更 | — |
### 建议操作
- [ ] 更新 xxx(具体描述改什么)
- [ ] 无需操作(说明为什么是一次性问题)
### 待确认
请确认以上建议,确认后我来修改。判断标准
值得回写的信号:
- 同类问题可能再次发生(架构层面、跨服务交互、隐式约定)
- 现有 skill/rule 未覆盖此类检查
- 排查过程中走了弯路,可以通过规则避免
- AI 应该用 yuanfen engine 却没用(grep 漏了 / 凭记忆猜链路错了 / 读文件从头翻浪费轮次)— 回写到相关 skill 的"MUST 先查 yuanfen"段或 AGENTS.md §Code Intelligence
不回写的信号:
- 一次性环境问题(数据修复、配置遗漏)
- 已有规则覆盖但没执行(执行问题,不是规则问题)
- 修复方案已在代码中,无需额外文档化
按四层落笔(写入纪律,框架来自 /harness-groom)
经用户确认后写入 harness 的新教训,MUST 一出生就按四层结构落笔(框架详见 .claude/skills/harness-groom/SKILL.md §1),让 harness 边写边整理,不退化成需要大扫除的状态:
- L1 索引(WHEN): 什么时候需要它 — 落到目标文件的索引表 / 触发场景行
- L2 认识论(WHY): 这领域的世界怎么运作 — 目标文件已有同认识论的组就挂进去,NEVER 另起重复的 L2
- L3 规则(HOW): MUST/NEVER 可执行规则,逐字精确
- L4 实证(EVIDENCE): 这次踩坑的具体坐标 — 折叠到组尾或 deployment-lessons,正文留指针
允许空层:纯 tactical 的坑(如某 API 的参数陷阱)没有独立 L2,别硬凑。
落笔即保养(写入时的轻量除锈,防大扫除)
写入目标怎么选(归位决策树) + 各目标文件的形态契约,单一源见
.claude/rules/harness-write.md(编辑知识资产路径时自动加载)。本节只列写入动作三件事:
每次往 harness 写入时顺手做 3 件事。只做客观安全动作,NEVER 当场删改既有教训——删除权归用户,批量除锈走 /harness-groom:
- 挂组不另起:目标文件已有同认识论组 / 同主题段落 → 挂进去,NEVER 另起重复的 L2 / 新章节(重复是最大锈源)
- 锚点写可查落点:溯源写 L-编号 / spec 路径 / ADR 号,NEVER 写裸
vX.XX 教训/实证(裸版本锚点是下次除锈的主要清理对象,一出生就别带) - 阈值报警:写完看一眼目标文件——SKILL.md >500 行(该 Pattern 2 化,先例:methodology 拆分)/ 同文件裸版本锚点 ≥3 处 / 发现字面重复段 → 记一行到
memory/harness-inbox.md标[harness-groom候选],保养窗口批量处理,NEVER 当场大改
模式 2: version — 版本级回顾
触发: 版本发布后,扫描该版本期间所有工作日志,把重复出现的 pattern 永久化。
输入
$ARGUMENTS 指定日期范围,如 04-07~04-13。未指定时,扫描最近 7 天的日志。
步骤
1. 从日志中提取问题
扫描 memory/YYYY-MM-DD.md 中的:
- "遇到的问题"、"教训"、"踩坑"
- "遗留问题"、"待处理"
- 反复出现的 pattern
2. 分类
| 分类 | 写入位置 |
| 架构漂移类 | drift-check 的检查项 或 .claude/rules/ |
| 部署踩坑类 | release 的注意事项 或 CLAUDE.md |
| 代码质量类 | review 的审查维度 或 .claude/rules/ |
| 工具使用类 | .claude/rules/ 或 CLAUDE.md |
| 一次性问题 | 不处理(标记为"已知,不回写") |
3. 去重
检查候选规则是否已存在于 CLAUDE.md / rules / skills 中。已存在的不重复写入。
4. 提议候选规则
生成清单,等待用户确认后才写入。NEVER 自动写入。
5. harness 健康巡检(版本级保养雷达)
版本回顾时顺手扫 harness 健康指标,产出"保养建议清单"——只报告不动手(除锈动作归 /harness-groom + 用户拍板):
# 三个指标,单行可跑
wc -l .claude/skills/*/SKILL.md .claude/rules/*.md | sort -rn | head # >500 行 → Pattern 2 化候选
grep -cE '(v0\.[0-9]+|v1\.[0-9]+) (起|教训|实证)' .claude/rules/*.md # 裸版本锚点聚集 → 除锈候选
grep -c 'harness-groom候选' memory/harness-inbox.md # 落笔即保养的报警积压任一指标超阈值(文件 >500 行 / 单文件裸锚点 ≥5 / 候选积压 ≥3)→ 在 reflect 报告里提议开 /harness-groom 保养窗口。
Feedback 毕业制度
Memory 中的 feedback 类型记忆,如果在日志中再次出现(说明不是一次性的),应提议升级:
第 1 次出现 → memory(feedback 类型)
第 2 次出现 → reflect version 标记为"候选规则"
用户确认 → 写入 .claude/rules/ 或 skill
→ 从 memory 中删除原 feedback 文件
→ 更新 MEMORY.md 索引输出格式(version 模式)
## Reflect (version) — [版本号]([日期范围])
### 扫描范围
- 日志文件: N 个
- 提取问题: N 个
- 一次性问题: N 个(不处理)
- 候选规则: N 个
### 候选规则清单
| # | 来源日期 | 问题 | 候选规则 | 写入位置 |
|---|---|---|---|---|
| 1 | ... | ... | ... | ... |
### Feedback 毕业候选
| # | Memory 文件 | 内容 | 建议写入 |
|---|---|---|---|
| 1 | ... | ... | ... |
### 待确认
请确认以上候选规则和毕业项,确认后我来写入。共用纪律
- NEVER 自动修改 skill 或 rule,所有变更 MUST 经用户确认
- 评估要具体 — "建议在 incident 的假阳性表加一行"比"建议更新 incident skill"有用
- 沉淀教训到 rule / lessons / skill 时 MUST 全仓
grep同模式残留 + 同步修干净,NEVER 修一个文件就以为补齐(v0.81 教训:v0.64 BACKUP_DIR 教训只修了backup-postgres.sh,遗漏 4 个脚本,腾讯云迁移用户切换才暴露) - 如果结论是"无需变更",直接说,不要为了产出而硬凑建议
- single 模式 vs version 模式判别:没说日期范围 / 描述具体单次事件 → single;指定日期范围 / 提到版本号 / 多日扫描 → version
- 一次性问题(只出现一次、环境特有、已修复)不回写
- 写入后验证目标文件无格式破坏
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

