erne 会话审查
- 作者仓库星标 36
- 许可证 MIT
- 作者仓库 everything-react-native-expo
/erne-learn — Generate Skills from Session
You are executing the /erne-learn command. This is script-driven — it runs the continuous-learning-v2 pipeline directly.
What This Does
Analyzes the current coding session to extract reusable patterns and save them as skills or rule amendments for future sessions. This is the manual trigger for what PostToolUse hooks do automatically.
Process
- Run the extraction script:
node .claude/hooks/scripts/extract-session-patterns.js
This script:
- Scans recent tool calls and file changes
- Identifies patterns (repeated fixes, style corrections, common architectures)
- Compares against existing rules and skills
- Generates candidates for new content
- Review candidates: The script outputs a list of potential learnings:
[PATTERN] Zustand store always uses immer middleware → Suggest rule amendment
[PATTERN] All screens use SafeAreaView wrapper → Suggest coding-style rule
[PATTERN] API calls always retry 3 times → Suggest pattern rule
[SKILL] Complex form validation flow → Suggest skill creation
- Approve or reject each candidate: For each candidate, decide:
- Approve → Script writes to
.claude/rules/or.claude/skills/ - Reject → Skip this pattern
- Edit → Modify before saving
- Validate new content:
node .claude/hooks/scripts/validate-content.js
Ensures new rules/skills have valid frontmatter and don't conflict with existing content.
When to Use
- After a long coding session where you established new patterns
- When you notice yourself repeatedly making the same corrections
- After integrating a new library and establishing conventions
- Periodically to capture accumulated project knowledge
Note
The automatic PostToolUse hook (continuous-learning-v2.cjs) does lightweight extraction after every tool call. This /erne-learn command runs a comprehensive analysis that catches patterns the real-time hook might miss.
- 流狐分类
- 数据
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 94 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @JubaKitiashvili · MIT
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 需简单配置
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- macOS · Linux · Windows
- 底层运行要求
- Node.js
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 Analyzes the current coding session to extract reusable patterns and save them as skills or rule amendments for future sessions. This is the manual trigger for what PostToolUse hooks do automatically.
Run the extraction script: This script: Scans recent tool calls and file changes
After a long coding session where you established new patterns When you notice yourself repeatedly making the same corrections After integrating a new library and establishing conventions
The automatic PostToolUse hook (continuous-learning-v2.cjs) does lightweight extraction after every tool call. This /erne-learn command runs a comprehensive analysis that catches patterns the real-time hook might miss.
# /erne-learn — Generate Skills from Session
You are executing the `/erne-learn` command. This is **script-driven** — it runs the continuous-learning-v2 pipeline directly.
## What This Does
Analyzes the current coding session to extract reusable patterns and save them as skills or rule amendments for future sessions. This is the manual trigger for what `PostToolUse` hooks do automatically.
## Process
1. **Run the extraction script:**
```bash
node .claude/hooks/scripts/extract-session-patterns.js
```
This script:
- Scans recent tool calls and file changes
- Identifies patterns (repeated fixes, style corrections, common architectures)
- Compares against existing rules and skills
- Generates candidates for new content
2. **Review candidates:**
The script outputs a list of potential learnings:
```
[PATTERN] Zustand store always uses immer middleware → Suggest rule amendment
[PATTERN] All screens use SafeAreaView wrapper → Suggest coding-style rule
[PATTERN] API calls always retry 3 times → Suggest pattern rule
[SKILL] Complex form validation flow → Suggest skill creation
```
3. **Approve or reject each candidate:**
For each candidate, decide:
- **Approve** → Script writes to `.claude/rules/` or `.claude/skills/`
- **Reject** → Skip this pattern
- **Edit** → Modify before saving
4. **Validate new content:**
```bash
node .claude/hooks/scripts/validate-content.js
```
Ensures new rules/skills have valid frontmatter and don't conflict with existing content.
## When to Use
- After a long coding session where you established new patterns
- When you notice yourself repeatedly making the same corrections
- After integrating a new library and establishing conventions
- Periodically to capture accumulated project knowledge
## Note
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> What This Does → Process → When to Use → Note
要点 -> script-driven · Run the extraction script · Review candidates · Approve or reject each candidate · Approve · Reject · Edit · Validate new content
文件/命令 -> /erne-learn · PostToolUse · .claude/rules/ · .claude/skills/ · continuous-learning-v2.cjs
内容 SHA-256 -> cac46f7a5f00
方法与流程
适用与边界
原文中的明确线索
/erne-learn、PostToolUse、.claude/rules/、.claude/skills/、continuous-learning-v2.cjs