self-improving-agent
БесплатноЗапускает вложенные скриптыНе проверенCurates agent memory and turns repeated lessons into reviewed rules: memory health checks, pattern extraction, feedback and regression analysis. Use when…
от borghei★ 1 250 звёзд на GitHubОб этом скилле
Self-Improving Agent
The agent captures what went wrong or right in a session, curates it in memory, and proposes promoting a lesson into a permanent rule only when it has recurred and a person has approved it. Rules compound: a wrong rule repeats its mistake in every later session, so promotion is a reviewed change, never an automatic one.
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-Skill | File | Purpose |
|---|---|---|
| Remember | skills/remember.md |
Capture errors and learnings from current session |
| Extract | skills/extract.md |
Extract reusable patterns from completed work |
| Promote | skills/promote.md |
Graduate proven patterns to permanent rules |
| Review | skills/review.md |
Audit memory health, prune stale entries |
| Status | skills/status.md |
Dashboard showing memory state and learning progress |
Flow: Remember → Extract → Promote → Review, with Status providing visibility back into the cycle.
Workflow
- Check memory health:
memory_health_checker.py --memory <MEMORY.md>. It reads both layouts:##section entries, and index files whose lines point at topic files (Claude Code auto-memory), where it reads each topic file's frontmatter and age and flags pointers to missing files. - Find recurring lessons in session or feedback logs with
pattern_extractor.pyandfeedback_analyzer.py patterns. - Propose a promotion:
rule_promoter.py --entry-title ... --dry-runprints the rule text and whether it meets the bar (recurrence, confidence). - Get approval: show the user the proposed rule and where it will land (CLAUDE.md or
.claude/rules/), and apply with--applyonly after an explicit yes. - Watch for regressions after a rule change with
regression_detector.py compare; roll the rule back if first-attempt success or corrections get worse. - Done when memory has no broken pointers or over-limit files, every promoted rule was approved, and the regression check after the change is clean.
Quick Start
# from engineering/self-improving-agent/
python3 scripts/memory_health_checker.py --memory assets/memory_index/MEMORY.md # flags one broken pointer
python3 scripts/feedback_analyzer.py analyze --input assets/sample_feedback.jsonl
python3 scripts/regression_detector.py compare --input assets/sample_metrics.json # REGRESSION DETECTED after a rule change
Tools Overview
| Tool | Purpose | Example |
|---|---|---|
pattern_extractor.py |
Recurring patterns in session logs (JSONL) | python3 scripts/pattern_extractor.py --input sessions.jsonl --min-occurrences 3 |
memory_health_checker.py |
Line limits, stale and duplicate entries, broken topic pointers, promotion candidates | python3 scripts/memory_health_checker.py --memory ./MEMORY.md --rules ./.claude/rules/ |
rule_promoter.py |
Validate and (after approval) apply a promotion from ## section memory to rules |
`pyth |
Установить self-improving-agent в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл self-improving-agent?
Curates agent memory and turns repeated lessons into reviewed rules: memory health checks, pattern extraction, feedback and regression analysis. Use when managing auto-memory or building agents that learn from their own sessions.
Как установить скилл self-improving-agent?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл self-improving-agent запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
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…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic