learnings-keeper
БесплатноБез исполняемых скриптовНе проверенPersistent cross-session knowledge base. Manages per-project learnings that compound across sessions — patterns, pitfalls, preferences, and project quirks…
от tensology★ 17 звёзд на GitHubОб этом скилле
Learnings Keeper
You manage the persistent knowledge that makes the agent smarter across sessions.
Each project gets a learnings.jsonl file. Learnings compound — the agent reads
relevant entries at session start and logs new discoveries during work.
This is the memory the agent keeps between conversations.
How It Works
Session 1 Session 2 Session 3
───────── ───────── ─────────
Works on auth flow Reads auth learnings Reads auth + api learnings
Logs: "JWT stored in (max 3, scored by (max 3, old ones decay)
httpOnly cookie" relevance + decay) Reinforces auth learning
Applies session 1 learning → it lives longer
Logs: "Rate limiting
uses token bucket"
Each session builds on previous knowledge. The agent gets faster without context rot because:
- Hard cap: max 3 learnings ever injected into context
- Staleness decay: 14-day half-life — unused learnings fade
- Reinforcement: frequently-used learnings survive decay
- Compaction: >5 entries on the same key get summarized into one
- On-demand: learnings are queried surgically, not dumped at session start
Learnings Format
Each entry is a JSONL line:
{
"ts": "2026-04-29T10:30:00Z",
"type": "pattern|pitfall|preference|quirk|operational",
"key": "kebab-case-identifier",
"insight": "Human-readable description of what was learned",
"confidence": 8,
"source": "observed|user-stated|inferred",
"files": ["path/to/relevant/file.ts"],
"skill": "skill-name-if-from-skill",
"branch": "feature/auth",
"tags": ["auth", "security"]
}
Types
| Type | When to use | Example |
|---|---|---|
pattern |
Recurring code/arch pattern | "Error responses always use {error, message, code} format" |
pitfall |
Thing that broke and will break again | "Environment variables in Next.js need NEXT_PUBLIC_ prefix for client" |
preference |
User's stated taste/choice | "Prefers explicit error handling over try/catch wrappers" |
quirk |
Project-specific weirdness | "Port 3000 conflicts with AirPlay on macOS — use 3001" |
operational |
Command/fix that saves time | "Database reset: npm run db:reset && npm run db:seed" |
Step 0: Session Start — Load Relevant Learnings
At the start of every session, get a tight context snippet — never the full file:
# This is what the agent calls. Returns at most 3 lines, or nothing.
python3 -c "
from distr.core.learnings.keeper import get_context_learnings
ctx = get_context_learnings()
if ctx:
print(ctx)
else:
print('LEARNINGS: 0 relevant')
"
Output: at most 3 lines like [learnings] key: insight. If nothing relevant,
returns None — inject nothing into context. The agent stays lean.
Step 1: During Session — Log New Learnings
Log a learning when:
- You discover a durable project quirk that would save 5+ minutes next time
- A pattern is confirmed by the user ("yes, we always do it that way")
- A pitfall is encountered that will recur
- The user states a preference explicitly
- A debug session reveals a non-obvious fix
Do NOT log:
- Obvious facts ("this project uses TypeScript")
- One-time transient errors
- Things the user could trivially infer
Logging command
from distr.core.learnings.keeper import log_learning
log_learning(
entry_type="pitfall",
key="auth-middleware-swallows-errors",
insight="auth.ts middleware returns 200 with empty body on token expiry instead of 401. Check for empty response bodies.",
confidence=9,
source="observed",
files=["distr/core/auth/middleware.py"],
tags=["auth", "security"],
)
Example
After discovering that the auth middleware swallows errors silently:
Logged learning: "auth-middleware-swallows-errors"
Type: pitfall
Insight: "auth.ts middleware returns 200 with empty body on token expiry instead of 401. Check for empty response bodies in auth flow."
Confidence: 9/10
Reinforcing (keep good learnings alive)
When a learning proves useful — the agent applied it and it worked — reinforce it. This bumps its score so it survives staleness decay longer:
from distr.core.learnings.keeper import reinforce_learning
reinforce_learning("auth-middleware-swallows-errors")
3+ reinforcements make a learning survive pruning indefinitely.
Step 2: Search Learnings
When the user asks "what have we learned about X?":
Search learnings by:
- Key substring: grep "auth" learnings.jsonl
- Tag: grep "security" learnings.jsonl
- Recent: tail -20 learnings.jsonl
- By file: grep "middleware/auth.ts" learnings.jsonl
Output format:
LEARNINGS: "auth" (3 matches)
═══════════════════════════════
[2026-04-15] pitfall | auth-middleware-swallows-errors (confidence: 9/10)
auth.ts middleware returns 2
Установить learnings-keeper в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл learnings-keeper?
Persistent cross-session knowledge base. Manages per-project learnings that compound across sessions — patterns, pitfalls, preferences, and project quirks. The agent gets smarter on your codebase over time. At session start, searches relevant learnings. During sessions, logs discoveries. Supports review, search, prune, and export. Use proactively when the agent encounters a durable project quirk, user preference, or pattern that would save 5+ minutes next time. Also use at session start to recover context. Triggers: "remember this", "log this", "what have we learned?", "show learnings".
Как установить скилл learnings-keeper?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл learnings-keeper запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
agent-skill-stack
Find, evaluate, and assemble the smallest compatible set of AI Agent Skills for an end-to-end natural-language goal. Use when a user wants Skills for a…
от GitHubbuild-evidence-map
Build an auditable evidence map for a contested technical choice, research synthesis, proposal review, or consequential decision. Use when Copilot must…
от GitHubpinecone-rag
Build production RAG pipelines and persistent agent memory using Pinecone as the vector database backend. ALWAYS USE THIS SKILL when the user mentions…
от GitHubqdrant-monitoring-debugging
Diagnoses Qdrant production issues using metrics and observability tools. Use when someone reports 'optimizer stuck', 'indexing too slow', 'memory too high'…
от GitHub