Agent Skill
2/7/2026

skill-name

"[What this skill does]. Use when [trigger scenarios]."

Z
zhanlincui
5GitHub Stars
1Views
npx skills add ZhanlinCui/Auto-Evolution-Agent-Skills

SKILL.md

Nameskill-name
Description"[What this skill does]. Use when [trigger scenarios]."
<p align="center"> <img src="docs/logo.svg" alt="Auto-Evolution" width="120" /> </p> <h1 align="center">Auto-Evolution</h1> <p align="center"> <strong>Memory-Driven Self-Evolution for AI Agent Skills</strong> </p> <p align="center"> <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a> <a href="#"><img src="https://img.shields.io/badge/Version-2.0.0-blue.svg" alt="Version"></a> <a href="#"><img src="https://img.shields.io/badge/Claude_Code-Compatible-8A2BE2.svg" alt="Claude Code"></a> <a href="#"><img src="https://img.shields.io/badge/PRs-Welcome-brightgreen.svg" alt="PRs Welcome"></a> </p> <p align="center"> <a href="README.md">English</a> β€’ <a href="README.zh.md">δΈ­ζ–‡</a> </p>

πŸ’‘ The Story

"I've fixed this exact error three times this week. Why doesn't my AI assistant remember?"

Every developer has been there. You spend 30 minutes debugging an issue, finally fix it, and move on. Two days later, you hit the same problem β€” and your AI assistant has completely forgotten how you solved it.

Your AI is smart, but it has no memory.

Auto-Evolution changes that. It gives your AI agent a persistent memory that learns from every interaction, detects patterns in your work, and evolves into a smarter assistant over time.

Week 1:  You fix TypeError #1 β†’ Agent forgets
Week 2:  You fix TypeError #2 β†’ Agent forgets  
Week 3:  You fix TypeError #3 β†’ Agent forgets

With Auto-Evolution:
Week 1:  You fix TypeError #1 β†’ Agent remembers
Week 2:  You fix TypeError #2 β†’ Agent notices pattern
Week 3:  TypeError #3 β†’ Agent: "I've seen this before. Here's the fix."

🎯 Problems We Solve

ProblemWithout Auto-EvolutionWith Auto-Evolution
Repeated errorsFix the same bug multiple timesAgent learns from first fix
Lost knowledgeSolutions disappear after sessionPatterns persist across sessions
No personalizationGeneric responses every timeAgent adapts to your workflow
Manual documentationYou document everything yourselfAuto-generated skill drafts
Blind spotsNo visibility into what worksDashboard shows what's effective

✨ Key Features

<table> <tr> <td width="50%">

🧠 Three-Layer Memory

Inspired by human cognition:

  • Episodic: Raw events (7 days)
  • Semantic: Patterns (30 days)
  • Procedural: Skills (permanent)
</td> <td width="50%">

⚑ Pattern Detection

Automatically identifies:

  • Repeated workflows
  • Common error solutions
  • Frequently used techniques
</td> </tr> <tr> <td width="50%">

πŸ“Š Visual Dashboard

Real-time visualization of:

  • Skill usage heatmap
  • Detected patterns
  • Evolution progress
</td> <td width="50%">

πŸ”„ Quality Gates

Only validated knowledge gets promoted:

  • 3+ occurrences β†’ detected
  • Validation β†’ approved
  • Usage β†’ permanent skill
</td> </tr> </table>

πŸ“Š Visual Dashboard

See your agent's evolution in real-time:

<p align="center"> <img src="docs/dashboard-preview.png" alt="Dashboard Preview" width="800" /> </p>

πŸš€ Quick Start

Step 1: Install (30 seconds)

curl -fsSL https://raw.githubusercontent.com/ZhanlinCui/Auto-Evolution-Agent-Skills/main/install.sh | bash -s -- --with-hooks
<details> <summary>πŸ“¦ Alternative: Manual Installation</summary>
# Clone repository
git clone https://github.com/ZhanlinCui/Auto-Evolution-Agent-Skills.git

