Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

self-learning

БесплатноЗапускает вложенные скриптыНе проверен

Self-learning capability for agents. Captures execution traces, extracts insights, and adapts agent behavior. Use after completing complex tasks, when agents…

gotarот gotar★ 27 звёзд на GitHub

Об этом скилле

Self Learning

Overview

Enables agents to learn from their execution history by capturing traces, extracting actionable insights, and adapting behavior. Transforms raw execution patterns into reusable knowledge structures that improve future performance.

When to Use This Skill

Trigger this skill when:

  • An agent completes a complex task and should capture learnings
  • Recurring patterns of failures or inefficiencies are detected
  • An agent discovers a better approach that should be retained
  • Multiple agents coordinate on a task and need shared learning
  • Performance metrics show degradation or opportunity for improvement

Automatic Invocation: Integrate into agents at critical points:

  • Orchestrator: After merging worker results, capture coordination patterns
  • Worker: After completing task (post-review), capture execution insights
  • Reviewer: After detecting recurring issues, capture quality patterns
  • Task Manager: After task completion, capture decomposition insights

Core Capabilities

1. Trace Collection

Captures structured execution traces containing:

# Execution Trace Structure
- Task Description
- Approach Used
- Tools Invoked (with tool calls)
- Context Loaded
- Results Achieved
- Failures/Errors Encountered
- Time Metrics (optional)
- Success/Failure Status

Collection Strategy:

  • Manual capture: Agents document their execution after completion
  • Automatic hooks: Trace capture integrated into agent workflows
  • Context: Store traces in .tmp/learning/traces/{timestamp}_{agent}_{task}.md

Example Trace:

# Trace: worker_implementation_20250108_1120
Agent: worker
Task: Implement user authentication feature
Status: Success

## Approach
1. Analyzed existing auth patterns in codebase
2. Implemented JWT token validation
3. Added tests for edge cases

## Tools Invoked
- Read: agent/openagent.md, code/auth.ts
- Write: code/auth.ts, tests/auth.test.ts
- lsp_diagnostics: code/auth.ts

## Results
- Auth implemented successfully
- All tests passing
- Zero diagnostics errors

## Failures Encountered
- Initial JWT secret configuration missing
- Fixed by reading config patterns from code/config.ts

2. Insight Extraction

Transforms traces into structured insights using pattern recognition:

Insight Categories:

Category Description Example
Success Patterns Approaches that consistently work "Loading context.md before task start reduces errors by 40%"
Failure Patterns Recurring causes of failures " Skipping lsp_diagnostics leads to type errors in production"
Efficiency Patterns Ways to complete tasks faster "Reading multiple files in parallel reduces context load time"
Coordination Patterns Best practices for multi-agent work "Orchestrator spawning 2 workers instead of 3 reduces merge conflicts"
Knowledge Gaps Information that should have been available "Project lacks centralized error handling documentation"

Extraction Process:

  1. Analyze traces for recurring patterns
  2. Identify successful vs unsuccessful approaches
  3. Extract high-impact insights (prioritize by frequency and impact)
  4. Structure insights as actionable recommendations
  5. Store in .tmp/learning/insights/{category}.md

Example Insights:

# Insights: Success Patterns

## Context Loading
**Finding**: Loading context.md before task start significantly reduces errors
**Evidence**: 10/10 successful tasks loaded context.md first
**Action**: Mandate context loading in all agent workflows
**Impact**: High (prevents 60% of failures)

## Parallel Execution
**Finding**: Spawning 2 workers in parallel reduces total time by 35%
**Evidence**: Compared to 3 workers (merge conflicts) and 1 worker (sequential)
**Action**: Default to 2 workers in orchestrator for most tasks
**Impact**: Medium (performance optimization)

# Insights: Failure Patterns

## Skipping Validation
**Finding**: 8/10 failures skipped lsp_diagnostics before completion
**Evidence**: Type errors detected post-merge
**Action**: Require lsp_diagnostics before task completion
**Impact**: High (prevents integration failures)

3. Adaptation

Applies insights to improve agent behavior:

Adaptation Levels:

  1. Immediate (Session-Local): Apply insights within current session

    • Example: "Switching to 2 workers based on merge conflict pattern"
    • Storage: .tmp/learning/adaptations/session_{id}.md
  2. Persistent (Agent-Specific): Update agent instructions for future sessions

    • Example: "Added mandatory lsp_diagnostics check to worker.md"
    • Storage: Update agent .md files directly
  3. System-Wide (All Agents): Modify agent orchestration patterns

    • Example: "Updated orchestrator.md to default to 2 workers"
    • Storage: Update core agent files

Adaptation Rules:

  • Start with session-local adaptations (low risk)
  • Promote to persistent only after 3+
Полный SKILL.md на GitHub

Установить self-learning в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

scripts/analyze_traces.pyscripts/apply_adaptation.py

FAQ

Что делает скилл self-learning?

Self-learning capability for agents. Captures execution traces, extracts insights, and adapts agent behavior. Use after completing complex tasks, when agents encounter recurring issues, or to optimize workflows over time. Critical for multi-agent systems like orchestrator, worker, and reviewer.

Как установить скилл self-learning?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл self-learning запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить self-learning с