Back to skills
SKILL.md
Spot Learn
ASecurity提取开发经验与踩坑教训,沉淀为项目规则或全局偏好。Use to persist reusable engineering rules, bug patterns, or platform conventions.
- 6 stars
- 0 votes
- 0 copies
- 1 view
- Added November 12, 2026
Security analysis
100/100Pro scans all 2 files and shows the line behind each finding
npx -y skills add hopkinson/spotter --skill spot-learn --agent claude-codeAre you the author of Spot Learn?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hopkinson-spot-learn)---
name: spot-learn
description: 提取开发经验与踩坑教训,沉淀为项目规则或全局偏好。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`。
### 核心操作与交互
1. **自动提炼 + 零心智确认(对话中)**:
- 当遇到用户纠偏(如“不要 X,改为 Y”)、深坑排查成功(连续定位失败后解决/踩平台环境坑)或阶段性交付新约束时,提炼 1 行可复用规则草案,按公共规则「统一收尾」竞争可选提醒名额;不因普通任务完成就追加沉淀提醒。
- 用户回复「沉淀」或执行命令,即可一键写入,无需用户自行起草。
2. **命令行调用**:
- **新增沉淀**:
```bash
node "<本技能目录>/scripts/learn.mjs" add --rule "规则内容" [--scope project|global] [--category 类别]
```
- **查阅沉淀**:
```bash
node "<本技能目录>/scripts/learn.mjs" list [--scope project|global]
```
3. **沉淀规范**:
- 规则用极简祈使句,说明「场景与约束」或因果关系「X → Y」,避免口水话。
- 自动去重:若目标文件中已存在相同规则,则提示已存在,不重复追加。
### 沉淀收尾
按公共规则「统一收尾」处理:确认前展示规则草案与项目/全局存储范围;成功后报告实际目标文件,以及已核实的加载情况或尚未核实的缺口,不把保存成功说成已经生效。已存在时说明未重复写入;无必要后续操作就自然结束。
Files in this skill
- SKILL.md
- scripts/learn.mjs
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.