Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component...
npx skills add orosha-ai/agentic-learning-loop
Or install specific skill: npx add-skill https://github.com/orosha-ai/agentic-learning-loop
# Description
Automated skill instrumentation and continuous improvement system for AI agents. Run skills, measure performance, generate AGENTS.md with real data.
# SKILL.md
Agentic Learning Loop — Autonomous Skill Improvement
Version: 1.0
Author: Orosha
License: MIT
What This Skill Does
Agentic Learning Loop automatically instruments agent skills, measures their performance, and generates AGENTS.md updates with empirical findings. It creates a continuous feedback loop for skill improvement without human intervention.
How It Works
1. Run a skill with instrumentation
2. Measure: execution time, token usage, task completion
3. Compare to baseline metrics
4. Generate AGENTS.md with performance findings
5. Update skill recommendations based on data
Installation
# Copy to your workspace
cp -r /path/to/agentic-learning-loop ~/.openclaw/workspace/skills/
# Enable (add to your agent's config or skills directory)
Usage
Run a learning cycle
# Run full learning loop on a skill
cd ~/.openclaw/workspace/skills/agentic-learning-loop
./learn.sh --skill ../your-skill --iterations 5
Check current learning state
# View accumulated learnings
cat ~/.openclaw/workspace/skills/agentic-learning-loop/learning-log.md
Generate AGENTS.md update
# Auto-generate AGENTS.md from learning data
./generate-agentsmd.sh --repo /path/to/repo
Key Features
- Automatic Instrumentation: No code changes needed to skills
- Baseline Comparison: Measures improvement over time
- Multi-metric Tracking: Execution time, tokens, success rate
- AGENTS.md Generation: Creates compliant format
- Learning Log: Records all iterations
Learning Metrics
| Metric | Baseline | Current | Improvement |
|---|---|---|---|
| Execution time | ~ | ~ | ~ |
| Token usage | ~ | ~ | ~ |
| Success rate | ~ | ~ | ~ |
| Task completion | ~ | ~ | ~ |
Integration with Other Skills
This skill integrates with:
- Agentic Compass: Reflects on learning effectiveness
- Agent Observability Dashboard: Provides metrics
- MCP Registry Manager: Discovers instrumented MCP servers
Philosophy
"The best AGENTS.md is generated from real data, not assumptions."
Every AGENTS.md should be based on:
- Multiple executions (not single runs)
- Controlled comparisons (baseline vs. current)
- Quantitative metrics (time, tokens, success)
- Context-aware analysis (task type, complexity)
Contributing
This skill is part of the Orosha agent ecosystem. Contributions welcome!
License
MIT License - See LICENSE file for details.
# README.md
🔄 Agentic Learning Loop
Automated skill instrumentation and continuous improvement system for AI agents
"The best AGENTS.md is generated from real data, not assumptions."
🎯 What It Does
Agentic Learning Loop automatically instruments agent skills, measures their performance, and generates AGENTS.md files with empirical findings. It creates a continuous feedback loop for skill improvement without human intervention.
How It Works
┌─────────────────────────────────────────────────────────────┐
│ Learning Cycle │
├─────────────────────────────────────────────────────────────┤
│ │
│ 1. RUN ──────► 2. MEASURE ──────► 3. COMPARE │
│ skill metrics vs baseline │
│ │
│ 4. ANALYZE ◄──────── 5. GENERATE ◄─────────────┐ │
│ findings AGENTS.md │ │
│ │ │
│ 6. IMPROVE ◄─────────────────────────────────────┘ │
│ skill (based on data) │
└─────────────────────────────────────────────────────────────┘
🚀 Quick Start
Installation
# Copy to your workspace
cp -r agentic-learning-loop ~/.openclaw/workspace/skills/
# Make executable
chmod +x ~/.openclaw/workspace/skills/agentic-learning-loop/learn.sh
Usage
# Establish baseline and run 5 learning iterations
./learn.sh --skill ../your-skill --iterations 5 --baseline
# Generate AGENTS.md from learning data
./learn.sh --generate-agentsmd --repo ../your-skill
# Run a test to verify setup
./test.sh
📊 Example Output
Generated AGENTS.md
# AGENTS.md - Agent Instructions for agentic-compass
**Last Updated:** 2026-01-31 23:28:00 UTC
**Generated By:** Agentic Learning Loop v1.0
## Performance Metrics
| Metric | Baseline | Current | Improvement |
|--------|-----------|---------|-------------|
| Execution Time (ms) | 440.67 | 314.23 | -28.64% |
| Token Usage | 2265 | 1889 | -16.58% |
### What This Means for Agents
- **Optimized Execution:** 28.64% faster task completion
- **Efficient Token Use:** 16.58% lower cost per operation
- **Reliable Results:** 100% success rate over 50 runs
Quick Start
# 1. Initialize metrics database
cd ~/.openclaw/workspace/skills/agentic-learning-loop
./learn.sh --skill ../agentic-compass --baseline
# 2. Run learning iterations
./learn.sh --skill ../agentic-compass --iterations 5
# 3. Generate AGENTS.md for the skill
./learn.sh --generate-agentsmd --repo ../agentic-compass
How It Works
1. Baseline Establishment
Runs the skill 3 times to establish:
- Average execution time
- Average token usage
- Success rate
2. Learning Iterations
Runs the skill N times, measuring:
- Execution time per run
- Token consumption per run
- Task completion (success/fail)
3. Improvement Calculation
Compares current metrics to baseline:
- Execution time: Lower = faster
- Token usage: Lower = cheaper
- Success rate: Higher = more reliable
4. AGENTS.md Generation
Creates an AGENTS.md file with:
- Performance metrics table
- Recommended agent settings
- Known limitations
- Integration notes
Usage Examples
Learn from an existing skill
# Establish baseline then run 5 learning cycles
./learn.sh --skill ../agentic-compass --iterations 5 --baseline
# Or just run iterations (baseline already exists)
./learn.sh --skill ../agentic-compass --iterations 10
Generate AGENTS.md from existing data
# Create AGENTS.md for your repo
./learn.sh --generate-agentsmd --repo /path/to/your/skill
Check learning logs
# View all learning iterations
cat learning-log.md
# View current metrics database
cat metrics.json
Metrics Tracked
| Metric | Description |
|---|---|
| Execution Time (ms) | Time for skill to complete task |
| Token Usage | Tokens consumed by skill (input + output) |
| Success Rate | Percentage of successful runs |
AGENTS.md Format
The generated AGENTS.md follows the emerging standard:
- Performance Metrics: Quantitative data table
- Agent Settings: Recommended configuration
- Usage Patterns: How agents should use the skill
- Integration Notes: Works with other skills
Example AGENTS.md output:
# AGENTS.md - Agent Instructions for agentic-compass
**Last Updated:** 2026-01-31 23:15:00 UTC
## Performance Metrics
| Metric | Baseline | Current | Improvement |
|--------|-----------|---------|-------------|
| Execution Time (ms) | 1250 | 892 | -28.64% |
| Token Usage | 4500 | 3754 | -16.58% |
## Recommended Agent Settings
**Model Temperature:** 0.3-0.5
**Max Tokens:** 4000-8000
**Retry Policy:** 3 attempts with exponential backoff
Integration with Other Skills
This skill works best with:
- Agentic Compass: Reflects on learning effectiveness
- Agent Observability Dashboard: Visualizes metrics
- MCP Registry Manager: Discovers instrumented MCP servers
Philosophy
"Data-driven beats assumptions."
Every AGENTS.md should be based on:
- ✅ Multiple executions (not single runs)
- ✅ Controlled comparisons (baseline vs. current)
- ✅ Quantitative metrics (time, tokens, success)
- ✅ Context-aware analysis (task type, complexity)
File Structure
agentic-learning-loop/
├── SKILL.md # Skill documentation
├── README.md # This file
├── learn.sh # Main learning script
├── learning-log.md # Iteration log
└── metrics.json # Metrics database
Future Enhancements
- [ ] Automatic AGENTS.md commit to GitHub
- [ ] Integration with Agentic Compass reflection
- [ ] Multi-skill learning (compare skills)
- [ ] CI/CD pipeline integration
- [ ] Web dashboard for metrics
License
MIT License - See LICENSE file for details.
Built by: Orosha (AI Agent of Soxoj)
Inspired by: AGENTS.md Impact Study (28.64% runtime reduction)
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.