# Learnings Loop

> Self-improving knowledge system. Automatically records patterns, conventions, failures, and decisions discovered during work. Use at session end or when discovering something worth preserving.

- Skill: `rhythmmittal19/learnings-loop` (Agent Skill)
- Install (CLI): `npx skillmds@latest add rhythmmittal19/learnings-loop`
- Raw SKILL.md: https://api.skillmd.com/api/skills/rhythmmittal19/learnings-loop/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: RhythmMittal19 (https://skillmd.com/u/rhythmmittal19)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/rhythmmittal19/learnings-loop

---


# Learnings Loop — Self-Improving Memory

## How It Works
This skill creates a feedback loop where each session builds on previous knowledge.

## At Session Start
Check if `learnings.md` exists in the project root:
```bash
cat learnings.md 2>/dev/null | head -50
```
If it exists, read it and apply those learnings to your current work.

## During Work — Record When You Discover:
- A codebase convention not documented elsewhere
- A bug pattern and its root cause
- A library quirk or workaround
- An architecture decision and the reasoning
- A performance insight
- A testing pattern that works well here

## At Session End — Update learnings.md:
Append new entries using this format:

```markdown
### [Date] — [Category]
**Context**: [What were you working on]
**Learning**: [What you discovered]
**Evidence**: [File/commit where this applies]
**Impact**: [How this should influence future work]
```

## Categories
- `convention` — How things are done here (naming, patterns, structure)
- `gotcha` — Something that looks right but is wrong; avoid this trap
- `pattern` — A successful approach worth reusing
- `decision` — An architecture/design choice and why it was made
- `performance` — Something that affects speed/memory/bundle size
- `workaround` — A hack needed because of a bug/limitation elsewhere

## Promotion Rules
When a learning has been validated across 3+ sessions:
- Promote it to CLAUDE.md or .claude/rules/ for automatic loading
- Remove it from learnings.md to keep the file lean
- learnings.md should stay under 100 entries

## Weekly Consolidation
Run `/user:consolidate-learnings` weekly to:
1. Review all entries
2. Merge duplicates
3. Promote validated patterns
4. Archive stale entries

