Agent skill
self-improve
Apply learned improvements to the Aura Frog plugin. Updates rules, adjusts agent routing, modifies workflow configurations, and generates knowledge base entries.
Install this agent skill to your Project
npx add-skill https://github.com/nguyenthienthanh/aura-frog/tree/main/aura-frog/skills/self-improve
SKILL.md
Self-Improve Skill
Type: Meta
Trigger: /learn:apply, after analysis
Auto-invoke: No (requires user approval)
Purpose
Apply learned improvements to the Aura Frog plugin:
- Update rules based on patterns
- Adjust agent routing
- Modify workflow configurations
- Generate new knowledge base entries
Usage
/learn:apply # Review and apply pending improvements
/learn:apply --auto # Auto-apply high-confidence (≥0.8) suggestions
/learn:apply --preview # Preview changes without applying
/learn:apply --id <pattern_id> # Apply specific pattern
Improvement Types
1. Rule Updates
When patterns suggest rule modifications:
# Before analysis
rules:
code_coverage_threshold: 80
# After learning shows 85% coverage correlates with fewer bugs
rules:
code_coverage_threshold: 85
Implementation:
- Identify pattern suggesting rule change
- Generate rule modification
- Create backup of current rule
- Apply modification
- Mark pattern as applied in Supabase
2. Agent Routing
When agent success rates indicate better routing:
# Update agent-detector scoring
agent_overrides:
react_component:
primary: react-expert
confidence_boost: 10
api_endpoint:
primary: nodejs-expert
secondary: python-expert
Implementation:
- Query agent success rates by task type
- Calculate optimal routing
- Update agent-detector configuration
- Test with sample tasks
3. Workflow Adjustments
When workflow patterns suggest changes:
# Add auto-stop threshold adjustment
workflow:
phase_2:
timeout: 300 # increased from 180
batch_size: 50 # for large test suites
4. Knowledge Base
When insights should be preserved:
# New knowledge entry
Type: tip
Title: Use TDD for API endpoints
Content: Analysis of 47 workflows shows TDD approach for API
endpoints reduces bug count by 40% compared to non-TDD.
Tags: [workflow, tdd, api]
Priority: 75
Safety Guards
Approval Required
All improvements require explicit approval unless:
--autoflag is used AND- Confidence ≥ 0.8 AND
- Pattern frequency ≥ 5
Rollback Support
Every applied improvement:
- Creates backup of original configuration
- Logs the change with timestamp
- Can be rolled back via
/learn:rollback <change_id>
Validation
Before applying:
- Syntax validation of generated rules
- Conflict detection with existing rules
- Impact assessment (files affected)
Apply Process
Step 1: Fetch Pending Improvements
SELECT * FROM v_improvement_suggestions
WHERE applied = FALSE
ORDER BY confidence DESC;
Step 2: Generate Changes
For each suggestion:
- Determine target file(s)
- Generate modification
- Calculate impact
Step 3: Present for Review
## Pending Improvements
### 1. Increase Phase 2 timeout (ID: abc123)
**Confidence:** 85%
**Frequency:** 8 occurrences
**Impact:** Modifies `ccpm-config.yaml`
**Change:**
```diff
workflow:
phase_5a:
- timeout: 180
+ timeout: 300
Evidence:
- 8 workflows failed with timeout in Phase 2
- Average test count: 127 files
- Average completion time needed: 245s
[ ] Apply [ ] Skip [ ] Modify
### Step 4: Apply Changes
1. Create backup: `backups/ccpm-config.yaml.20260107`
2. Apply modification
3. Update Supabase: `UPDATE af_learned_patterns SET applied=TRUE WHERE id=...`
4. Log change
---
## Rollback
```bash
/learn:rollback <change_id> # Rollback specific change
/learn:rollback --list # List recent changes
/learn:rollback --all # Rollback all changes from today
Example Session
User: /learn:apply
Claude: 🐸 Self-Improve: Found 3 pending improvements
## Improvement 1/3: Agent Routing Update
Confidence: 92% | Frequency: 28
**Suggestion:** Default react-expert for .tsx files
**Evidence:**
- 28 workflows with React component tasks
- react-expert success rate: 96%
- Current default (frontend) success rate: 78%
**Change to:** `agents/router.md`
```diff
react_patterns:
- default_agent: frontend
+ default_agent: react-expert
+ file_extensions: [.tsx, .jsx]
Apply this improvement? [y/n/skip/modify]:
User: y
Claude: ✅ Applied improvement 1/3 Backup saved to: backups/router.md.20260107
Improvement 2/3: ...
---
## Configuration
In `ccpm-config.yaml`:
```yaml
learning:
self_improve:
enabled: true
auto_apply_threshold: 0.8 # Confidence threshold for --auto
min_frequency: 5 # Minimum occurrences for auto-apply
backup_dir: backups/ # Where to store backups
max_auto_per_day: 10 # Limit auto-applies per day
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
scalable-thinking
Design for scale while keeping implementation simple (KISS).
debugging
Systematic debugging with root cause investigation. NO fixes without understanding cause first.
migration-helper
Guide safe database and code migrations with zero-downtime strategies.
testing-patterns
Unified testing patterns across all frameworks. Provides consistent test structure, naming, and best practices for Jest, Vitest, Pytest, PHPUnit, Go testing, and more.
phase1-lite
Ultra-compact Phase 1 requirements output. HARD CAP: 500 tokens.
stitch-design
Generate UI designs using Google Stitch AI with optimized prompts
Didn't find tool you were looking for?