self-improving-agent

Captures skill experiences into multi-memory artifacts and proposes validated skill updates.

Updated May 28, 2026
One-click install
npx skills add https://github.com/changfengpro/agent-skills --skill self-improving-agent-changfengpro
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: self-improving-agent
Source: https://github.com/changfengpro/agent-skills/tree/main/skills/self-improving-agent
Command: npx skills add https://github.com/changfengpro/agent-skills --skill self-improving-agent-changfengpro

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? AI agents repeat the same mistakes across sessions because lessons from past workflows are never captured, so skill guidance stays stale and errors recur. ## Core Features & Use Cases - Multi-Memory Architecture: Stores reusable patterns in semantic memory, specific experiences in episodic memory, and live context in working memory under ~/.claude/memory/. - Evidence-Gated Learning: Extracts patterns from completed skill runs, tracks confidence scores, and writes proposal artifacts before any durable skill change. - Self-Correction & Validation: Captures error context from failed Bash commands, proposes corrected guidance, and validates updates with templates and human feedback. - Use Case: After a debugging session reveals an empty callback caused stale data, the agent records the episode, abstracts a callback-verification pattern, and proposes a checklist update to the debugger skill. ## Quick Start Ask the agent to self-improve by saying "self-improve" or "analyze today's experiences" after completing a high-signal workflow such as debugging or code review.

Frequently Asked Questions about self-improving-agent

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make an AI agent learn from past sessions?

Use a self-improvement loop that extracts experiences after each skill run, abstracts them into reusable patterns, and stores them in semantic and episodic memory files. This skill writes episodes and proposals under ~/.claude/memory/ and promotes only validated patterns.

How to trigger self-improvement after a skill completes?

Configure metadata.hooks in the skill's SKILL.md frontmatter with after_complete triggers pointing to self-improving-agent. For Claude Code, wire PreToolUse, PostToolUse, and Stop hooks to the provided bash scripts in the hooks directory.

Does the self-improving agent modify skills automatically?

No, it follows a capture-first promotion policy. Episodes, patterns, and proposals are written automatically, but changes to SKILL.md, AGENTS.md, or code require explicit user approval, recurring evidence, or passing tests.

What memory structure does a lifelong learning agent use?

It uses three memory types: semantic memory for abstract patterns with confidence scores, episodic memory for dated JSON records of specific experiences, and working memory for current session and error context.

Why does self-correction not trigger on every error?

The on_error hook only logs to the session to avoid infinite recursion. Self-correction is instead triggered when other skills like debugger or code-reviewer complete, keeping the feedback loop stable.