# Copy to your project
cp -r Auto-Evolution-Agent-Skills/skills/evolution your-project/.claude/skills/

# Make hooks executable
chmod +x your-project/.claude/skills/evolution/hooks/*.sh
</details>

Step 2: Configure Hooks

Add to your .claude/settings.json:

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Read|Write|Edit|Bash",
        "hooks": [{"type": "command", "command": "bash .claude/skills/evolution/hooks/capture.sh \"$TOOL_NAME\" \"$TOOL_INPUT\""}]
      }
    ],
    "PostToolUse": [
      {
        "matcher": "Bash",
        "hooks": [{"type": "command", "command": "bash .claude/skills/evolution/hooks/capture.sh post-bash \"$TOOL_OUTPUT\" \"$EXIT_CODE\""}]
      }
    ],
    "Stop": [
      {
        "matcher": "",
        "hooks": [{"type": "command", "command": "bash .claude/skills/evolution/hooks/reflect.sh"}]
      }
    ]
  }
}

Step 3: Work Normally

That's it! Just use Claude Code as you always do. Auto-Evolution works silently in the background.

Step 4: Watch It Evolve

# Open the dashboard
open .claude/skills/evolution/reports/dashboard.html

πŸ“– Usage Guide

Automatic Mode (Default)

Once installed, everything happens automatically:

What HappensWhenResult
Skill usage trackedYou read any .md skill fileRecorded in episodic memory
Errors capturedBash command failsError + context saved
Patterns detectedSame action 3+ timesPattern hypothesis created
Insights generatedSession endsDraft + suggestions created

Manual Commands

CommandWhat It DoesExample
/retrospectiveGenerate session review"What did I learn today?"
/evolvePromote pattern to skill"Save this fix as a skill"
/dashboardOpen visual dashboard"Show my evolution"

Example Session

You: Fix this TypeScript error: "Object is possibly undefined"

Agent: [fixes with optional chaining]

--- After 3 similar fixes ---

Agent: πŸ’‘ I noticed you've fixed "possibly undefined" errors 3 times 
       using optional chaining. Want me to save this as a reusable pattern?

You: Yes, create a skill for it

Agent: βœ… Created: community/typescript-optional-chaining.md
       Next time, I'll suggest this pattern immediately.

🧠 How It Works

The Evolution Loop

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                                                  β”‚
β”‚    πŸ“ CAPTURE           πŸ” ANALYZE           πŸš€ EVOLVE          β”‚
β”‚    ───────────          ──────────           ─────────          β”‚
β”‚    Tool usage     β†’     Find patterns   β†’    Create skills      β”‚
β”‚    Errors         β†’     Detect repeats  β†’    Promote drafts     β”‚
β”‚    Commands       β†’     Score success   β†’    Retire failures    β”‚
β”‚                                                                  β”‚
β”‚                         🧠 MEMORY                                β”‚
β”‚                         ─────────                                β”‚
β”‚                    Episodic β†’ Semantic β†’ Procedural              β”‚
β”‚                                                                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Three-Layer Memory

LayerWhat It StoresRetentionExample
EpisodicRaw events7 days"Used layout.md at 14:32"
SemanticPatterns30 days"Grid layouts need Flow + Sizing"
ProceduralSkillsPermanentresponsive-grid-pattern.md

Quality Gates

Knowledge must prove itself before becoming permanent:

[Detected]  ──3+ occurrences──▢  [Draft]  ──validated──▢  [Approved]  ──used──▢  [Skill]
     β”‚                              β”‚                          β”‚                    β”‚
   Pattern                    Auto-generated              Human/AI               Permanent
   noticed                    documentation               verified               knowledge

βš™οΈ Configuration

All settings in evolution/config.json:

{
  "memory": {
    "episodic_ttl_days": 7,      // How long to keep raw events
    "semantic_ttl_days": 30,     // How long to keep patterns
    "pattern_threshold": 3       // Occurrences needed to detect pattern
  },
  "evolution": {
    "auto_draft_on_error": true,        // Create draft when errors occur
    "auto_pattern_detection": true,     // Automatically detect patterns
    "require_validation": true          // Require validation before promotion
  }
}

πŸ“ Project Structure

.claude/skills/evolution/
β”‚
β”œβ”€β”€ πŸ“„ SKILL.md                 # Entry point & documentation
β”œβ”€β”€ βš™οΈ config.json              # All configuration
β”‚
β”œβ”€β”€ 🧠 memory/                  # Three-layer memory system
β”‚   β”œβ”€β”€ episodes.jsonl          # Layer 1: Raw events
β”‚   β”œβ”€β”€ patterns.json           # Layer 2: Detected patterns
β”‚   └── drafts/                 # Layer 3: Skill candidates
β”‚
β”œβ”€β”€ πŸͺ hooks/                   # Event capture system
β”‚   β”œβ”€β”€ capture.sh              # Pre/post tool hooks
β”‚   β”œβ”€β”€ reflect.sh              # Session-end analysis
β”‚   └── lib.sh                  # Shared utilities
β”‚
β”œβ”€β”€ πŸ“Š reports/                 # Visualization & reports
β”‚   β”œβ”€β”€ dashboard.html          # Visual dashboard
β”‚   β”œβ”€β”€ improvements.md         # Suggestions
β”‚   └── sessions/               # Session reports
β”‚
β”œβ”€β”€ πŸ“ templates/               # Skill templates
β”‚   β”œβ”€β”€ skill.md                # General skill template
β”‚   └── error.md                # Error solution template
β”‚
└── 🌍 community/               # Your contributed skills
    └── README.md               # Contribution guide

🀝 Contributing

Share Your Patterns

Discovered a useful pattern? Share it with the community:

  1. Create community/{your-handle}-{pattern-name}.md
  2. Use templates from templates/
  3. Submit a PR

Quality Checklist

  • βœ… Solves a real, repeatable problem
  • βœ… Includes trigger scenarios ("Use when...")
  • βœ… Has tested, concrete examples
  • βœ… No project-specific hardcoded values

πŸ—ΊοΈ Roadmap

  • v2.0 β€” Three-layer memory system
  • v2.0 β€” Visual dashboard
  • v2.0 β€” Pattern detection
  • v2.1 β€” Cross-project knowledge sync
  • v2.2 β€” LLM-as-judge validation
  • v2.3 β€” Community knowledge federation

❓ FAQ

<details> <summary><strong>Does it work with other AI assistants?</strong></summary>

Currently optimized for Claude Code, but the architecture is designed to be portable. Contributions for other platforms welcome!

</details> <details> <summary><strong>Where is data stored?</strong></summary>

All data stays local in your project's .claude/skills/evolution/memory/ directory. No data is sent externally.

</details> <details> <summary><strong>How much overhead does it add?</strong></summary>

Minimal. Hooks are shell scripts that append to JSONL files. Pattern detection only runs at session end.

</details> <details> <summary><strong>Can I disable it temporarily?</strong></summary>

Yes, just remove the hooks from .claude/settings.json. Your memory data is preserved.

</details>

πŸ“„ License

MIT License β€” see LICENSE for details.


<p align="center"> <strong>Stop re-solving. Start evolving.</strong> </p> <p align="center"> <a href="https://github.com/ZhanlinCui/Auto-Evolution-Agent-Skills">⭐ Star</a> β€’ <a href="https://github.com/ZhanlinCui/Auto-Evolution-Agent-Skills/issues">Issues</a> β€’ <a href="https://github.com/ZhanlinCui/Auto-Evolution-Agent-Skills/pulls">PRs</a> </p>
Skills Info
Original Name:skill-nameAuthor:zhanlincui