Skip to content
Back to skills

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
ai-agentsgobashnode

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 12, 2026

npx -y skills add hopkinson/spotter --skill spot-learn --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Spot Learn?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Spot Learn
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hopkinson-spot-learn/badge)](https://www.skillsdirectory.com/skills/hopkinson-spot-learn)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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.md2.3 KB
  • scripts/learn.mjs5.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.