self-improving-agent · pskoett — Claude Code skill: an agent error log
This skill keeps a markdown log of agent errors, corrections and findings so useful fixes survive between sessions.
npx skills add pskoett/self-improving-agent --skill self-improving-agent -a claude-codeWhat self-improving-agent does
Everything worth keeping goes into three files under .learnings/: LEARNINGS.md for corrections, knowledge gaps and good practices, ERRORS.md for failed commands and integration errors, FEATURE_REQUESTS.md for capabilities the user asked for. On first use the directory and files are created; existing ones are never overwritten. Before a big task the agent reads back what it saved and reuses whatever fits.
Entries that turn out to be broadly useful get promoted into workspace files: behavioural patterns into SOUL.md, workflow tweaks into AGENTS.md, tool gotchas into TOOLS.md. Recurring cases carry a Pattern-Key so duplicates don't pile up, and a repeat only counts when it's a genuinely new occurrence. Revalidation is tied to what could change — the source, the decision, a dependency, the task — not to how old a note is.
Secrets, tokens and environment variables stay out of the log; short summaries or redacted excerpts are preferred. Automatic reminders and end-of-session error sweeps come from an optional hook, and it only runs where .learnings/ already exists. This build targets OpenClaw; for other agents the author points to the original multi-agent version in a separate repo.
What it helps with
- log a failed command so it doesn't bite twice
- save a user correction as a working rule
- record a missing capability and revisit it later
- pull a good approach from an earlier session into the current task
- move a recurring tool gotcha into workspace notes
Example prompts for the agent
- log this failure to
.learnings/ERRORS.md - the user corrected my assumption — record it as a correction
- check
.learnings/LEARNINGS.mdbefore you start the refactor
How to install self-improving-agent
1Skills CLI (Vercel)
npx skills add pskoett/self-improving-agent --skill self-improving-agent -a claude-code2Manually: put the files in place
~/.claude/skills/self-improving-agent/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/self-improving-agent/
1Skills CLI (Vercel)
npx skills add pskoett/self-improving-agent --skill self-improving-agent -a codex2Manually: put the files in place
.agents/skills/self-improving-agent/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add pskoett/self-improving-agent --skill self-improving-agent -a cursor2Manually: put the files in place
.cursor/skills/self-improving-agent/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install pskoett/self-improving-agent self-improving-agent2Manually: put the files in place
.github/skills/self-improving-agent/SKILL.md1Skills CLI (Vercel)
npx skills add pskoett/self-improving-agent --skill self-improving-agent -a gemini-cli2Platform CLI
gemini skills install https://github.com/pskoett/self-improving-agent --path self-improving-agentManually: put the files in place
.devin/skills/self-improving-agent/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add pskoett/self-improving-agent --skill self-improving-agent -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about self-improving-agent
How do I install self-improving-agent in Claude?
Run npx skills add pskoett/self-improving-agent --skill self-improving-agent -a claude-code. The skill lands at ~/.claude/skills/self-improving-agent/SKILL.md.
What does self-improving-agent do?
It keeps errors, corrections and knowledge gaps in markdown files under .learnings/, then promotes the important ones into workspace files such as AGENTS.md and TOOLS.md.
Does it need any companion service or plugin?
No. Capture, review, reuse and promotion all live inside the skill. The hook is optional: it reminds you and sweeps errors at session end, but it doesn't enforce the workflow.
Similar skills
All skills for Agent setup: memory, context, orchestration →self-improving-agent by other authors comes first.