Triage each Claude Code session into per-session learnings, then consolidate them into stable principles.
Consolidate session files in the plugin data directory into PRINCIPLES.md and archive the processed sessions. Does not edit anything outside the data directory — only flags suggestions.
Triage a Claude Code session. Without arguments analyses the current conversation; with arguments runs headless from the SessionEnd hook.
A Claude Code plugin marketplace (ondrejhlavacek) that ships the learning-loop plugin — automatic per-session triage plus on-demand consolidation into stable principles.
Every session leaves behind a short learnings file. Periodically you consolidate them into
PRINCIPLES.md. Over time your Claude Code setup gets smarter without you having to write CLAUDE.md rules by hand.
This repo is a marketplace (.claude-plugin/marketplace.json, name ondrejhlavacek) hosting one plugin:
/learning-loop:update-learnings, /learning-loop:consolidate-learnings commands + a SessionEnd hook that auto-triages every session.See learning-loop/README.md for what the plugin does and where it writes.
Inside Claude Code:
/plugin marketplace add ondrejhlavacek/claude-learning-loop
/plugin install learning-loop@ondrejhlavacek
That's it. The SessionEnd hook is registered automatically by the plugin manifest, and the slash commands become available as /learning-loop:update-learnings and /learning-loop:consolidate-learnings.
/plugin
You should see learning-loop listed under the ondrejhlavacek marketplace as enabled.
After your next session ends, check:
ls ~/.claude/plugins/data/learning-loop-ondrejhlavacek/sessions/
A new YYYY-MM-DD-HHMM-<sid>.md file should appear within a few seconds of the session closing.
/plugin marketplace update ondrejhlavacek
Claude Code pulls the latest commit and re-loads the plugin. No manual file syncing.
/plugin uninstall learning-loop@ondrejhlavacek
/plugin marketplace remove ondrejhlavacek
Data in ~/.claude/plugins/data/learning-loop-ondrejhlavacek/ is not removed by uninstall — delete it manually if you want a clean slate.
/plugin available)bash, jq, claude CLI on PATH┌─────────────────────┐ SessionEnd ┌──────────────────────────┐
│ Claude Code session│ ───────────────▶ │ update-learnings-hook.sh │
└─────────────────────┘ (async) └────────────┬─────────────┘
│ nohup, detached
▼
┌─────────────────────────────────┐
│ headless `claude -p` │
│ /learning-loop:update-learnings│
│ → ${CLAUDE_PLUGIN_DATA}/ │
│ sessions/*.md │
└─────────────────────────────────┘
/learning-loop:consolidate-learnings (manual, on demand)
│
▼
sessions/*.md ─▶ PRINCIPLES.md + archive/
State lives entirely under ${CLAUDE_PLUGIN_DATA} (resolves to ~/.claude/plugins/data/learning-loop-ondrejhlavacek/) — Claude Code's official per-plugin data directory. Nothing leaks into $HOME or any project repo.
The hook is async, detached (nohup), and uses a LEARNINGS_HOOK_RUNNING guard so the nested headless session doesn't trigger another triage — preventing a fork bomb.
MIT — see LICENSE.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub ondrejhlavacek/claude-learning-loop --plugin learning-loopComplete AI coding workflow system. Self-correcting memory + persistent FTS5-indexed research wikis + auto-research loop + multi-LLM council on a single SQLite store. 33 skills, 8 agents, 22 commands, 37 hook scripts across 24 events. Cross-agent via SkillKit.
Consult multiple AI coding agents (Gemini, OpenAI, Grok, Perplexity, plus codex and gemini CLIs when installed) to get diverse perspectives on coding problems
20 SEO/GEO skills and 5 commands on one shared contract for keyword research, content creation, technical audits, schema markup, monitoring, quality gates, entity truth, and campaign memory.
Production-grade academic research pipeline for Claude Code: research → write → review → revise → finalize. 4 skills, 27 modes, 39-agent ensemble, v3.7.3 + v3.8 L3 claim-faithfulness gate, v3.9.0 cross-index triangulation, v3.10 triangulation policy layer, v3.11 deterministic citation verification gate (#182).
Harness-native ECC operator layer - 67 agents, 271 skills, 92 legacy command shims, reusable hooks, rules, selective install profiles, and production-ready workflows for Claude Code, Codex, OpenCode, Cursor, and related agent harnesses
Complete collection of battle-tested Claude Code configs from an Anthropic hackathon winner - agents, skills, hooks, and rules evolved over 10+ months of intensive daily use