← ClaudeAtlas

moradin-learn-from-sessionslisted

Extract user preferences from accumulated Claude Code session history. One-time bootstrap that mines your past corrections, preferences, and lessons into reviewable candidates.
CloseTheLoops/moradin · ★ 2 · AI & Automation · score 70
Install: claude install-skill CloseTheLoops/moradin
# moradin:learn-from-sessions Mine your accumulated Claude Code session history for implicit preferences. Surfaces candidates for review; operator decides what becomes memory. ## When to invoke `/moradin:learn-from-sessions [--since 180d] [--project <name>]` Best run ONCE at first-time setup, then again periodically (monthly or quarterly) to catch new patterns. For per-session incremental capture, use `/moradin:ship` after each session. ## What you do 1. **Set up.** Confirm `ANTHROPIC_API_KEY` is in env. If not, ask operator to set it or use `--local-only` mode. 2. **Discover sessions.** Run `scripts/session_scanner.py --since 180 --count-only` to show operator how many sessions/turns will be scanned. 3. **Estimate cost.** Roughly $0.001 per turn for pre-filter + $0.01 per extracted candidate. For ~10k turns: typically $8-15. 4. **Confirm with operator** before running the expensive extraction. 5. **Run extraction.** ```bash python scripts/extract_preferences.py --since 180 --min-count 5 --min-sessions 3 ``` This: - Scans matching JSONL files - Pre-filters with regex (corrections / preferences / lessons signal patterns) - Classifies filtered turns with Haiku (cheap) - Extracts structured candidates with Sonnet (strong) - Clusters similar candidates - Applies stability thresholds (count ≥ 5, sessions ≥ 3, confidence ≥ 0.6) - Writes review file to `scratch/proposed_<date>.md` 6. **Surface results to operator.** Read the proposed file,