self-improving-agent-python

# Self-Improvement Agent Skill

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "self-improving-agent-python" with this command: npx skills add brandon114/self-improving-agent-python

Self-Improvement Agent Skill

当 Agent 需要从任务执行中学习并自我优化时,激活此技能。


激活条件

用户提到以下关键词时激活:

  • "自我改进"、"自我优化"、"学习经验"
  • "任务评估"、"性能分析"
  • "优化工作流程"、"提升效率"
  • 需要 Agent 从错误中学习的场景

核心概念

Agent 不应该只是执行任务,还应该从执行中学习,不断优化自己的表现。

三层自我改进机制:

  1. Layer 1: 实时反馈循环 - 每次任务执行后立即评估
  2. Layer 2: 周期性深度反思 - 定期深度分析
  3. Layer 3: 跨 Agent 经验共享 - 共享学习成果

任务评估标准

评分公式

总分 = 完成度(30%) + 效率(20%) + 质量(30%) + 满意度(20%)

评分等级

分数等级行动
≥90优秀记录最佳实践
80-89良好继续保持
70-79及格识别改进点
<70不及格触发深度反思

使用方法

Python 版本(推荐)

# 评估任务
python scripts/evaluate_task.py \
    --agent-id "my-agent" \
    --task-id "task-001" \
    --task-type "内容创作" \
    --completion 90 \
    --efficiency 85 \
    --quality 80 \
    --satisfaction 85

# 记录经验
python scripts/learn_lesson.py \
    --agent-id "my-agent" \
    --lesson "验证链接有效性" \
    --impact high \
    --category quality

# 优化分析
python scripts/optimize_agent.py --agent-id "my-agent"

# 跨 Agent 同步
python scripts/sync_learning.py

参数说明

evaluate_task.py

参数说明必填
--agent-idAgent 标识
--task-id任务标识
--task-type任务类型
--completion完成度 (0-100)
--efficiency效率 (0-100)
--quality质量 (0-100)
--satisfaction满意度 (0-100)

learn_lesson.py

参数说明必填可选值
--agent-idAgent 标识
--lesson经验描述
--impact影响程度high/medium/low
--category类别quality/efficiency/tools/knowledge

数据存储位置

{workspace}/
├── self-improvement/
│   ├── evaluations.json        # 评估记录
│   ├── lessons-learned.json   # 经验库
│   └── optimization-plan.json # 优化计划
└── shared-context/
    └── self-improvement/
        └── collective-wisdom.json  # 共享知识库

最佳实践

何时评估

  • 完成重要任务后
  • 完成复杂任务后
  • 任务失败或返工后
  • 简单重复性任务可选

如何记录经验

  • 记录具体的失败场景
  • 记录成功的关键因素
  • 记录工具使用的注意事项

如何应用学习

  • 定期回顾经验库
  • 主动应用最佳实践
  • 分享给其他 Agent

故障排查

问题解决
找不到工作区检查 config.py 中的路径配置
经验未同步手动运行 sync_learning.py
优化计划生成失败确保有足够的历史评估数据

让每个 Agent 都成为终身学习者!

Version: 1.1.0 (Python Edition) Tags: agent, self-improvement, learning, optimization

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Research

SwarmVault

Use SwarmVault when the user needs a local-first knowledge vault that writes durable markdown, graph, search, dashboard, review, chat-session, context-pack,...

Registry SourceRecently Updated
Research

Inspiration / Case Figure Guide

Use when the user wants to design, prompt, generate, critique, or integrate publication-ready research-paper inspiration figures: motivating examples, proble...

Registry SourceRecently Updated
Research

搜索网页规则管理(多平台增强版)

搜尋網頁時的規則管理技能。支持多種知識庫平台(IMA、騰訊文檔、其他),自動管理搜尋網址庫(白名單、黑名單、未分類),暫存搜尋內容,並在用戶確認後整理歸檔。當用戶提到搜尋網頁、網址規則、白名單、黑名單、暫存搜尋內容時使用此技能。

Registry SourceRecently Updated
Research

Research Paper Figure Skill Factory

Use when the user wants a research-paper figure Skill Factory: build, patch, package, or use reusable specialized paper-figure-making skills from lawful lite...

Registry SourceRecently Updated