Agent skill

Self Improving Agent

by borghei in borghei/Claude-Skills

Patterns for AI agents that learn from their own execution, detect failure modes, and improve autonomously.

MITAuto-check passedAI & LLM Engineering

Install Self Improving Agent

skills CLI
$ npx skills add borghei/Claude-Skills --skill self-improving-agent -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install borghei/Claude-Skills self-improving-agent --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/borghei/Claude-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/engineering/self-improving-agent .claude/skills/self-improving-agent && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
self-improving-agent
GitHub stars
881
Token cost
~2.1k tokens
SKILL.md length
860 words
Files
16 (incl. scripts, references)
Skills in repo
349
Repo updated
First seen
Licence
MIT

At a glance

Patterns for AI agents that learn from their own execution, detect failure modes, and improve autonomously.

  • Building agents that get better over time
  • SKILL.md covers Core Capabilities, When to Use, Clarify First and Sub-Skills, plus 4 more sections
  • Runs Python scripts from its folder; calls python
  • Managing auto- memory

What it does

Self Improving Agent is an agent skill from borghei/Claude-Skills. 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.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 18 other files, including scripts and reference files (for example `references/feedback-loop-patterns.md`, `references/memory-curation-guide.md` and `references/meta-learning-architectures.md`).

It sits in AI & LLM Engineering, covering Building AI agents. The repository describes itself as: 385 AI skills, 77 expert agents, and 900 stdlib Python tools for every team: engineering, PM, marketing, C-level, compliance, business ops, research, and a LinkedIn toolkit… The licence is MIT.

When your agent uses it

  • Building agents that get better over time
  • Managing auto- memory
  • Designing self-correcting feedback loops

Example prompts

  • “Use the self-improving-agent skill to pattern for AI agents that learn from their own execution, detect failure modes, and improve autonomously”
  • “/self-improving-agent”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 4a698e8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 6 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Self Improving Agent loads about 2.1k tokens when it runs, and up to ~7.3k if it reads all its reference files. Until then it costs about 62 tokens; SKILL.md has 860 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from borghei/Claude-Skills at commit 4a698e8, republished under its MIT licence (© borghei). 860 words, ~2,094 tokens.

Download SKILL.mdSave it as .claude/skills/self-improving-agent/SKILL.md (or your agent's skills folder). This skill also uses 15 other files; get the full folder from GitHub.
name
self-improving-agent
description
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.
license
MIT + Commons Clause
metadata.version
2.1.0
metadata.author
borghei
metadata.category
engineering
metadata.domain
ai-agents
metadata.tier
POWERFUL
metadata.updated
2026-06-17
metadata.tags
self-improvement, ai-agents, feedback-loops, auto-memory, meta-learning, memory-curation
metadata.frameworks
feedback-loops, memory-curation, meta-learning, performance-regression

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, confirm these inputs. If any is unknown or vague, ASK — do not assume:

  • 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)

Stop rule: ask only the 2-3 that most change the output. If the user says "just draft it," proceed and list your assumptions at the top of the artifact.

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
Show full SKILL.md (404 more words)Show less

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

© borghei, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 15 other files (scripts, references) in engineering/self-improving-agent of borghei/Claude-Skills.

  • SKILL.md
  • references/feedback-loop-patterns.md
  • references/memory-curation-guide.md
  • references/meta-learning-architectures.md
  • references/self-improvement-methodology.md
  • scripts/feedback_analyzer.py
  • scripts/memory_health_checker.py
  • scripts/pattern_extractor.py
  • scripts/regression_detector.py
  • scripts/rule_manager.py
  • scripts/rule_promoter.py
  • skills/extract.md
  • skills/promote.md
  • skills/remember.md
  • skills/review.md
  • skills/status.md

Open the folder on GitHubat commit 4a698e8

Compare with similar skills

Self Improving Agent next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Self Improving Agent compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Self Improving Agent this skillborghei/Claude-Skills881—~2.1kAutomated safety check: PassMIT
Agent BuildershareAI-lab/learn-claude-code78k6 repos~1.2kAutomated safety check: PassMIT
Agenticx Agent BuilderDemonDamon/AgenticX294—~893Automated safety check: PassApache-2.0
Create Agent Skillsglittercowboy/taches-cc-resources2k—~1.7kAutomated safety check: PassMIT
Muse Governanceucsandman/DashClaw310—~1.7kAutomated safety check: PassMIT
Langgraph Agent Patternssoba-labs/langchain-agent-skills107—~3.6kAutomated safety check: PassMIT

