MCPInstall

self-improving-agent

Patterns for AI agents that learn from their own execution, detect failure modes, and improve autonomously. Use when building agents that get better over time, managing auto- memory, or designing self-correcting feedback loops.

Installs
235
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/borghei/claude-skills --skill self-improving-agent
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads self-improving-agent automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Self-Improving Agent - Autonomous Learning Patterns

Architectural patterns for AI agents that get better with use. Most agents are stateless -- they repeat mistakes because they cannot learn from their own execution. This skill closes that gap with patterns for feedback capture, memory curation, skill extraction, and regression detection. Key insight: auto-memory captures everything, but curation turns noise into knowledge.

Core Capabilities

  • Memory curation — a layered memory stack (CLAUDE.md → MEMORY.md → session), review protocol, and promotion criteria for graduating learnings into enforced rules.
  • Feedback loops — outcome classification, signal extraction, and a capture template that turn every task result into a structured learning.
  • Regression detection — metrics, thresholds, and a response protocol that flags performance degradation within a few sessions.
  • Skill extraction — criteria and a 4-step process to graduate proven patterns into standalone skill packages.
  • Meta-learning — adaptive capture strategy and anti-pattern detection so the agent learns what is worth learning.
  • Continuous calibration — confidence scoring and belief revision for resolving contradictions across learned knowledge.

When to Use

  • Building agents intended to improve over time rather than stay stateless.
  • Managing auto-memory (MEMORY.md) and deciding what to keep, promote, or retire.
  • Designing self-correcting feedback loops and regression alarms for agent behavior.
  • Graduating recurring solutions into reusable skill packages.

Clarify First

Before capturing or promoting learnings, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.

  • Loop stage: remember / extract / promote / review (routes the sub-skill and the whole workflow).
  • Source data: which session logs, MEMORY.md, and rules dir to operate on (the subject the tools read and write).
  • Promotion bar: min occurrences / confidence threshold for graduating a learning into an enforced rule (--min-occurrences; decides what is kept vs discarded).

Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.

Sub-Skills

Compound sub-skill architecture — each file in skills/ handles one step of the improvement loop:

Sub-SkillFilePurpose
Rememberskills/remember.mdCapture errors and learnings from current session
Extractskills/extract.mdExtract reusable patterns from completed work
Promoteskills/promote.mdGraduate proven patterns to permanent rules
Reviewskills/review.mdAudit memory health, prune stale entries
Statusskills/status.mdDashboard showing memory state and learning progress

Flow: Remember → Extract → Promote → Review, with Status providing visibility back into the cycle.

Tools

ToolPurposeCommand
pattern_extractor.pyExtract reusable patterns from session logspython scripts/pattern_extractor.py --input sessions.jsonl --min-occurrences 3
memory_health_checker.pyAudit memory for line counts, stale, and promotable entriespython scripts/memory_health_checker.py --memory ./MEMORY.md --rules ./.claude/rules/
rule_promoter.pyValidate and apply promotions from memory to rulespython scripts/rule_promoter.py --memory ./MEMORY.md --list-candidates
feedback_analyzer.pyAnalyze feedback logs for success rates and opportunitiespython scripts/feedback_analyzer.py analyze
regression_detector.pyCompare baseline vs current performance metricspython scripts/regression_detector.py compare
rule_manager.pyManage a learned rules knowledge base with CRUDpython scripts/rule_manager.py list

References

Load the reference that matches the task — keep this file lean and pull detail on demand:

  • references/memory-curation-guide.md — the memory stack, review protocol, promotion criteria/targets, the Weekly Memory Health Check workflow, and the continuous-calibration (confidence scoring + belief revision) machinery. Read when curating MEMORY.md or promoting learnings to rules.
  • references/feedback-loop-patterns.md — the core improvement-loop architecture and maturity levels, outcome classification + signal extraction, the capture template, regression metrics/response, the post-session and regression-investigation workflows, common pitfalls, troubleshooting, and the success-criteria bar. Read when designing feedback capture or diagnosing a regression.
  • references/meta-learning-architectures.md — skill-extraction criteria and process, the adaptive capture strategy, and anti-pattern detection. Read when the agent should adapt its own learning strategy or extract a proven pattern into a skill.
  • references/self-improvement-methodology.md — the five layers of agent learning, the confidence-scoring model, the promotion decision tree, the memory-curation checklist, anti-patterns, and the metrics/thresholds table. Read for the end-to-end methodology overview.

