Agent skill
cross-task-learning
Pattern for aggregating insights across multiple tasks to enable data-driven evolution.
Install this agent skill to your Project
npx add-skill https://github.com/aiskillstore/marketplace/tree/main/skills/clouder0/cross-task-learning
SKILL.md
Cross-Task Learning Skill
Pattern for maintaining aggregated insights across all completed tasks.
When to Load This Skill
- Reflector: After writing individual reflection
- Evolver: Before analyzing reflections (to get aggregated view)
Core Concept
Individual reflections capture task-specific learnings. Cross-task learning aggregates these to identify:
- Patterns that keep appearing → Skill candidates
- Strategies that consistently work → Best practices
- Strategies that keep failing → Anti-patterns
- Bottlenecks that recur → System weaknesses
- Proposals that keep emerging → Priority improvements
Aggregate File
Location: memory/reflections/_aggregate.json
Example structure (compact JSON):
{"last_updated":"ISO-8601","tasks_analyzed":15,"strategy_effectiveness":[{"strategy":"Spawn parallel explorers for context","uses":12,"successes":10,"effectiveness_score":0.83,"notes":"Works well for unfamiliar codebases"}],"failure_patterns":[{"pattern":"Contract conflicts in parallel implementation","occurrences":4,"severity":"high","status":"active"}],"skill_candidates":[{"pattern":"Read → Explore → Implement → Test → Verify","frequency":8,"effectiveness":"high","proposed_skill_name":"implementation-cycle"}]}
Update Protocol (for Reflector)
After writing individual reflection, update aggregate:
1. Read current _aggregate.json
2. Read the reflection just written
3. Update task_history:
- Add new entry with task_id, timestamp, outcome
- Keep last 20 entries (trim oldest)
4. Update strategy_effectiveness:
FOR each strategy in reflection.patterns.effective_strategies:
IF strategy exists in aggregate:
→ Increment uses and successes
→ Recalculate effectiveness_score
ELSE:
→ Add new entry with uses=1, successes=1
FOR each strategy in reflection.patterns.ineffective_strategies:
IF strategy exists in aggregate:
→ Increment uses and failures
→ Recalculate effectiveness_score
ELSE:
→ Add new entry with uses=1, failures=1
5. Update failure_patterns:
FOR each issue in reflection.process_analysis.phases[].issues:
IF similar pattern exists (fuzzy match):
→ Increment occurrences
→ Update last_seen
ELSE:
→ Add new pattern
6. Update bottleneck_hotspots:
FOR each bottleneck in reflection.process_analysis.bottlenecks:
IF location exists:
→ Increment frequency
→ Add cause if new
ELSE:
→ Add new hotspot
7. Update skill_candidates:
FOR each sequence in reflection.patterns.repeated_sequences:
IF sequence.skill_candidate == true:
IF similar pattern exists:
→ Increment frequency
ELSE:
→ Add new candidate
8. Update recurring_discoveries:
FOR each finding in reflection.knowledge_discovered:
IF similar finding exists:
→ Increment discovery_count
→ Set should_be_documented = true if count >= 3
ELSE:
→ Add new entry
9. Update recurring_proposals:
FOR each proposal in reflection.evolution_proposals:
IF similar proposal exists:
→ Increment occurrence_count
ELSE:
→ Add new entry
10. Update retry_analysis:
FOR each retry in reflection.process_analysis.retries:
→ Increment total_retries
→ Update by_strategy counts
11. Increment tasks_analyzed
12. Update last_updated
13. Write updated _aggregate.json (compact JSON)
Similarity Matching
When checking if patterns are "similar":
Normalize both strings:
- Lowercase
- Remove punctuation
- Remove common words (the, a, an, is, are)
Compare using:
- Exact match after normalization
- OR: >70% word overlap
- OR: Same key terms present
Thresholds for Action
| Metric | Threshold | Action |
|---|---|---|
| Strategy effectiveness < 0.3 | After 5 uses | Flag as anti-pattern |
| Strategy effectiveness > 0.8 | After 5 uses | Flag as best practice |
| Failure pattern occurrences | >= 3 | Flag for urgent fix |
| Skill candidate frequency | >= 5 | Propose as new skill |
| Recurring discovery count | >= 3 | Add to knowledge base |
| Recurring proposal count | >= 3 | Prioritize for evolution |
Query Patterns (for Evolver)
Get top issues to fix:
failure_patterns
WHERE status == "active"
ORDER BY occurrences * severity_weight DESC
LIMIT 5
Get best practices to document:
strategy_effectiveness
WHERE effectiveness_score > 0.8
AND uses >= 5
Get skill candidates ready for implementation:
skill_candidates
WHERE frequency >= 5
AND effectiveness == "high"
AND status == "candidate"
Get knowledge gaps:
recurring_discoveries
WHERE should_be_documented == true
AND NOT in knowledge_base
Integration with Evolver
The evolver should:
- Read
_aggregate.jsonFIRST (not individual reflections) - Use aggregated data for proposal prioritization:
- High-occurrence failure patterns → High priority
- High-frequency skill candidates → Medium priority
- Recurring proposals → Already validated ideas
- Reference individual reflections only for details
- Update
recurring_proposals[].statusafter evolution
Principles
- Aggregate, don't duplicate - Summary stats, not copies
- Track trends - First seen, last seen, frequency
- Enable queries - Structure for easy filtering
- Threshold-based actions - Clear criteria for when to act
- Fuzzy matching - Similar patterns should merge, not duplicate
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
perigon-backend
Perigon ASP.NET Core + EF Core + Aspire conventions
perigon-agent
Pointers for Copilot/agents to apply Perigon conventions
perigon-angular
Angular 21+ standalone/Material/signal conventions for Perigon WebApp
fastapi-mastery
Comprehensive FastAPI development skill covering REST API creation, routing, request/response handling, validation, authentication, database integration, middleware, and deployment. Use when working with FastAPI projects, building APIs, implementing CRUD operations, setting up authentication/authorization, integrating databases (SQL/NoSQL), adding middleware, handling WebSockets, or deploying FastAPI applications. Triggered by requests involving .py files with FastAPI code, API endpoint creation, Pydantic models, or FastAPI-specific features.
context7-efficient
Token-efficient library documentation fetcher using Context7 MCP with 86.8% token savings through intelligent shell pipeline filtering. Fetches code examples, API references, and best practices for JavaScript, Python, Go, Rust, and other libraries. Use when users ask about library documentation, need code examples, want API usage patterns, are learning a new framework, need syntax reference, or troubleshooting with library-specific information. Triggers include questions like "Show me React hooks", "How do I use Prisma", "What's the Next.js routing syntax", or any request for library/framework documentation.
browser-use
Browser automation using Playwright MCP. Navigate websites, fill forms, click elements, take screenshots, and extract data. Use when tasks require web browsing, form submission, web scraping, UI testing, or any browser interaction.
Didn't find tool you were looking for?