Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

self-improving-agent

Skill by farm-fe

Self-improving-agent is a skill that records experiences from other skills and turns them into reusable patterns. It updates skill files with dated markers and uses hooks for start, completion, and error events. It is for developers who use Claude Code skills and want their guidance to evolve over time.

  • Score 94
  • 5.6k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install self-improving-agent

Built from the published package, never by AI.

git clone --depth 1 https://github.com/farm-fe/farm /tmp/farm && mkdir -p ~/.claude/skills && cp -r /tmp/farm/.claude/skills/self-improving-agent ~/.claude/skills/self-improving-agent

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install self-improving-agent in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

Self-improving-agent is a skill for AI assistants that captures experiences from other skills and turns them into reusable patterns. It describes three memory stores: semantic memory for patterns and rules, episodic memory for specific experiences, and working memory for the current session. After a skill completes, it extracts what went well and what failed, abstracts patterns, and updates target skill files with dated evolution markers.

The skill uses hooks that run on skill start, completion, and error. The source includes example Claude Code hook settings that call shell scripts. When guidance is wrong, a self-correction workflow updates the skill file and adds a correction marker. The author describes it as a universal system for developers who want their skills to improve over time.

Written from the project's SKILL.md and checked against it.

What it can do

  • Experience extractionRecords the skill used, the task, the outcome, and any user feedback after a skill completes.
  • Pattern abstractionConverts experiences into patterns, using repeat counts and user ratings to set pattern levels.
  • Multi-memory storageStores semantic, episodic, and working memory in memory/ folders as JSON files.
  • Skill updates with evolution markersAdds dated pattern and correction sections to target skill files for traceability.
  • Self-correctionCaptures error context and updates skill guidance when it is found to be incorrect.
  • Hooks integrationTriggers actions on before_start, after_complete, and on_error events.
  • Memory consolidationUpdates pattern confidence and prunes outdated patterns with low confidence.

What you need

  • Claude Code settings file for hook wiring
  • Bash for the hook scripts
  • A skills directory path set as SKILLS_DIR

Try asking

  • Analyze today's experience and summarize the lessons learned
  • Self-improve based on the last skill run
  • Improve the debugger skill with the fix we just found

Good to know

  • The on_error hook only logs to the session to avoid infinite recursion.
  • The create-pr step uses ask_first mode and runs only when skills were modified.
  • Hook setup requires editing Claude Code settings by hand.

Security check

B
  • Allowed to use Write, Edit, Bash without limitsIn SKILL.md

Checked automatically: .claude/skills/self-improving-agent/SKILL.md, .claude/skills/self-improving-agent/hooks/post-bash.sh, .claude/skills/self-improving-agent/hooks/pre-tool.sh, .claude/skills/self-improving-agent/hooks/session-end.sh. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

Allowed tools: ReadWriteEditBashGrepGlobWebSearch

  • README.md3 KB
  • SKILL.md14 KB
  • hooks/post-bash.sh243 B
  • hooks/pre-tool.sh239 B
  • hooks/session-end.sh87 B
Show all 10 files
  • memory/semantic-patterns.json13 KB
  • references/appendix.md3 KB
  • templates/correction-template.md122 B
  • templates/pattern-template.md160 B
  • templates/validation-template.md193 B

Alternatives to self-improving-agent

All alternatives →

Compare with agent-reproduce-align, google_contacts or m06-error-handling

self-improving-agent: common questions

Does self-improving-agent run automatically?

The source says hooks auto-trigger on skill start, completion, and error. It also lists manual triggers such as saying 'self-improve'.

Where does it store its memory?

The source places semantic patterns in memory/semantic-patterns.json, episodic records in memory/episodic/, and session data in memory/working/.

Does it submit changes to a repository without asking?

No. The source says the create-pr hook uses ask_first mode when skills were modified, so the user is asked before submission.

How do I install self-improving-agent?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is self-improving-agent free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is self-improving-agent safe to use?

It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade B (allowed to use write, edit, bash without limits). Review the code before you install. How grades work.

What are alternatives to self-improving-agent?

Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.

self-improving-agent Install

Add to stack

Loading.