agent-lessons-learned-capture
Capture durable lessons from debugging, user corrections, missing capabilities, and repeated workflow friction so future sessions avoid the same mistakes. Use…
от rondoflow★ 37 звёзд на GitHub
Установить agent-lessons-learned-capture в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Self-Improvement
Capture, review, promote, and extract durable lessons so future sessions avoid repeating the same mistakes.
Core idea
Use this skill for reusable learning, not for every bump in the road.
A good entry usually has at least one of these properties:
- It corrected a wrong assumption.
- It revealed a project-specific convention.
- It required real debugging or investigation.
- It is likely to recur.
- It should change future workflow, memory, or tooling.
Do not log routine noise such as obvious typos, expected validation failures, or errors that were solved immediately with no transferable lesson.
Important path model
There are two different roots in this skill:
Skill root — where bundled resources live:
scripts/...references/...assets/...
Workspace root — where the project or active workspace lives:
.learnings/LEARNINGS.md.learnings/ERRORS.md.learnings/FEATURE_REQUESTS.mdCLAUDE.md,AGENTS.md,.github/copilot-instructions.md,SOUL.md,TOOLS.md
Never write learnings into the installed skill directory. Always target the workspace root.
Quick decision table
| Situation | What to do |
|---|---|
| User corrects you or updates a fact | Log a learning |
| Non-obvious command / API / tool failure | Log an error |
| User asks for a missing capability | Log a feature request |
| You discover a reusable workaround or convention | Log a learning |
| A pattern keeps recurring | Search related entries, link with See Also, and consider promotion |
| A lesson is broadly applicable or repeated | Promote it into project memory |
| A resolved, general pattern could help other projects | Extract a new skill |
Standard workflow
1) Find the workspace root first
Before reading or writing .learnings/, determine WORKSPACE_ROOT.
Good defaults:
- the repository root for the current codebase
- the OpenClaw workspace root
- the directory containing the files being edited
If unsure, prefer the directory containing .git, AGENTS.md, CLAUDE.md, or the user's active project files.
2) Initialise .learnings/ if needed
Use the helper instead of creating files manually:
python3 scripts/learnings.py init --root /absolute/path/to/workspace
This creates:
.learnings/LEARNINGS.md.learnings/ERRORS.md.learnings/FEATURE_REQUESTS.md
3) Review existing learnings before risky or familiar work
Review first when:
- you are returning to an area with prior failures
- the task touches infra, CI, deployment, auth, data migration, or generated code
- the user explicitly says “remember this”, “we hit this before”, or similar
Use the helper:
python3 scripts/learnings.py status --root /absolute/path/to/workspace
python3 scripts/learnings.py search --root /absolute/path/to/workspace --query "pnpm" --limit 5
4) Search before logging to avoid duplicates
Always search for related entries before creating a new one.
python3 scripts/learnings.py search --root /absolute/path/to/workspace --query "keyword or pattern" --limit 10
If a similar entry already exists:
- prefer linking with
See Also - reuse or add a stable
Pattern-Keyfor recurring issues - bump priority only when recurrence justifies it
- prefer updating the existing pattern story over spraying near-duplicate entries
5) Log the right kind of entry
Learning
Use for corrections, knowledge gaps, best practices, and durable conventions.
python3 scripts/learnings.py log-learning \
--root /absolute/path/to/workspace \
--category correction \
--priority high \
--area backend \
--summary "Project uses pnpm workspaces, not npm" \
--details "Attempted npm install. Lockfile and workspace config showed pnpm." \
--suggested-action "Check for pnpm-lock.yaml before assuming npm." \
--source error \
--related-files pnpm-lock.yaml pnpm-workspace.yaml \
--tags package-manager,pnpm
Error
Use for non-obvious failures, exceptions, or tool/API issues worth remembering.
python3 scripts/learnings.py log-error \
--root /absolute/path/to/workspace \
--name docker-build \
--priority high \
--area infra \
--summary "Docker build failed on Apple Silicon due to platform mismatch" \
--error-text "error: failed to solve: no match for platform linux/arm64" \
--context "docker build -t myapp . on Apple Silicon" \
--suggested-fix "Retry with --platform linux/amd64 or update base image" \
--reproducible yes \
--related-files Dockerfile
Feature request
Use when the user wants a missing capability or a recurring friction point should become a feature.
python3 scripts/learnings.py log-feature \
--root /absolute/path/to/workspace \
--capability export-to-csv \
--priority medium \
--area backend \
--summary "User needs report export to CSV" \
--user-context "Needed for sharing weekly reports with non-t
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- manifest.json
FAQ
Что делает скилл agent-lessons-learned-capture?
Capture durable lessons from debugging, user corrections, missing capabilities, and repeated workflow friction so future sessions avoid the same mistakes. Use this skill when a non-obvious failure is diagnosed, the user corrects or updates the agent, a workaround or project conv…
Как установить скилл agent-lessons-learned-capture?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл agent-lessons-learned-capture запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…