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.
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-agentRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/farm-fe/farm /tmp/farm && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/farm/.claude/skills/self-improving-agent ~/.gemini/antigravity-cli/skills/self-improving-agentAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install self-improving-agent in Antigravity CLI
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 →Aligns a Qwen Code feature with a Codex or Claude Code reference agent. It runs both under the same scenario, captures HTTP and terminal traces, and compares them until behavior matches.
Searches, views, creates, updates, and deletes the user's Google Contacts from an AI assistant. It is for people who want to manage their address book through conversation. A one-time Google connect is required before it returns data.
Guides an AI assistant on error handling choices. It covers when to use Result, Option, ? propagation, unwrap, expect and panic, plus anyhow and thiserror.
Caveman is an agent skill that makes an AI assistant reply in a terse style. It cuts filler and keeps technical facts, code, commands and errors exact. It is built for users who want shorter, cheaper replies.
docs-sync audits or updates English SDK documentation against the requested implementation scope. It is for maintainers who want docs to match main branch features, configuration options, and defaults.
Guides an AI assistant through setting up and running monorepos with pnpm workspaces, Turborepo and Nx. Aimed at developers who need faster builds, shared code and managed dependencies across multiple packages.
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.