Similar skills

  • Agent Builder

    shareAI-lab/learn-claude-code

    Design and build AI agents for any domain. An agent skill from shareAI-lab/learn-claude-code.

    78k GitHub starsUsed in 6 repos~1.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Agenticx Agent Builder

    DemonDamon/AgenticX

    Guide for creating persistent Near desktop digital avatars (数字分身) via natural-language interview and the createavatar tool.

    294 GitHub stars~893 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Create Agent Skills

    glittercowboy/taches-cc-resources

    Expert guidance for creating, writing, building, and refining Claude Code Skills.

    2k GitHub stars~1.7k tokensUpdated 6 mo ago
    AI & LLM EngineeringAuto-check passed
  • Muse Governance

    ucsandman/DashClaw

    Governance behavior for Muse agents governed by DashClaw. An agent skill from ucsandman/DashClaw.

    310 GitHub stars~1.7k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Langgraph Agent Patterns

    soba-labs/langchain-agent-skills

    Implement multi-agent coordination patterns (supervisor-subagent, router, orchestrator-worker, handoffs) for LangGraph applications.

    107 GitHub stars~3.6k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Agent Builder

    n8n-io/n8n

    Official

    Load immediately after an Agent intent. An agent skill from n8n-io/n8n.

    207k GitHub stars~2.5k tokensUpdated today
    AI & LLM EngineeringAuto-check passed

More from borghei/Claude-Skills

All 349 skills in this repo
  • Agents In The Team

    borghei/Claude-Skills

    Run delivery when AI coding and ops agents take tickets. An agent skill from borghei/Claude-Skills.

    881 GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • AI Content Disclosure

    borghei/Claude-Skills

    Check AI-generated marketing content and reviews for required disclosures under the EU AI Act, FTC rules and platform AI-label policies.

    881 GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • AI Prototyping

    borghei/Claude-Skills

    Idea to AI-generated prototype to customer validation to engineering handoff.

    881 GitHub stars~3.6k tokensUpdated today
    Auto-check passed
  • Analytics Engineer

    borghei/Claude-Skills

    Analytics engineering across data modeling, dbt, transformation, and semantic layers.

    881 GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Ansoff Matrix

    borghei/Claude-Skills

    Ansoff Matrix — 4-quadrant framework for growth options: market penetration, market/product development, and diversification.

    881 GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Brainstorm Okrs

    borghei/Claude-Skills

    OKR brainstorming and validation using the Radical Focus framework — outcome objectives, measurable key results, counter-metrics.

    881 GitHub stars~1.4k tokensUpdated today
    Auto-check passed

Questions about Self Improving Agent

What does Self Improving Agent do?

Patterns for AI agents that learn from their own execution, detect failure modes, and improve autonomously. Self Improving Agent is an agent skill from borghei/Claude-Skills. Patterns for AI agents that learn from their own execution, detect failure modes, and improve autonomously.

When should I use Self Improving Agent?

Self Improving Agent fits situations like: building agents that get better over time; managing auto- memory; designing self-correcting feedback loops.

How do I install Self Improving Agent in Claude Code?

Run `npx skills add borghei/Claude-Skills --skill self-improving-agent -a claude-code`. Or copy the skill folder (engineering/self-improving-agent in borghei/Claude-Skills) into .claude/skills/self-improving-agent in your project. Claude Code loads it when a task matches its description.

How do I install Self Improving Agent in Codex?

Run `npx skills add borghei/Claude-Skills --skill self-improving-agent -a codex`. Or copy the skill folder (engineering/self-improving-agent in borghei/Claude-Skills) into .agents/skills/self-improving-agent in your project. Codex loads it when a task matches its description.

Can I use Self Improving Agent in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add borghei/Claude-Skills --skill self-improving-agent -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/self-improving-agent, .gemini/skills/self-improving-agent, .github/skills/self-improving-agent and .opencode/skills/self-improving-agent in your project.

What does Self Improving Agent need to run?

Going by SKILL.md and its folder, Self Improving Agent needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Self Improving Agent access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Self Improving Agent safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Self Improving Agent use?

Self Improving Agent is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Self Improving Agent use?

About 2.1k tokens (SKILL.md is roughly 8.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5.2k tokens, read only when the agent opens those files.

What are the alternatives to Self Improving Agent?

Skills that share tags, products or a category with Self Improving Agent: Agent Builder (shareAI-lab/learn-claude-code, 78k stars), Agenticx Agent Builder (DemonDamon/AgenticX, 294 stars), Create Agent Skills (glittercowboy/taches-cc-resources, 2k stars) and Muse Governance (ucsandman/DashClaw, 310 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Self Improving Agent?

borghei (a GitHub user) maintains it in borghei/Claude-Skills, which has 881 GitHub stars. The repository holds 349 skills in this directory. The repository was last updated on October 7, 2026.

Source: borghei/Claude-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.