一天一个开源项目

开源项目第197期:skill-up — 阿里巴巴出品的 Agent Skills 评测与进化工具,评测闭环 + 自动修复

阿里巴巴开源的 Agent Skills 评测与进化工具。Evaluation:声明式 YAML 配置(eval.yaml + cases/*.yaml),多引擎支持(Claude Code/Codex/Qoder CLI/Qwen Code),三种评判策略(规则/脚本/Agent judge),生成 Anthropic 兼容报告。Evolution:内置 skill-upper Agent Skill,读取失败报告,自动修复 Skill 或补充 eval 用例,迭代至通过。支持 GitHub Action CI。Go,Apache-2.0,655 Stars。

·约 10 分钟阅读·AI Tools

引言

"Evaluation makes Skill quality measurable. Evolution turns those results into the next improvement."

这是「每日一个开源项目」系列的第 197 篇。今天的项目是 skill-up —— 阿里巴巴开源的 Agent Skills 评测与进化工具,655 Stars,Go 语言,Apache-2.0。

skill-up 解决的核心问题:你写了一个 Agent Skill(SKILL.md),怎么知道它能不能正常工作?如果不行,哪里出了问题?修完之后怎么防止它再次退化?

这个工具把「评测→诊断→修复→回归」的整个循环都做进来了:skill-up CLI 运行声明式测试用例,skill-upper(内置的 Agent Skill)读取失败报告,自动修复 Skill 或补充测试用例,再次运行,持续迭代。

你会学到什么

  • Evaluation 侧:eval.yaml + cases/*.yaml 的声明式配置结构
  • 三种评判策略:rule_based、script、agent_judge
  • Evolution 侧:skill-upper 如何通过对话驱动自动修复循环
  • 支持的 Agent 引擎:Claude Code、Codex、Qoder CLI、Qwen Code
  • GitHub Action 集成:在 CI 中跨引擎评测 Skill
  • 与 Anthropic evals.json 格式的兼容性

前提知识

  • 了解 Agent Skills 的基本概念(SKILL.md 格式)
  • 基本的命令行使用经验
  • 对 CI/CD 有基础了解(GitHub Actions 部分)

项目背景

概述

skill-up 是 Agent Skills 标准 的官方评测工具链。Agent Skills 是一种让 coding agent(Claude Code、Codex 等)按需加载能力的标准——用 Markdown 写能力描述,agent 读取后就知道该怎么做。skill-up 解决的是这个生态里的评测和质量控制问题。

官方评测指南描述了正确的流程:写真实用例、带和不带 Skill 各跑一次、评判输出、汇总结果、迭代改进。skill-up 把这个流程变成了可复用的 CLI。

项目信息

项目数据

  • ⭐ GitHub Stars: 655+
  • 🍴 Forks: 44+
  • 📄 许可证: Apache-2.0
  • 📅 创建时间: 2026-05-09

两个核心能力

skill-up 的设计围绕两个互补的能力:

Evaluation(评测):让 Skill 质量可量化、可复现。声明式 YAML 配置,跨多个 Agent 引擎运行测试用例,使用规则/脚本/Agent 三种评判方式,本地或 CI 中生成结构化报告。

Evolution(进化):把评测结果转化为下一次改进。skill-upper 读取失败报告,自动修复或扩充测试套件,重新运行 skill-up,持续迭代——全程通过对话驱动。

写 SKILL.md

skill-upper 生成 eval.yaml + cases/*.yaml

skill-up run → result.json

skill-upper 分析失败 → 修复 Skill 或修复 eval 用例

skill-up run(再次)→ 所有重要行为通过

安装

安装 skill-up CLI

curl -fsSL https://raw.githubusercontent.com/alibaba/skill-up/main/install.sh | bash

安装 skill-upper(推荐入口)

# Codex,全局安装
npx skills add https://github.com/alibaba/skill-up/tree/main/skills/skill-upper -g -a codex -y
 
# Claude Code,全局安装
npx skills add https://github.com/alibaba/skill-up/tree/main/skills/skill-upper -g -a claude-code -y

skill-upper 会在运行时检测 skill-up CLI 是否已安装,如果没有会引导 agent 完成安装。


声明式评测配置

目录结构

my-skill/
  SKILL.md            ← 被评测的 Skill
  evals/
    eval.yaml         ← 评测环境、引擎、全局设置
    cases/
      case-001.yaml   ← 单个测试用例
      case-002.yaml

eval.yaml 结构

schema_version: v1alpha1
kind: EvalConfig
 
environment:
  type: local           # 本地沙箱环境
  # type: opensandbox   # 阿里云沙箱
 
engine:
  type: claude_code     # 使用 Claude Code 引擎
  model: claude-sonnet-5
 
skill:
  path: ../SKILL.md     # 被评测的 Skill
 
cases:
  - cases/             # 引用 cases/ 目录下所有 yaml

测试用例(case-001.yaml)

schema_version: v1alpha1
kind: EvalCase
 
id: case-001
description: "基本功能验证"
 
input:
  role: user
  content: "帮我完成这个任务..."
 
judge:
  type: rule_based
  rules:
    - type: contains
      value: "预期输出关键词"
    - type: not_contains
      value: "不应出现的内容"

三种评判策略

rule_based(规则判断)

最简单、最快速,适合有明确输出格式预期的用例:

judge:
  type: rule_based
  rules:
    - type: contains
      value: "function"
    - type: regex
      pattern: "def\\s+\\w+\\("
    - type: not_contains
      value: "error"

script(脚本判断)

适合需要自定义逻辑的复杂判断,运行任意脚本评判输出:

judge:
  type: script
  script: |
    #!/bin/bash
    # $OUTPUT 包含 agent 的输出
    echo "$OUTPUT" | grep -q "expected_pattern"
    exit $?

agent_judge(Agent 评判)

用 LLM 作为评判者,适合主观性强、难以用规则描述的评判场景:

judge:
  type: agent_judge
  criteria: |
    评判标准:
    1. 输出是否正确完成了任务?
    2. 是否有安全问题?
    3. 代码质量是否合格?
  pass_threshold: 0.8   # 0-1 评分阈值

支持的 Agent 引擎

引擎类型说明
claude_code内置Anthropic Claude Code CLI
codex内置OpenAI Codex CLI
qodercli内置Qoder(阿里云) CLI
qwen_code内置通义千问 Code CLI
engine.custom自定义本地传输协议,接入任意 agent

自定义引擎通过本地传输接入,适合接入内部 agent 或其他不在内置列表里的工具。详见 docs/design/custom-engine.md


Evolution:用 skill-upper 驱动进化循环

这是 skill-up 最有特色的部分。skill-upper 本身就是一个 Agent Skill,它在 Claude Code/Codex 里运行,把评测和修复循环变成对话式工作流。

第一步:创建并运行第一批评测

在包含 SKILL.md 的项目里,对 agent 说:

Use skill-upper to evaluate this Skill.
Read SKILL.md, identify its most important behaviors, create realistic eval
cases with appropriate judges, validate the configuration, and run skill-up.
Summarize the results and the highest-impact failures.

skill-upper 会:

  1. 读取 SKILL.md,分析关键行为
  2. 生成 evals/eval.yamlcases/*.yaml
  3. 调用 skill-up validate 验证配置
  4. 调用 skill-up run 运行评测
  5. 汇报结果和高优先级失败项

运行后会生成:

my-skill-workspace/
  iteration-1/
    result.json       ← 详细结果
    grading.json      ← Anthropic 兼容格式
    benchmark.md      ← 可读报告

第二步:修复、回归、迭代

继续在同一对话里:

Review the latest skill-up results. For each failure, determine whether the
Skill or the eval is wrong. Fix SKILL.md and supporting files, or repair the
eval case and judge as appropriate. Add regression cases for the bugs you
found, rerun skill-up, and continue until the important behaviors pass.

skill-upper 会对每个失败判断:Skill 本身有问题,还是测试用例写错了?前者修 SKILL.md,后者修 cases/*.yaml,然后补充回归用例,再次运行。

这是一个真正的 eval-to-evolution 闭环:报告→修复→回归用例→再次运行,每次迭代让 Skill 和测试套件都变得更强。


报告输出格式

skill-up run 生成多种格式的报告,兼容不同使用场景:

文件格式用途
result.jsonJSON完整原始结果
grading.jsonAnthropic 兼容与 Anthropic eval 工具链集成
benchmark.jsonJSON跨引擎对比数据
benchmark.mdMarkdown人类可读的摘要报告
junit.xmlJUnit XMLCI 系统展示测试结果
report.htmlHTML本地浏览详情

从已有的 result.json 重新生成报告(不需要重跑):

skill-up report result.json

GitHub Action CI 集成

skill-up 在仓库根目录提供了 GitHub Action,可以在每个 PR 触发时自动评测 Skill,并且支持跨引擎对比:

# .github/workflows/skill-eval.yml
name: Skill Eval
on:
  pull_request:
    paths: ['skills/**', 'evals/**', '**/SKILL.md']
jobs:
  eval:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: alibaba/skill-up@main
        with:
          engine: claude_code          # 或 codex / qodercli / qwen_code
          api-key: ${{ secrets.ANTHROPIC_API_KEY }}
          base-url: https://api.anthropic.com
          skill-target: evals/eval.yaml

Action 的 runner 镜像预装了 skill-up CLI 和三个引擎 CLI,运行即开即用,不需要额外的镜像拉取配置。


CLI 命令参考

命令说明
skill-up run [path]运行评测用例,生成全套报告
skill-up validate [path]验证 eval.yaml 和 cases/*.yaml 配置
skill-up list-cases [path]列出配置引用的所有用例
skill-up report <result.json>从已有结果重新生成报告
skill-up import <evals.json>导入 Anthropic evals.json 转为 YAML 格式
skill-up init写入用户配置模板
skill-up debug judge <input.json>调试 judge 模块
skill-up debug report <input.json>调试 report 模块

配置优先级

skill-up 支持四层配置叠加,低到高:

embed(内置空默认值)
    < user(~/.config/skill-up/config.yaml)
    < project($PWD/.skill-up.yaml)
    < explicit(--config 命令行参数)
skill-up init           # 写入 ~/.config/skill-up/config.yaml
skill-up init --local   # 写入 $PWD/.skill-up.yaml
skill-up init --print   # 打印配置模板到 stdout

与 Anthropic evals.json 兼容

如果已经有 Anthropic 格式的评测文件,可以一键导入为 skill-up 的 YAML 格式:

skill-up import ./evals/evals.json --output ./evals

skill-up 也会把结果输出为 grading.json(Anthropic 兼容),方便与 Anthropic 的 eval 工具链集成。


参考资源

官方链接


总结

skill-up 解决了 Agent Skills 生态里一个实际存在的工程问题:写 Skill 容易,验证它的行为符合预期很难,保证它在迭代中不退化更难。

几个值得记录的设计决策:

评测和进化分开,但打通skill-up CLI 只做评测,skill-upper Agent Skill 只做诊断和修复。两者职责清晰,但通过文件格式(result.json)连接,形成完整闭环。这比把所有逻辑塞进一个工具要干净得多。

skill-upper 本身就是一个 Skill:它通过 npx skills add 安装,在 Claude Code/Codex 里运行,读取 result.json 后通过对话驱动修复循环。这种「用 Skill 来评测和修复 Skill」的设计,让整个工具链自洽。

三种评判策略的梯度:规则判断(零成本)→ 脚本判断(低成本)→ Agent 评判(高准确性)。根据用例的复杂程度选择合适的评判方式,而不是一刀切地用 LLM 评判所有内容。

Anthropic 兼容是显式设计目标:能导入 evals.json,输出 grading.json,说明项目考虑了与现有工具链的互操作性,而不是强迫用户全部迁移。

如果你在开发 Agent Skills,skill-up 提供了一套从单次手动测试到 CI 持续评测的完整路径,skill-upper 的自动修复循环让这个过程几乎可以全自动化。


探索 PrimeSkills —— 精选 AI agent 和技能工具,每一个都经过真实工作流验证。没有炒作,只有真正好用的工具。

访问我的个人主页,获取更多见解和有趣的产品。