hopkinson/spotter / skills/spot-learn
spot-learn
Verified提取开发经验与踩坑教训,沉淀为项目规则或全局偏好。Use to persist reusable engineering rules, bug patterns, or platform conventions.
用本目录的 scripts/learn.mjs 记录规则或查看已沉淀知识。
规则存储位置
- 项目级(默认):优先写入已有的
rules/AGENTS.md;否则使用已有的.agents/rules/spot-workflow.md。若后者通过@[名称](路径)引用了存在的文件,则写入该文件;引用目标不存在时仍写入spot-workflow.md。两者均不存在时,写入.agents/rules/learned.md。 - 全局级:使用
--scope global写入~/.spotter/rules.md。 - 显式目标:使用
--target <文件路径>覆盖上述默认路径;相对路径以当前业务项目工作目录解析。
保存文件不代表助手已加载规则。确认存储范围后,核对目标文件是否在当前助手的规则加载链路中;需要写入用户全局规则时,显式指定 --target。
核心操作与交互
-
自动提炼 + 零心智确认(对话中):
- 当遇到用户纠偏(如“不要 X,改为 Y”)、深坑排查成功(连续定位失败后解决/踩平台环境坑)或阶段性交付新约束时,提炼 1 行可复用规则草案,按公共规则「统一收尾」竞争可选提醒名额;不因普通任务完成就追加沉淀提醒。
- 用户回复「沉淀」或执行命令,即可一键写入,无需用户自行起草。
-
命令行调用:
- 新增沉淀:
node "<本技能目录>/scripts/learn.mjs" add --rule "规则内容" [--scope project|global] [--category 类别] - 查阅沉淀:
node "<本技能目录>/scripts/learn.mjs" list [--scope project|global]
- 新增沉淀:
-
沉淀规范:
- 规则用极简祈使句,说明「场景与约束」或因果关系「X → Y」,避免口水话。
- 自动去重:若目标文件中已存在相同规则,则提示已存在,不重复追加。
沉淀收尾
按公共规则「统一收尾」处理:确认前展示规则草案与项目/全局存储范围;成功后报告实际目标文件,以及已核实的加载情况或尚未核实的缺口,不把保存成功说成已经生效。已存在时说明未重复写入;无必要后续操作就自然结束。
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |