Token导航 LogoToken导航TokenDH.com
研究检索权限需确认github未标认证来源可访问许可证需确认审计提醒

self-improving-agent-builder自我改进 Agent 建设者

Agent Skill

self-improving-agent-builder 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 Codex、Claude、Cursor、Gemini CLI 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,903

周安装

77

GitHub Stars

55

下载量

598
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:self-improving-agent-builder(自我改进 Agent 建设者)
来源仓库:https://github.com/rysweet/amplihack
仓库路径:skills/self-improving-agent-builder
安装命令:
npx skills add https://github.com/rysweet/amplihack --skill self-improving-agent-builder
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/rysweet/amplihack --skill self-improving-agent-builder

简介

self-improving-agent-builder 用于记录任务执行中的错误、纠正和经验沉淀。

  • 适合希望 Agent 持续改进问题处理和最佳实践的场景。
  • 通过 npx skills add 命令安装,建议结合原始 README 了解具体用法。
  • 安装前应确认权限范围和维护状态,避免触发文件读写或网络请求。
  • 涉及经验存储时应注意数据边界和隐私保护。

SKILL.md

Self-Improving Agent Builder

Purpose

Run a closed-loop improvement cycle on any goal-seeking agent implementation:

EVAL -> ANALYZE -> RESEARCH -> IMPROVE -> RE-EVAL -> DECIDE -> (repeat)

Each iteration measures L1-L12 progressive test scores, identifies failures with error_analyzer.py, runs a research step with hypothesis/evidence/ counter-arguments, applies targeted fixes, and gates promotion through regression checks.

When I Activate

  • "improve agent" or "self-improving loop"
  • "agent eval loop" or "run improvement cycle"
  • "benchmark agents" or "compare SDK implementations"
  • "iterate on agent scores" or "fix agent regressions"

Quick Start

User: "Run the self-improving loop on the mini-framework agent for 3 iterations"

Skill: Executes 3 iterations of EVAL->ANALYZE->RESEARCH->IMPROVE->RE-EVAL->DECIDE
       Reports per-iteration scores, net improvement, and commits/reverts.

Runner Script

The self-improvement loop is implemented as a Python CLI:

# Basic usage
python -m amplihack.eval.self_improve.runner --sdk mini --iterations 3

# Full options
python -m amplihack.eval.self_improve.runner \
  --sdk mini \
  --iterations 5 \
  --improvement-threshold 2.0 \
  --regression-tolerance 5.0 \
  --levels L1 L2 L3 L4 L5 L6 \
  --output-dir ./eval_results/self_improve \
  --dry-run  # evaluate only, don't apply changes

Source: src/amplihack/eval/self_improve/runner.py

The Loop (6 Phases per Iteration)

Phase 1: EVAL

Run the L1-L12 progressive test suite on the current agent implementation.

Execution:

python -m amplihack.eval.progressive_test_suite \
  --agent-name <agent_name> \
  --output-dir <output_dir>/iteration_N/eval \
  --levels L1 L2 L3 L4 L5 L6

Output: Per-level scores and overall baseline.

Phase 2: ANALYZE

Classify failures using error_analyzer.py. Maps each failed question to a failure taxonomy (retrieval_insufficient, temporal_ordering_wrong, etc.) and the specific code component responsible.

from amplihack.eval.self_improve import analyze_eval_results

analyses = analyze_eval_results(level_results, score_threshold=0.6)
# Each ErrorAnalysis maps to:
#   failure_mode -> affected_component -> prompt_template

Phase 3: RESEARCH (New)

The critical thinking step that prevents blind changes. For each proposed improvement:

  1. State hypothesis: What specific change will fix the failure?
  2. Gather evidence: From eval results, failure patterns, baseline scores
  3. Consider counter-arguments: What could go wrong? Risk of regression?
  4. Make decision: Apply, skip, or defer with full reasoning

Decisions are logged in research_decisions.json for auditability.

Decision criteria:

  • Apply: Clear failure pattern + prompt template available + low score
  • Skip: Score above 50% (likely stochastic variation)
  • Defer: Ambiguous evidence, needs more data

Phase 4: IMPROVE

Apply the improvements approved by the research step. Priority order:

  1. Prompt template improvements (safest, highest impact)
  2. Retrieval strategy adjustments
  3. Code logic fixes (most risky, needs careful review)

Phase 5: RE-EVAL

Re-run the same eval suite after applying fixes to measure impact.

Phase 6: DECIDE

Promotion gate:

  • Net improvement >= +2% overall score: COMMIT the changes
  • Any single level regression > 5%: REVERT all changes
  • Otherwise: COMMIT with marginal improvement note

Configuration

ParameterDefaultDescription
sdk_typeminiWhich SDK: mini/claude/copilot/microsoft
max_iterations5Maximum improvement iterations
improvement_threshold2.0Minimum % improvement to commit
regression_tolerance5.0Maximum % regression on any level
levelsL1-L6Which levels to evaluate
output_dir./eval_results/self_improveResults directory
dry_runfalseEvaluate only, don't apply changes

Programmatic Usage

from amplihack.eval.self_improve import run_self_improvement, RunnerConfig

config = RunnerConfig(
    sdk_type="mini",
    max_iterations=3,
    improvement_threshold=2.0,
    regression_tolerance=5.0,
    levels=["L1", "L2", "L3", "L4", "L5", "L6"],
    output_dir="./eval_results/self_improve",
    dry_run=False,
)

result = run_self_improvement(config)
print(f"Total improvement: {result.total_improvement:+.1f}%")
print(f"Final scores: {result.final_scores}")

4-Way Benchmark Mode

Compare all SDK implementations side by side:

User: "Run a 4-way benchmark comparing all SDK implementations"

Skill: Runs eval suite on mini, claude, copilot, microsoft
       Generates comparison table with scores, LOC, and coverage.

Integration Points

  • src/amplihack/eval/self_improve/runner.py: Self-improvement loop runner
  • src/amplihack/eval/self_improve/error_analyzer.py: Failure classification
  • src/amplihack/eval/progressive_test_suite.py: L1-L12 eval runner
  • src/amplihack/agents/goal_seeking/sdk_adapters/: All 4 SDK implementations
  • src/amplihack/eval/metacognition_grader.py: Advanced eval dimensions
  • src/amplihack/eval/teaching_session.py: L7 teaching quality eval

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

31.97%
按下载量换算191

Claude

29.9%
按下载量换算179

Cursor

19.93%
按下载量换算119

Gemini CLI

9.24%
按下载量换算55

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills