erne-learn
- Repo stars 36
- License MIT
- Author repo 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.
- Fluxly category
- Data
- Author-declared agents
- No explicit declaration found; this is not inferred or tested compatibility
- Static check
- 94 / 100 · heuristic scan, not runtime safety proof
- Author / version / license
- @JubaKitiashvili · MIT
- Fluxly token estimate
- Lean
- Fluxly setup estimate
- Guided setup
- External API key
- No requirement detected
- Detected OS requirements
- macOS · Linux · Windows
- Runtime requirements
- Node.js
- Detected file/system behavior
-
- Read-only
- Write / modify
- Shell exec
- Detected network behavior
- Local-only
- Install commands
- None (reference only)
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
The current SKILL.md does not define a fixed output example. 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
… Author text anchors workflow facts; Fluxly only indexes current sections, terms, files, and commands.
sections -> What This Does → Process → When to Use → Note
terms -> script-driven · Run the extraction script · Review candidates · Approve or reject each candidate · Approve · Reject · Edit · Validate new content
files/cmd -> /erne-learn · PostToolUse · .claude/rules/ · .claude/skills/ · continuous-learning-v2.cjs
body sha256 -> cac46f7a5f00
Decide Fit First
Design Intent
How To Use It
Boundaries And Review