Install any skill in seconds. Free to start, no credit card required.
Get Started Free →A universal self-improving agent that learns from ALL skill experiences. Uses multi-memory architecture (semantic + episodic + working) to continuously evolve the codebase. Auto-triggers on skill completion/error with hooks-based self-correction.
.claude/skills/1mancompany-self-improving-agent/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 290% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 257% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 117% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 205% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 201% | 0% |
> "An AI agent that learns from every interaction, accumulating patterns and insights to continuously improve its own capabilities." — Based on 2025 lifelong learning research
This is a universal self-improvement system that learns from ALL skill experiences, not just PRDs. It implements a complete feedback loop with:
Based on 2025 research:
| Research | Key Insight | Application | |----------|-------------|-------------| | SimpleMem | Efficient lifelong memory | Pattern accumulation system | | Multi-Memory Survey | Semantic + Episodic memory | World knowledge + experiences | | Lifelong Learning | Continuous task stream learning | Learn from every skill use | | Evo-Memory | Test-time lifelong learning | Real-time adaptation |
┌─────────────────────────────────────────────────────────────────┐
│ UNIVERSAL SELF-IMPROVEMENT │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Skill Event → Extract Experience → Abstract Pattern → Update │
│ │ │ │ │ │
│ ▼ ▼ ▼ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ MULTI-MEMORY SYSTEM │ │
│ ├─────────────────────────────────────────────────────┤ │
│ │ Semantic Memory │ Episodic Memory │ Working Memory │ │
│ │ (Patterns/Rules) │ (Experiences) │ (Current) │ │
│ │ memory/semantic/ │ memory/episodic/ │ memory/working/│ │
│ └─────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ FEEDBACK LOOP │ │
│ │ User Feedback → Confidence Update → Pattern Adapt │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘| Event | Trigger | Action | |-------|---------|--------| | before_start | Any skill starts | Log session start | | after_complete | Any skill completes | Extract patterns, update skills | | on_error | Bash returns non-zero exit | Capture error context, trigger self-correction |
Trigger evolution when new reusable knowledge appears:
| Trigger | Target Skill | Priority | Action | |---------|--------------|----------|--------| | New PRD pattern discovered | prd-planner | High | Add to quality checklist | | Architecture tradeoff clarified | architecting-solutions | High | Add to decision patterns | | API design rule learned | api-designer | High | Update template | | Debugging fix discovered | debugger | High | Add to anti-patterns | | Review checklist gap | code-reviewer | High | Add checklist item | | Perf/security insight | performance-engineer, security-auditor | High | Add to patterns | | UI/UX spec issue | prd-planner, architecting-solutions | High | Add visual spec requirements | | React/state pattern | debugger, refactoring-specialist | Medium | Add to patterns | | Test strategy improvement | test-automator, qa-expert | Medium | Update approach | | CI/deploy fix | deployment-engineer | Medium | Add to troubleshooting |
memory/semantic-patterns.json)Stores abstract patterns and rules reusable across contexts:
json{ "patterns": { "pattern_id": { "id": "pat-2025-01-11-001", "name": "Pattern Name", "source": "user_feedback|implementation_review|retrospective", "confidence": 0.95, "applications": 5, "created": "2025-01-11", "category": "prd_structure|react_patterns|async_patterns|...", "pattern": "One-line summary", "problem": "What problem does this solve?", "solution": { ... }, "quality_rules": [ ... ], "target_skills": [ ... ] } } }
memory/episodic/)Stores specific experiences and what happened:
memory/episodic/
├── 2025/
│ ├── 2025-01-11-prd-creation.json
│ ├── 2025-01-11-debug-session.json
│ └── 2025-01-12-refactoring.jsonjson{ "id": "ep-2025-01-11-001", "timestamp": "2025-01-11T10:30:00Z", "skill": "debugger", "situation": "User reported data not refreshing after form submission", "root_cause": "Empty callback in onRefresh prop", "solution": "Implement actual refresh logic in callback", "lesson": "Always verify callbacks are not empty functions", "related_pattern": "callback_verification", "user_feedback": { "rating": 8, "comments": "This was exactly the issue" } }
memory/working/)Stores current session context:
memory/working/
├── current_session.json # Active session data
├── last_error.json # Error context for self-correction
└── session_end.json # Session end markerAfter any skill completes, extract:
yamlWhat happened: skill_used: {which skill} task: {what was being done} outcome: {success|partial|failure} Key Insights: what_went_well: [what worked] what_went_wrong: [what didn't work] root_cause: {underlying issue if applicable} User Feedback: rating: {1-10 if provided} comments: {specific feedback}
Convert experiences to reusable patterns:
| Concrete Experience | Abstract Pattern | Target Skill | |--------------------|------------------|--------------| | "User forgot to save PRD notes" | "Always persist thinking to files" | prd-planner | | "Code review missed SQL injection" | "Add security checklist item" | code-reviewer | | "Callback was empty, didn't work" | "Verify callback implementations" | debugger | | "Net APY position ambiguous" | "UI specs need exact relative positions" | prd-planner |
Abstraction Rules:
yamlIf experience_repeats 3+ times: pattern_level: critical action: Add to skill's "Critical Mistakes" section If solution_was_effective: pattern_level: best_practice action: Add to skill's "Best Practices" section If user_rating >= 7: pattern_level: strength action: Reinforce this approach If user_rating <= 4: pattern_level: weakness action: Add to "What to Avoid" section
Update the appropriate skill files with evolution markers:
markdown<!-- Evolution: 2025-01-12 | source: ep-2025-01-12-001 | skill: debugger --> ## Pattern Added (2025-01-12) **Pattern**: Always verify callbacks are not empty functions **Source**: Episode ep-2025-01-12-001 **Confidence**: 0.95 ### Updated Checklist - [ ] Verify all callbacks have implementations - [ ] Test callback execution paths
Correction Markers (when fixing wrong guidance):
markdown<!-- Correction: 2025-01-12 | was: "Use callback chain" | reason: caused stale refresh --> ## Corrected Guidance Use direct state monitoring instead of callback chains:
// ✅ Do: Direct state monitoring const prevPendingCount = usePrevious(pendingCount);
memory/semantic-patterns.json)memory/episodic/YYYY-MM-DD-{skill}.json)Triggered when:
Process:
markdown## Self-Correction Workflow 1. Detect Error - Capture error context from working/last_error.json - Identify which skill guidance was followed 2. Verify Root Cause - Was the skill guidance incorrect? - Was the guidance misinterpreted? - Was the guidance incomplete? 3. Apply Correction - Update skill file with corrected guidance - Add correction marker with reason - Update related patterns in semantic memory 4. Validate Fix - Test the corrected guidance - Ask user to verify
Example:
markdown<!-- Correction: 2025-01-12 | was: "useMemo for claimable ids" | reason: stale data at click time --> ## Self-Correction: Click-Time Computation **Issue**: Using useMemo for claimable IDs caused stale data **Fix**: Compute at click time for always-fresh data **Pattern**: click_time_vs_open_time_computation
Use the validation template in references/appendix.md when reviewing updates.
Add to Claude Code settings (~/.claude/settings.json):
json{ "hooks": { "PreToolUse": [ { "matcher": "Bash|Write|Edit", "hooks": [ { "type": "command", "command": "bash ${SKILLS_DIR}/self-improving-agent/hooks/pre-tool.sh \"$TOOL_NAME\" \"$TOOL_INPUT\"" } ] } ], "PostToolUse": [ { "matcher": "Bash", "hooks": [ { "type": "command", "command": "bash ${SKILLS_DIR}/self-improving-agent/hooks/post-bash.sh \"$TOOL_OUTPUT\" \"$EXIT_CODE\"" } ] } ], "Stop": [ { "matcher": "", "hooks": [ { "type": "command", "command": "bash ${SKILLS_DIR}/self-improving-agent/hooks/session-end.sh" } ] } ] } }
Replace ${SKILLS_DIR} with your actual skills path.
See references/appendix.md for memory structure, workflow diagrams, metrics, feedback templates, and research links.
After any skill completes, this agent automatically:
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 16,074 | 6,914 | -57% | 1 | 1 | 0% | 2,651 | 3,549 | +34% | 0 | 0 | — |
case-07 | fail→pass | 8,701 | 9,868 | +13% | 1 | 1 | 0% | 1,273 | 4,962 | +290% | 0 | 0 | — |
case-02 | fail→fail | 13,968 | 6,209 | -56% | 1 | 1 | 0% | 2,150 | 3,578 | +66% | 0 | 0 | — |
case-03 | fail→fail | 15,896 | 5,516 | -65% | 1 | 1 | 0% | 2,600 | 3,555 | +37% | 0 | 0 | — |
case-04 | fail→pass | 10,064 | 11,688 | +16% | 1 | 1 | 0% | 1,528 | 5,459 | +257% | 0 | 0 | — |
case-05 | fail→pass | 12,334 | 7,063 | -43% | 1 | 1 | 0% | 2,011 | 4,355 | +117% | 0 | 0 | — |
case-06 | fail→pass | 8,698 | 5,045 | -42% | 1 | 1 | 0% | 1,352 | 4,117 | +205% | 0 | 0 | — |
case-08 | fail→fail | 11,275 | 10,321 | -8% | 1 | 1 | 0% | 1,747 | 4,983 | +185% | 0 | 0 | — |
case-09 | fail→fail | 16,761 | 7,131 | -57% | 1 | 1 | 0% | 3,078 | 4,498 | +46% | 0 | 0 | — |
case-10 | fail→pass | 7,287 | 4,683 | -36% | 1 | 1 | 0% | 1,374 | 4,140 | +201% | 0 | 0 | — |
case-11 | fail→pass | 11,616 | 3,440 | -70% | 1 | 1 | 0% | 1,963 | 3,774 | +92% | 0 | 0 | — |
case-12 | fail→pass | 7,009 | 2,137 | -70% | 1 | 1 | 0% | 1,021 | 3,568 | +249% | 0 | 0 | — |
case-13 | fail→pass | 18,195 | 11,177 | -39% | 1 | 1 | 0% | 2,718 | 5,107 | +88% | 0 | 0 | — |
case-14 | fail→fail | 8,441 | 2,807 | -67% | 1 | 1 | 0% | 1,562 | 3,755 | +140% | 0 | 0 | — |
case-15 | fail→pass | 9,274 | 4,743 | -49% | 1 | 1 | 0% | 1,676 | 4,130 | +146% | 0 | 0 | — |
case-16 | fail→pass | 7,819 | 5,004 | -36% | 1 | 1 | 0% | 1,436 | 4,234 | +195% | 0 | 0 | — |
case-17 | fail→pass | 9,265 | 2,653 | -71% | 1 | 1 | 0% | 1,431 | 3,712 | +159% | 0 | 0 | — |
case-18 | pass→pass | 10,083 | 3,839 | -62% | 1 | 1 | 0% | 1,634 | 3,863 | +136% | 0 | 0 | — |
case-19 | fail→pass | 7,637 | 4,050 | -47% | 1 | 1 | 0% | 1,281 | 3,966 | +210% | 0 | 0 | — |
case-20 | pass→pass | 18,568 | 19,539 | +5% | 1 | 1 | 0% | 3,250 | 7,046 | +117% | 0 | 0 | — |
case-21 | pass→pass | 10,061 | 8,514 | -15% | 1 | 1 | 0% | 1,968 | 4,917 | +150% | 0 | 0 | — |
case-22 | pass→pass | 26,014 | 27,642 | +6% | 1 | 1 | 0% | 3,897 | 7,598 | +95% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 19 counted toward the lift figure. The other 3 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +55 percentage points is the difference between those two pass rates over the 19 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.