Scope & Limitations

This skill covers:

  • Architectural patterns for building agents that learn from execution history and user feedback.
  • Memory lifecycle management: capture, curation, promotion, and retirement of learned knowledge.
  • Performance regression detection frameworks and response protocols for agent systems.
  • Skill extraction methodology for graduating proven patterns into reusable, standalone packages.

This skill does NOT cover:

  • Runtime agent orchestration or multi-agent coordination -- see agent-workflow-designer and agent-protocol.
  • Prompt engineering, testing, or versioning of the prompts themselves -- see prompt-engineer-toolkit.
  • Infrastructure-level observability (logging, tracing, alerting dashboards) -- see observability-designer.
  • Initial agent architecture design, tool selection, or capability planning -- see agent-designer.

Integration Points

SkillIntegrationData Flow
context-engineControls what the agent sees per session; this skill decides what is worth remembering long-termPromoted rules and curated memory feed context retrieval; context relevance metrics flow back for regression tracking
agent-designerDefines the agent's architecture and capabilities; this skill layers learning infrastructure on topArchitecture constraints inform possible feedback loops; extracted skills feed back as new capabilities
prompt-engineer-toolkitPrompts degrade as codebases evolve; this skill detects prompt regression via outcome trackingPerformance metrics flag underperforming prompts; prompt updates feed back as CLAUDE.md rule changes
observability-designerProvides system-level metrics; this skill provides agent-behavior-level metricsSystem telemetry enriches regression diagnosis; agent metrics export to observability dashboards
tech-debt-trackerStale rules and bloated memory are technical debt this can surface alongside code debtMemory health metrics feed debt scoring; debt prioritization informs which stale rules to retire
agent-workflow-designerMulti-step workflows benefit from per-step feedback capture and cross-workflow pattern extractionPer-step outcome data flows into feedback loops; extracted optimizations update workflow definitions

FAQ

What does the self-improving-agent skill do?

Patterns for AI agents that learn from their own execution, detect failure modes, and improve autonomously. Use when building agents that get better over time, managing auto- memory, or designing self-correcting feedback loops.

How do I install self-improving-agent?

Run npx skills add https://github.com/borghei/claude-skills --skill self-improving-agent in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/self-improving-agent/ (personal) or .claude/skills/self-improving-agent/ (project).

Which AI agents can use self-improving-agent?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is self-improving-agent safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains self-improving-agent?

It is published by borghei in borghei/claude-skills. It has 235 recorded installs.

More from borghei/claude-skills

View all →

product-designer

borghei/claude-skills

Product design across UI/UX, design systems, prototyping, and user research. Use when creating user journey maps, building wireframes, defining design tokens and component systems, planning usability tests, or establishing design principles.

Frontend & Design4.9K installs

business-intelligence

borghei/claude-skills

Business intelligence across dashboard design, visualization, and reporting automation. Use when designing dashboards, building KPI frameworks, automating reports, creating data stories, or optimizing BI tool performance.

Business & Finance1.5K installs

brand-strategist

borghei/claude-skills

Brand strategy covering positioning, identity, brand architecture, messaging frameworks, and governance. Use when developing brand positioning, creating messaging frameworks, auditing brand health, or building brand architecture.

Marketing & SEO776 installs

data-analyst

borghei/claude-skills

Data analysis across SQL, visualization, statistics, and reporting. Use when writing SQL queries, building dashboards, performing cohort or funnel analysis, running hypothesis tests, or presenting data-driven recommendations.

Data & Databases606 installs

cfo-advisor

borghei/claude-skills

Open the skill to read its SKILL.md instructions.

454 installs

data-scientist

borghei/claude-skills

Data science across machine learning, statistical modeling, and experimentation. Use when selecting ML algorithms, engineering features, designing A/B tests, evaluating model performance, or building predictive pipelines.

Popular ai & agents skills

View category →

google-agents-cli-publish

google/agents-cli

This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).

AI & Agents513.9K installs

google-agents-cli-eval

google/agents-cli

This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).

AI & Agents513.5K installs

skill-creator

anthropics/skills

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

OfficialAI & Agents416.4K installs

codex-pet

prime-skills/runcomfy-agent-skills

Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.

AI & Agents402.1K installs

full-output-enforcement

leonxlnx/taste-skill

Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.

AI & Agents401K installs

executing-plans

obra/superpowers

Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available

AI & Agents245.7K installs