Claude Skill

skill-upper

Create, run, diagnose, and iteratively improve Agent Skill evaluations (evals) with the skill-up CLI / 使用 skill-up CLI 创建、运行、诊断并持续改进 Agent Skill 评测. Use when the user asks to evaluate, test, regress, verify, fix, improve, iterate, or evolve a Skill; add or strengthen eval cases;

LLM Mart · 0 points · 4 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download alibaba-skill-up-skills_skill-upper-24b0077.zip · 31 KB
alibaba/skill-up 966 75 forks Apache-2.0 Updated 7d ago
Part of alibaba/skill-up — 2 skills

Install

skills CLI npx skills add https://github.com/alibaba/skill-up/tree/main/skills/skill-upper
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install alibaba-skill-up@llmmart
Git git clone https://github.com/alibaba/skill-up.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole alibaba/skill-up collection as a plugin from our marketplace. Git is the plain clone.

README

skill-upper

An Agent Skill that helps you evaluate and evolve other Agent Skills using the skill-up CLI.

What it does

skill-upper guides you through an evaluation-to-evolution loop:

  • Locate the target Skill and understand its capabilities
  • Scaffold evals/eval.yaml and evals/cases/*.yaml with proper judge types
  • Validate configuration before running
  • Run evaluations against real Agent Engines (Claude Code, Codex, qodercli, etc.)
  • Diagnose failures from structured reports and output evidence
  • Evolve the Skill or strengthen eval coverage, then rerun the suite

When to use

  • You want to evaluate, test, or regress a Skill
  • You want to fix or iterate a Skill from eval failures
  • You need to write eval.yaml / case.yaml or choose a judge type
  • You're running skill-up run/validate/list-cases/report/import/init
  • You're migrating from Anthropic evals.json

Skill manifest

use-skill-up-cli

Help the user evaluate and evolve Agent Skills through the skill-up CLI.

Manual: https://alibaba.github.io/skill-up/

Language Policy

Default to English when responding to the user. If the user writes in Chinese (or any other language), switch to that language and stay consistent with the user's input throughout the session.

Detection rules (highest priority first):

  1. The user explicitly specifies a language in the current message (e.g. "answer in English" / "用中文回答") → follow the user's instruction.
  2. The natural language used in the user's current message → match it.
  3. None of the above → use English (default).

Regardless of the response language, technical identifiers in this SKILL — CLI commands, eval.yaml / case.yaml field names, report field names, etc. — MUST stay in their original English form. Do not translate them.

Language Rules for Generated Artifacts

When creating or editing eval.yaml, case.yaml, grading scripts, README snippets, final replies, or any other user-visible artifact, treat the language of the user's current message as the output language for this turn:

  • If the user asks in Chinese, write the final response and all generated natural-language content in Chinese, including YAML comments, title, description, input.prompt, expect keywords, and judge.criteria.
  • If the user asks in English, write the final response and all generated natural-language content in English, including YAML comments, title, description, input.prompt, expect keywords, and judge.criteria; do not leave Chinese or CJK characters in generated case files.
  • If the target Skill itself is written in Chinese but the user asks in English, translate the Skill's functional intent into English test prompts and assertions instead of copying Chinese prose from the target Skill or templates.
  • In an English context, deterministic keywords in rule_based cases, including expect.must_contain and judge.success.output_contains, must also be English keywords. Translate terms such as 资源泄漏, 关闭, and 异常处理 into resource leak, close, and exception handling; do not write bilingual parentheticals like "资源" (resources).
  • Keep technical identifiers unchanged, such as schema_version, environment.type, engine.name, rule_based, agent_judge, script_path, file paths, and commands.
  • Generated YAML comments must use field-leading comments. Keep each comment short: one line for field meaning, plus one line for options only when useful.
  • When listing options in comments, keep enum values unchanged, such as none | opensandbox | docker and rule_based | agent_judge | script.
  • Treat assets/*.tmpl as structural references only. Rewrite placeholder prose and comments into the current output language; in an English context, translate or remove every Chinese comment and Chinese placeholder before writing generated files.
  • skill-up import uses the CLI conversion path and does not preserve template comments; do not promise commented YAML for import-generated files.
  • In an English context, after generating all files but BEFORE submitting the final reply, you MUST perform a CJK self-check: open every evals/cases/*.yaml and evals/eval.yaml and scan for CJK characters (Unicode ranges \u4e00-\u9fff\u3400-\u4dbf\uf900-\ufaff\u3000-\u303f\uff00-\uffef), including but not limited to title, description, input.prompt, expect keywords, judge.criteria, and YAML comments. If any CJK character is found, replace it with an equivalent English expression before finishing the task. This step is mandatory and must not be skipped.

What is skill-up

skill-up is an evaluation CLI for Agent Skill authors. It installs the Skill into a real Agent Engine (Claude Code, Codex, qodercli, etc.), spins up an execution environment for each case, runs the prompt, then grades the result via declared rules / LLM judges / custom scripts, and finally produces a report.

Typical layout:

my-skill/
  SKILL.md
  evals/
    eval.yaml
    cases/
      <case-id>.yaml
    fixtures/

When to trigger

Use this skill in any of the following situations:

  • The user asks to "run / evaluate / verify / test this skill".
  • The user asks to "fix / improve / iterate / evolve this skill" from eval failures.
  • The user wants to "add evals, test cases, or regression cases to a skill".
  • The user wants to edit eval.yaml / case.yaml, or asks you to choose an appropriate judge type.
  • The user mentions skill-up run/validate/list-cases/report/import/init.
  • The user wants to migrate from Anthropic evals.json to skill-up.
  • The current working directory contains evals/eval.yaml or evals/evals.json and the user wants to run it.

Main flow (follow this order strictly)

Step 0: Make sure skill-up is installed

Before doing anything, verify skill-up is available:

command -v skill-up && skill-up --version

If a version is printed, continue. If you see command not found, on macOS / Linux:

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

export SKILL_UP_VERSION=v0.1.0
curl -fsSL https://raw.githubusercontent.com/alibaba/skill-up/main/install.sh | bash

export INSTALL_DIR="$HOME/bin"
curl -fsSL https://raw.githubusercontent.com/alibaba/skill-up/main/install.sh | bash

Platform: skill-up currently supports macOS / Linux only; Windows is not supported.

After installing, run skill-up --version again. If the command is still missing, add ~/.local/bin to PATH.

More details: references/install.md.

Step 0.5 (optional): User config and telemetry

For OTLP defaults, runtime_kwargs (e.g. OpenSandbox base_url), etc.:

skill-up init
skill-up init --local
skill-up init --print
skill-up init --force

Precedence (low → high): embedded empty defaults < user config < project .skill-up.yaml < --config. SKILL_UP_CONFIG can point at the user config file (env var name is historical). See the upstream README "User config".

Step 1: Locate the target Skill

  1. Identify the root directory of the target Skill (the directory containing SKILL.md). Search in this priority: user path → nearest SKILL.md upward from CWD → recently viewed files.
  2. Read the target SKILL.md for scope, triggers, and dependencies. If the Skill is Chinese but the user writes in English, translate capabilities into English for prompts and assertions.
  3. Check evals/:
    • evals/eval.yaml exists → Step 4 (optionally Step 3).
    • Only evals/evals.json → references/migrate-anthropic.md (skill-up run --auto or skill-up import).
    • Nothing → Step 2.

Step 2: Scaffold the evals (only when none exist)

  • Copy assets/eval.yaml.tmpl to <skill-root>/evals/eval.yaml.
  • Copy assets/case.yaml.tmpl to <skill-root>/evals/cases/<case-id>.yaml.

Adapt language per "Language Rules for Generated Artifacts". In an English context, it is prohibited to copy Chinese placeholder text from the templates into generated files — all prose must be rewritten in English. The Chinese in the templates is for structural reference only, not to be carried over. Preserve short field-leading comments in generated YAML. In Chinese context, rewrite those comments into Chinese while keeping field names and enum values in English.

Selection guidelines:

  • environment.type: use none for pure-text Skills; use opensandbox when you need a remote sandbox (set OPENSANDBOX_API_KEY, put non-secrets in environment.kwargs).
  • engine.name + engine.model: default claude_code; model is optional. For qodercli, often omit model.
  • judge.type: rule_based (preferred), script, agent_judge (expensive) — see references/judge-types.md.
  • Case ID = filename without .yaml; prompts should exercise real Skill value.

See references/eval-yaml.md and references/case-yaml.md.

Step 3: Fill the gaps (when evals already exist)

  • skill-up list-cases <path>
  • Review eval.yaml and representative cases; avoid agent_judge abuse.
  • Add or edit YAML under cases/ as needed.

Step 4: Validate the configuration

skill-up validate <skill-root>/evals/eval.yaml

Expect: ✓ eval.yaml is valid (loaded N case(s)).

Step 5: Prepare credentials

Priority: --api-key > env (ANTHROPIC_API_KEY, OPENAI_API_KEY, QODER_PERSONAL_ACCESS_TOKEN) > ~/.skill-up/credentials.yaml.

printenv | grep -E 'ANTHROPIC_API_KEY|OPENAI_API_KEY|QODER_PERSONAL_ACCESS_TOKEN'

If missing, stop and ask; do not write secrets into YAML without consent.

For opensandbox, also ensure OPENSANDBOX_API_KEY (and related env) as needed.

Step 6: Run the evaluation

skill-up run <skill-root>/evals/eval.yaml
Scenario Command
Subset --include-case-name "basic-*"
Exclude --exclude-case-name "*-flaky"
HTML report --format html
Engine override --engine codex --model openai/gpt-4
Parallelism --parallelism 4 (1–256)
Anthropic JSON --auto
Stability/flakiness sampling --iteration 3
Auto-append after last iteration --iteration 0 (default behavior)
Verbose -v, -vv

Exit 0 = all passed; 1 = failure or error — suitable for CI. When an explicit positive --iteration N runs more than one sample, inspect the terminal's simple current-command summary for lines like case_a: 3 trials, 2 PASS, 1 FAIL -> flaky.

Step 7: Interpret the report

Artifacts under <skill-root>/<skill-name>-workspace/iteration-N/:

  • result.json, benchmark.json, optional report.html
  • <case-id>/with_skill/grading.json, outputs/

Summarize: pass rate and timing; for failures, case id, assertion text, and evidence; benchmark deltas if enabled; offer HTML path or skill-up report result.json --format html.

Step 8: Evolve the Skill when requested

Only enter this loop when the user asks to fix, improve, iterate, or evolve the target Skill. If the user only asks to evaluate or report results, stop after Step 7 without modifying it.

  1. Diagnose failures from result.json, grading.json, and output evidence.
  2. Fix SKILL.md or supporting files when the Skill behavior is incorrect.
  3. Add or refine eval cases when coverage is missing.
  4. Do not weaken valid assertions merely to make a failure pass.
  5. Rerun failed cases first, then run the full eval suite.
  6. Continue until the evals pass or clearly report what remains blocked.

Command quick reference

Command Purpose
skill-up validate <eval.yaml> Validate before run.
skill-up list-cases <eval.yaml> List cases.
skill-up run [eval.yaml] Run evals.
skill-up run --auto Run from evals/evals.json.
skill-up report <result.json> --format html Re-render reports.
skill-up import <evals.json> Convert Anthropic format to YAML.
skill-up init Write user-config template.
skill-up debug judge <input.json> Debug judge.
skill-up debug report <input.json> Debug report.

Full flags: references/cli.md.

Common pitfalls

  • Model IDs vs proxy aliases — preserve what works for the user's base_url.
  • opensandbox without OPENSANDBOX_API_KEY — auth failures.
  • Chinese expect.must_contain vs English model output — align language in prompts/assertions.
  • Abusing agent_judge.
  • Anthropic evals.json expectations → default agent_judge; use import + hand edits for deterministic checks.
  • Paths relative to Skill root (SKILL.md directory).
  • --iteration 0 appends one run after the latest existing iteration without summarizing history; positive --iteration N runs N samples of the selected cases and, when N > 1, prints a simple stability/flakiness summary covering only samples from the current command.

References

  • references/install.md
  • references/eval-yaml.md
  • references/case-yaml.md
  • references/judge-types.md
  • references/cli.md
  • references/migrate-anthropic.md
  • assets/eval.yaml.tmpl, assets/case.yaml.tmpl
Files (skill-up)
  • assets
    • case.yaml.tmpl 2.6 KB · in bundle
    • eval.yaml.tmpl 2.8 KB · in bundle
  • evals
    • cases
      • add-case-to-existing.yaml 1.1 KB
        id: add-case-to-existing
        title: 向已有 evals 的 Skill 添加新评测用例
        description: |
          验证 skill-upper 能否在 Skill 已有 evals 基础上,
          正确新增一个测试用例并更新 eval.yaml 的 cases.files 引用。
        
        context:
          repo_fixture: evals/fixtures/skills/sample-with-evals
          git:
            init: true
        
        input:
          prompt: |
            当前目录的 todo-manager Skill 已经有一个评测用例 add-todo。
            请帮我再添加一个用例,测试"列出所有待办事项"的功能。
            用例 ID 叫 list-todos,judge 类型用 rule_based。
        
        expect:
          files_exist:
            - "evals/cases/list-todos.yaml"
            - "evals/eval.yaml"
        
        judge:
          type: agent_judge
          model: anthropic/claude-sonnet-4-6
          criteria:
            - "在 evals/cases/ 下新建了 list-todos.yaml 文件"
            - "list-todos.yaml 的 id 字段为 list-todos,且 judge.type 为 rule_based"
            - "list-todos.yaml 的 prompt 与列出待办事项功能相关"
            - "eval.yaml 的 cases.files 列表中新增了 evals/cases/list-todos.yaml 的引用,同时保留了原有的 add-todo.yaml"
          pass_threshold: 0.75
        
      • english-context-generates-english-only-cases.yaml 902 B
        id: english-context-generates-english-only-cases
        title: Respond in English and generate English-only case files in English context
        description: |
          Verifies that skill-upper follows an English user prompt by replying in
          English and by generating eval case YAML files that do not contain Chinese
          or CJK characters, while preserving short field comments near key YAML fields.
        
        context:
          repo_fixture: evals/fixtures/skills/sample-no-evals
        
        input:
          prompt: |
            Please set up evaluations for the code-review-helper Skill in the current directory.
            This Skill does not have any evals yet, so create evals/eval.yaml and at least one
            case YAML file under evals/cases/.
        
            Use environment type none and engine claude_code.
        
        expect:
          files_exist:
            - "evals/eval.yaml"
        
        judge:
          type: script
          script_path: evals/fixtures/scripts/assert-english-only-generated-cases.sh
          timeout_seconds: 30
        
      • evolve-existing-skill.yaml 1.4 KB
        id: evolve-existing-skill
        title: 根据评测失败修复 Skill 并补充回归用例
        description: |
          验证 skill-upper 在用户明确要求演进时,能够根据失败现象修复目标 Skill,
          同时补充回归用例,而不是删除或弱化已有评测。
        
        context:
          repo_fixture: evals/fixtures/skills/sample-with-evals
          git:
            init: true
        
        input:
          prompt: |
            todo-manager 最近的评测发现:当没有待办事项时,Agent 没有明确告诉用户列表为空。
            请使用 skill-upper 演进这个 Skill:
            1. 修复 SKILL.md,明确空列表时的预期行为;
            2. 添加一个 ID 为 list-empty-todos 的 rule_based 回归用例;
            3. 保留且不要弱化已有的 add-todo 用例。
        
        expect:
          files_exist:
            - "SKILL.md"
            - "evals/eval.yaml"
            - "evals/cases/add-todo.yaml"
            - "evals/cases/list-empty-todos.yaml"
        
        judge:
          type: agent_judge
          model: anthropic/claude-sonnet-4-6
          criteria:
            - "SKILL.md 明确说明没有待办事项时应告知用户列表为空"
            - "新增 evals/cases/list-empty-todos.yaml,且 id 为 list-empty-todos、judge.type 为 rule_based"
            - "新用例覆盖空待办列表场景,并检查输出能明确表达列表为空"
            - "原有 evals/cases/add-todo.yaml 被保留,原有断言没有被删除或弱化"
            - "eval.yaml 的 cases.files 同时引用 add-todo.yaml 和 list-empty-todos.yaml"
          pass_threshold: 0.8
        
      • scaffold-new-evals.yaml 1.5 KB
        id: scaffold-new-evals
        title: 为没有 evals 的 Skill 从零搭建评测脚手架
        description: |
          验证 skill-upper 能否正确为一个全新的 Skill(无 evals/ 目录)
          生成完整的评测脚手架,包括 eval.yaml 和至少一个 case yaml。
        
        context:
          repo_fixture: evals/fixtures/skills/sample-no-evals
          git:
            init: true
        
        input:
          prompt: |
            请为当前目录下的 code-review-helper Skill 搭建评测。
            这个 Skill 还没有任何 evals,请帮我从零创建 eval.yaml 和测试用例。
            环境类型用 none,引擎用 claude_code。
        
        expect:
          files_exist:
            - "evals/eval.yaml"
          must_contain:
            - "eval.yaml"
        
        judge:
          type: agent_judge
          model: anthropic/claude-sonnet-4-6
          criteria:
            - "生成了 evals/eval.yaml 文件,且包含 schema_version、environment、engine、cases 等必要字段"
            - "evals/eval.yaml 中 schema_version、environment.type、engine.name、cases.files、judge 等关键字段附近有简短中文字段注释"
            - "在 evals/cases/ 下生成了至少一个 case yaml 文件,且包含 id、title、input.prompt、judge 字段"
            - "case yaml 中 id、input.prompt、expect、judge.type 等关键字段附近有简短中文字段注释"
            - "YAML 字段名和枚举值保持英文,例如 schema_version、environment.type、rule_based、agent_judge、script"
            - "case 的 prompt 与 code-review-helper Skill 的功能相关(代码审查),而非无意义的占位符"
            - "eval.yaml 中 cases.files 列表正确引用了生成的 case 文件路径"
          pass_threshold: 1.0
        
      • scaffold-with-qodercli-engine.yaml 1.2 KB
        id: scaffold-with-qodercli-engine
        title: 使用 qodercli 引擎为 Skill 搭建评测
        description: |
          验证 skill-upper 在用户指定非默认 engine(如 qodercli)时,
          能否正确生成配置,engine.name 应为 qodercli 而非默认的 claude_code。
          注意 qodercli 无需配置 model,Skill 应知晓这一点。
        
        context:
          repo_fixture: evals/fixtures/skills/sample-no-evals
          git:
            init: true
        
        input:
          prompt: |
            请为当前目录下的 code-review-helper Skill 搭建评测。
            这个 Skill 还没有 evals,请帮我创建。
            注意:我想用 qodercli 作为 engine,环境类型用 none。
        
        expect:
          files_exist:
            - "evals/eval.yaml"
          must_contain:
            - "eval.yaml"
        
        judge:
          type: agent_judge
          model: anthropic/claude-sonnet-4-6
          criteria:
            - "生成了 evals/eval.yaml 文件,且 engine.name 为 qodercli(而非 claude_code 或 codex)"
            - "eval.yaml 中没有配置 engine.model 字段(因为 qodercli 目前无法切换模型),或者明确说明了 qodercli 无需配置模型"
            - "在 evals/cases/ 下生成了至少一个 case yaml 文件,包含与代码审查相关的 prompt"
            - "eval.yaml 中 cases.files 正确引用了生成的 case 文件"
          pass_threshold: 0.75
        
      • scaffold-with-script-judge.yaml 1.2 KB
        id: scaffold-with-script-judge
        title: 生成使用 script judge 的评测用例
        description: |
          验证 skill-upper 在用户要求使用 script 类型 judge 时,
          能否正确生成 case yaml(judge.type 为 script 且包含 script_path),
          并同时生成对应的判分脚本文件。
        
        context:
          repo_fixture: evals/fixtures/skills/sample-no-evals
          git:
            init: true
        
        input:
          prompt: |
            请为当前目录下的 code-review-helper Skill 搭建评测。
            我希望用 script 类型的 judge 来做评估,因为我需要用自定义脚本
            解析 Agent 的输出 JSON 并检查结构化字段。
            请帮我生成 eval.yaml、case yaml,以及对应的判分脚本。
            环境类型用 none,引擎用 claude_code。
        
        expect:
          files_exist:
            - "evals/eval.yaml"
        
        judge:
          type: agent_judge
          model: anthropic/claude-sonnet-4-6
          criteria:
            - "生成了 evals/eval.yaml 和至少一个 case yaml 文件"
            - "case yaml 中 judge.type 为 script,且包含 script_path 字段指向一个脚本文件路径"
            - "生成了 script_path 指向的判分脚本文件(如 .sh 或 .py),脚本中包含退出码逻辑(exit 0 表示 PASS,非 0 表示 FAIL)"
            - "eval.yaml 的 environment.type 为 none"
          pass_threshold: 1
        
    • fixtures
      • scripts
        • assert-english-only-generated-cases.sh 4.8 KB
          #!/usr/bin/env bash
          set -euo pipefail
          
          python3 - <<'PY'
          import os
          import pathlib
          import re
          import sys
          
          cjk_pattern = re.compile(r"[\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff\u3000-\u303f\uff00-\uffef]")
          ascii_word_pattern = re.compile(r"[A-Za-z]{3,}")
          
          failures = []
          
          final_message = os.environ.get("EVAL_FINAL_MESSAGE", "")
          if not final_message.strip():
              failures.append("Final response is empty.")
          elif cjk_pattern.search(final_message):
              failures.append("Final response contains Chinese/CJK characters.")
          elif len(ascii_word_pattern.findall(final_message)) < 5:
              failures.append("Final response does not contain enough English words.")
          
          case_dir = pathlib.Path("evals/cases")
          case_files = sorted(case_dir.glob("*.yaml")) if case_dir.exists() else []
          if not case_files:
              failures.append("No generated eval case YAML files were found under evals/cases/.")
          
          generated_yaml_files = []
          eval_yaml = pathlib.Path("evals/eval.yaml")
          if not eval_yaml.exists():
              failures.append("Generated evals/eval.yaml was not found.")
          else:
              generated_yaml_files.append(eval_yaml)
          generated_yaml_files.extend(case_files)
          
          for path in generated_yaml_files:
              text = path.read_text(encoding="utf-8")
              match = cjk_pattern.search(text)
              if match:
                  line_no = text[: match.start()].count("\n") + 1
                  failures.append(f"{path}:{line_no} contains Chinese/CJK characters.")
          
          def file_lines(path):
              return path.read_text(encoding="utf-8").splitlines()
          
          def is_explanatory_comment(line):
              stripped = line.lstrip()
              if not stripped.startswith("#"):
                  return False
              content = stripped[1:].strip()
              if not content:
                  return False
              if content.startswith("-"):
                  return False
              return not re.match(r"^[A-Za-z0-9_.-]+:\s*", content)
          
          def has_adjacent_explanatory_comment(lines, index, stop_index=0):
              cursor = index - 1
              found = False
              while cursor >= stop_index:
                  line = lines[cursor]
                  if not line.strip():
                      return found
                  if not line.lstrip().startswith("#"):
                      return found
                  found = is_explanatory_comment(line) or found
                  cursor -= 1
              return found
          
          def has_comment_before(lines, field_line):
              for index, line in enumerate(lines):
                  if line.lstrip().startswith("#"):
                      continue
                  if line.lstrip().startswith(field_line):
                      return has_adjacent_explanatory_comment(lines, index)
              return False
          
          def has_real_field(lines, field_line):
              return any(
                  not line.lstrip().startswith("#") and line.lstrip().startswith(field_line)
                  for line in lines
              )
          
          def has_nested_comment_before(lines, parent, child):
              for index, line in enumerate(lines):
                  if line.lstrip().startswith("#"):
                      continue
                  if line.startswith(parent):
                      for child_index in range(index + 1, min(len(lines), index + 8)):
                          if lines[child_index].lstrip().startswith("#"):
                              continue
                          if lines[child_index].startswith(child):
                              return has_adjacent_explanatory_comment(lines, child_index, index + 1)
              return False
          
          if eval_yaml.exists():
              lines = file_lines(eval_yaml)
              eval_checks = [
                  ("schema_version", has_comment_before(lines, "schema_version:")),
                  ("environment.type", has_nested_comment_before(lines, "environment:", "  type:")),
                  ("engine.name", has_nested_comment_before(lines, "engine:", "  name:")),
                  ("cases.files", has_nested_comment_before(lines, "cases:", "  files:")),
                  ("report.formats", has_nested_comment_before(lines, "report:", "  formats:")),
              ]
              if has_real_field(lines, "expect:"):
                  eval_checks.append(("expect", has_comment_before(lines, "expect:")))
              if has_real_field(lines, "judge:"):
                  eval_checks.append(("judge", has_comment_before(lines, "judge:")))
              for field, passed in eval_checks:
                  if not passed:
                      failures.append(f"evals/eval.yaml is missing a field-leading comment for {field}.")
          
          for path in case_files:
              lines = file_lines(path)
              case_checks = [
                  ("id", has_comment_before(lines, "id:")),
                  ("title", has_comment_before(lines, "title:")),
                  ("input.prompt", has_nested_comment_before(lines, "input:", "  prompt:")),
                  ("judge.type", has_nested_comment_before(lines, "judge:", "  type:")),
              ]
              if has_real_field(lines, "expect:"):
                  case_checks.append(("expect", has_comment_before(lines, "expect:")))
              for field, passed in case_checks:
                  if not passed:
                      failures.append(f"{path} is missing a field-leading comment for {field}.")
          
          if failures:
              print("English-only language check failed:")
              for failure in failures:
                  print(f"- {failure}")
              sys.exit(1)
          
          print("PASS: final response is English-like, generated YAML is English-only, and key fields have comments.")
          PY
          
      • skills
        • sample-no-evals
          • SKILL.md 774 B
            ---
            name: code-review-helper
            description: 帮助用户进行代码审查,识别常见代码问题并给出修改建议。
            ---
            
            # code-review-helper
            
            一个代码审查辅助 Skill,帮助开发者快速发现代码中的常见问题。
            
            ## 功能
            
            - 识别空指针风险、未处理异常、资源泄漏等常见问题
            - 检查代码风格与命名规范
            - 给出具有可操作性的修改建议
            
            ## 触发场景
            
            - 用户要求 "帮我 review 这段代码"
            - 用户提交了代码 diff 并想获得反馈
            - 用户想检查代码质量
            
            ## 使用方式
            
            直接将代码片段或 diff 发给 Agent,Skill 会自动分析并输出审查报告。
            
            ## 输出格式
            
            审查报告包含:
            1. 问题列表(严重程度 + 位置 + 描述)
            2. 修改建议
            3. 总结评价
            
        • sample-with-evals
          • evals
            • cases
              • add-todo.yaml 272 B
                id: add-todo
                title: 验证能否正确添加待办事项
                
                input:
                  prompt: |
                    帮我添加一个待办事项:明天下午3点开会
                
                expect:
                  must_contain:
                    - "待办"
                
                judge:
                  type: rule_based
                  success:
                    - output_contains:
                        all: ["待办", "添加"]
                
            • eval.yaml 255 B
              schema_version: v1alpha1
              
              environment:
                type: none
              
              skills:
                - source: local_path
                  path: .
              
              engine:
                name: claude_code
              
              cases:
                files:
                  - evals/cases/add-todo.yaml
                defaults:
                  timeout_seconds: 120
                  max_turns: 5
              
              report:
                formats: [json]
              
          • SKILL.md 611 B
            ---
            name: todo-manager
            description: 帮助用户管理待办事项,支持添加、删除、标记完成、列出任务等操作。
            ---
            
            # todo-manager
            
            一个轻量级的待办事项管理 Skill。
            
            ## 功能
            
            - 添加新的待办事项
            - 标记事项为已完成
            - 删除事项
            - 列出所有事项(支持按状态过滤)
            
            ## 触发场景
            
            - 用户说 "添加一个待办"、"我有个任务要记录"
            - 用户说 "完成了任务 X"、"删除任务 X"
            - 用户说 "看看我还有哪些待办"
            
            ## 脚本
            
            使用 `scripts/todo.py` 进行持久化操作,数据存储在工作区的 `todos.json` 中。
            
    • eval.yaml 827 B
      schema_version: v1alpha1
      
      environment:
        type: none
      
      skills:
        - source: local_path
          path: .
      
      engine:
        name: claude_code
      
      cases:
        files:
          - evals/cases/scaffold-new-evals.yaml
          - evals/cases/add-case-to-existing.yaml
          - evals/cases/scaffold-with-qodercli-engine.yaml
          - evals/cases/scaffold-with-script-judge.yaml
          - evals/cases/english-context-generates-english-only-cases.yaml
          - evals/cases/evolve-existing-skill.yaml
        defaults:
          # Budget sized to be engine-agnostic: claude_code finishes well under this,
          # but slower coding agents (codex on a coder model) need more wall-clock and
          # turns to complete the multi-file scaffolding cases. A timeout is a ceiling,
          # so raising it does not slow the fast engines.
          timeout_seconds: 600
          max_turns: 25
      
      report:
        formats: [json, html]
      
  • references
    • case-yaml.md 3.7 KB
      # case.yaml 字段参考(skill-up)
      
      每个 `evals/cases/*.yaml` 是一个评测用例。用例 ID = 文件名(去掉 `.yaml`)。语义与 skill-up 内置 schema 一致。
      
      ## 单轮用例骨架
      
      ```yaml
      id: find-null-bug
      title: 应该识别出空指针 bug
      description: 验证 Skill 能在代码审查中发现 null 解引用问题
      
      input:
        prompt: |
          Review the current diff and report findings.
      
      context:
        repo_fixture: fixtures/repos/null-check-bug
        git:
          init: true
          checkout: main
          apply_diff: fixtures/diffs/null-check.patch
      
      constraints:
        timeout_seconds: 180
        max_turns: 8
      
      expect:
        must_contain: ["null", "bug"]
        must_not_contain: ["LGTM"]
        exit_code: 0
      
      judge:
        type: rule_based
        success:
          - output_contains:
              all: ["null", "bug"]
          - exit_code: 0
      ```
      
      ## 多轮对话
      
      ```yaml
      input:
        turns:
          - role: user
            content: "sdd_bootstrap: task=实现用户登录功能"
            post_condition:
              must_contain_any: ["Research", "分析"]
              on_fail: skip_remaining      # 或 fail
            capture:
              - variable: phase
                pattern: "(?P<value>Research|Implementation)"
          - role: user
            content: "跳过 Research,直接帮我写代码"
      ```
      
      `post_condition`:每轮结束后检查输出。`on_fail: skip_remaining` 标为 SKIP,`fail` 直接 FAIL 整个用例。
      
      `capture`:从响应中捕获值,用于后续轮次的 `{{variable}}` 模板替换。
        • 提取器:`pattern`(正则)或 `jsonpath`,必须且仅指定一个
        • 优先使用 `(?P<value>...)` 命名组
        • 未匹配/空值 → 用例进入 ERROR 状态
        • 作用域仅限当前用例执行
      
      ### 按轮次 Judge 断言
      
      ```yaml
      judge:
        type: rule_based
        success:
          - turn_response_contains:
              turn: 2
              contains_any: ["必须完成", "不能跳过", "Research"]
          - turn_response_not_contains:
              turn: 2
              not_contains: ["LGTM"]
          - tool_called_in_turn:
              turn: 1
              name: write_file
          - tool_not_called_in_turn:
              turn: 2
              name: delete_file
      ```
      
      仅 `status=completed` 的轮次可被断言;引用不存在或未完成的轮次会导致断言失败。
      
      ## context — 初始化工作区
      
      ```yaml
      context:
        repo_fixture: fixtures/repos/my-project
        git:
          init: true
          checkout: feature-branch
          apply_diff: fixtures/diffs/my.patch
          remotes:
            - name: origin
              url: https://github.com/user/repo
        files:
          "src/main.py": |
            def hello():
                print("Hello World")
          "config.json": '{"debug": true}'
      ```
      
      ## expect — 零成本门槛检查
      
      ```yaml
      expect:
        must_contain:
          - "review"
          - "bug"
        must_not_contain:
          - "LGTM"
          - "error"
        exit_code: 0
        files_exist:
          - "review.md"
          - "output.json"
        files_not_exist:
          - "temp.log"
        file_contains:
          - path: "review.md"
            content: "security"
        golden_file: "expected.txt"
      ```
      
      expect 不通过时,judge 会被跳过。用它来快速过滤明显不合格的输出,节省 token。
      
      **与 `cases.defaults.expect` 合并:**
      
      - 如果 `eval.yaml` 的 `cases.defaults.expect` 定义了默认检查(如 `exit_code: 0`, `must_not_contain: ["TODO"]`),每个用例的 expect 会与之合并
      - 切片字段(`must_contain`, `must_not_contain`, `files_exist`, `files_not_exist`, `file_contains`)追加去重;标量字段(`exit_code`, `golden_file`)由用例覆盖
      - 用例未设 expect 时,直接使用默认值
      
      ## 常见写法
      
      - **纯文本路由 Skill**:`expect.must_contain` + `judge.rule_based.output_contains`
      - **MCP 工具校验**:`judge.rule_based.success[tool_called]`
      - **语义质量评估**:`judge.agent_judge.criteria`
      - **复杂结构化断言**:`judge.script`,在脚本里读 `$EVAL_TRANSCRIPT_PATH` 等自由判断
      
    • cli.md 8.2 KB
      # skill-up CLI 命令参考
      
      skill-up 提供以下命令,覆盖评测的完整生命周期:校验、运行、查看用例、生成报告和格式迁移。另含用户配置初始化与调试子命令。
      
      ---
      
      ## skill-up run
      
      运行评测用例,生成评估报告。
      
      ```bash
      skill-up run [path] [flags]
      ```
      
      ### 参数
      
      | 参数   | 说明                                                             |
      | ------ | ---------------------------------------------------------------- |
      | `path` | `eval.yaml` 的路径。省略时默认在当前目录下查找 `evals/eval.yaml` |
      
      ### Flags
      
      | Flag                  | 默认               | 说明                                                                                                                                                                              |
      | --------------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
      | `--auto`              | `false`            | 自动检测 `evals/` 目录,支持直接消费 Anthropic `evals.json`                                                                                                                       |
      | `--include-case-name` | —                  | 只运行匹配的用例(glob,可多次)                                                                                                                                                  |
      | `--exclude-case-name` | —                  | 排除匹配的用例(glob,可多次)                                                                                                                                                    |
      | `--format`            | —                  | 附加报告格式:`junit` / `html`(可多次)。`result.json` 始终写入;`--format junit` 生成 `report.xml`;`--format html` 生成 `report.html`;`--format json` 对 `result.json` 为冗余 |
      | `--output-dir`        | eval.yaml 同级目录 | 报告和产物的输出目录                                                                                                                                                              |
      | `--iteration`         | `0`(auto)        | 重复运行已选用例,用于稳定性/flaky 采样。`0` = 自动:在最后一个已有 `iteration-N/` 之后追加一轮,但不汇总历史结果;正整数 = 显式运行 N 次采样,产物写入 `iteration-1/` … `iteration-N/`;当 N > 1 时,终端摘要只覆盖本次命令执行的采样 |
      | `--engine`            | 配置中的值         | 覆盖 Engine 名称                                                                                                                                                                  |
      | `--runtime`           | 配置中的值         | 覆盖 `environment.type`(`none`、`opensandbox`、`docker`)                                                                                                                        |
      | `--model`             | 配置中的值         | 覆盖模型(格式:`provider/name`)                                                                                                                                                 |
      | `--parallelism`       | 配置中的值         | 覆盖 `cases.parallelism`,临时调整用例并行数,取值 1–256                                                                                                                          |
      | `--baseline`          | 配置中的值         | 为本次运行覆盖 `benchmark.enabled` 为 `true`                                                                                                                                      |
      | `--api-key`           | —                  | 传入 API Key(优先级高于环境变量)                                                                                                                                                |
      | `-v, --verbose`       | `0`                | 日志详细程度:`info` 默认;`-v` 为 `debug`;`-vv` / `--verbose=2` 为 `trace`                                                                                                      |
      
      ### 退出码
      
      - `0` — 所有用例通过
      - `1` — 有用例失败或执行出错
      
      可作为 CI 门禁。
      
      ### 典型用法
      
      ```bash
      skill-up run ./evals/eval.yaml
      skill-up run ./evals/eval.yaml --include-case-name "basic-*"
      skill-up run ./evals/eval.yaml --exclude-case-name "*-old"
      skill-up run ./evals/eval.yaml --engine codex --model openai/gpt-4
      skill-up run ./evals/eval.yaml --parallelism 4
      skill-up run ./evals/eval.yaml --baseline
      skill-up run ./evals/eval.yaml --format html --format junit
      skill-up run ./evals/eval.yaml --iteration 3
      # example terminal summary: case_a: 3 trials, 2 PASS, 1 FAIL -> flaky
      skill-up run ./evals/eval.yaml
      skill-up run --auto
      skill-up run ./my-skill/ --auto --engine codex
      ```
      
      ### OTLP Trace(可选)
      
      设置标准 OpenTelemetry 环境变量后,`skill-up run` 可经 OTLP 上报 trace;verbose 日志可带 `trace_id` / `span_id`。也可用 `skill-up init` 生成的用户配置填充默认 OTEL 相关环境变量。详见上游文档「User config」与「CLI 命令参考」中的 OTLP 小节。
      
      ---
      
      ## skill-up validate
      
      校验 `eval.yaml` 及引用的 case 文件。
      
      ```bash
      skill-up validate [path to eval.yaml]
      ```
      
      成功示例:
      
      ```plain
      ✓ eval.yaml is valid (loaded 3 case(s))
      ```
      
      ---
      
      ## skill-up list-cases
      
      列出配置中的全部用例。
      
      ```bash
      skill-up list-cases [path to eval.yaml]
      ```
      
      ---
      
      ## skill-up report
      
      从已有 `result.json` 重新生成报告,不重跑评测。
      
      ```bash
      skill-up report <path to result.json> [flags]
      ```
      
      | Flag           | 默认             | 说明                                |
      | -------------- | ---------------- | ----------------------------------- |
      | `--format`     | `json`           | `json` / `junit` / `html`(可多次) |
      | `--output-dir` | result.json 同级 | 输出目录                            |
      
      ```bash
      skill-up report result.json --format html
      skill-up report result.json --format json --format junit --format html --output-dir ./reports
      ```
      
      ---
      
      ## skill-up import
      
      将 Anthropic `evals.json` 转为 skill-up 原生 YAML。
      
      ```bash
      skill-up import <evals.json> [flags]
      ```
      
      | Flag       | 默认            | 说明     |
      | ---------- | --------------- | -------- |
      | `--output` | evals.json 同级 | 输出目录 |
      
      `import` 与 `run --auto` 的区别:`import` 是一次性格式转换;`run --auto` 运行时直接读 `evals.json`,不落 YAML。
      
      ---
      
      ## skill-up init
      
      将**用户配置模板**写到磁盘(Telemetry、默认 `runtime_kwargs` 等),与评测 `eval.yaml` 不同。
      
      ```bash
      skill-up init [flags]
      ```
      
      | Flag              | 说明                                             |
      | ----------------- | ------------------------------------------------ |
      | `--local`         | 写入 `$PWD/.skill-up.yaml`(与 `--config` 互斥) |
      | `--print`         | 打印模板到 stdout,不写文件                      |
      | `--force`         | 覆盖已存在文件                                   |
      | `--config <path>` | 显式目标路径(需与 `--local` 二选一)            |
      
      默认路径:`$XDG_CONFIG_HOME/skill-up/config.yaml` 或 `~/.config/skill-up/config.yaml`。发现链中还支持环境变量 `SKILL_UP_CONFIG` 指向用户配置文件。
      
      ---
      
      ## skill-up debug
      
      调试内部模块(仅开发 / 排错常用):
      
      ```bash
      skill-up debug judge <input.json>
      skill-up debug report <input.json>
      ```
      
      ---
      
      ## 产物目录结构
      
      ```plain
      <skill-name>-workspace/
        iteration-1/
          result.json
          benchmark.json
          report.html          # 若生成
          <case-id>/
            with_skill/
              outputs/
              grading.json
            without_skill/     # 仅 benchmark.enabled=true 时可能有
              outputs/
              grading.json
      ```
      
      ### grading.json(Anthropic 兼容子集)
      
      工作区内的 `grading.json` 通常只含 `expectations` 与 `summary`。完整状态见 `result.json` 的 `case_results[].grading`(`status`、`turns_executed`、`assertion_results` 等)。
      
      ### benchmark.json
      
      启用基线对比后会有 `without_skill` 与 `delta` 等字段。
      
    • eval-yaml.md 6.8 KB
      # eval.yaml 字段参考(skill-up)
      
      `eval.yaml` 是评测入口,声明「在什么环境、用什么 Engine、跑哪些用例、如何出报告」。内容对齐 [skill-up 用户手册 - 编写评测](https://alibaba.github.io/skill-up/zh/guide/writing-evals.html)。
      
      ## 完整字段骨架
      
      ```yaml
      schema_version: v1alpha1
      
      environment:
        type: none                      # none | opensandbox | docker
      
      mcp:
        servers:
          - name: github
            mode: real                  # real;mocked 预留
            transport: http             # http | stdio;可按 endpoint/command 推断
            config_ref: evals/fixtures/mcp/github.yaml
      
      skills:
        - source: local_path
          path: .
          include: [SKILL.md, "references/**", "scripts/**"]  # 可选;不配置表示全部文件
          exclude: [".qoder/repowiki/**"]                     # 可选;exclude 优先
      
      engine:
        name: claude_code               # claude_code | codex | qodercli(也兼容 qoder-cli)
        model:
          provider: anthropic
          name: claude-sonnet-4-6
          base_url: ""
      
      cases:
        files:
          - evals/cases/a.yaml
        defaults:
          timeout_seconds: 300
          max_turns: 12
          collect_artifacts:          # 可选:用 glob 采集 workspace 产物文件
            - "**/*.json"
            - "report/**"
          expect:                     # 可选:默认 expect 检查,应用于所有用例
            exit_code: 0
            must_not_contain:
              - "TODO"
              - "I cannot"
        parallelism: 2
        retry_policy:
          max_retries: 1
          retry_on: [timeout, error]
      
      judge:
        type: agent_judge
        model: anthropic/claude-sonnet-4-6
        skills:                         # 可选:仅安装给 judge agent 的评分 Skill
          - source: local_path
            path: evals/fixtures/judge-rubric
        criteria:
          - "按 judge-rubric 中的细则判断输出是否满足要求"
      
      benchmark:
        enabled: false
      
      report:
        formats: [json, html]
        artifacts: [transcript]
      ```
      
      `cases.parallelism` 可被 `skill-up run --parallelism N`(1–256)临时覆盖。
      临时启用基线对比时,可以使用 `skill-up run --baseline`,等价于为本次运行设置 `benchmark.enabled: true`。
      
      `collect_artifacts`(`cases.defaults` 级,或单个 `case.yaml` 内追加)用 [doublestar](https://github.com/bmatcuk/doublestar) glob(`*` 单层、`**` 跨目录)声明要采集的 workspace 文件。无论 Agent 成功/失败/超时,命中文件都会保留相对路径下载到 `<output-dir>/<case>/<config>/outputs/workspace/`。两层按并集去重合并。它与 `report.artifacts`(产物*类型*)、`agent_judge` 的 git diff(字符串)正交。
      
      `skills[].include` / `skills[].exclude` 同样使用 doublestar glob,路径相对
      `skills[].path` 且使用 `/` 分隔。`include` 为空时默认包含全部文件;
      `exclude` 后应用并优先。`evals/` 始终不会安装。显式配置 include 时要包含
      `SKILL.md`。`judge.skills` 也支持同样的过滤字段。
      
      `judge.skills` 仅支持 `judge.type: agent_judge`,用于给 judge agent 安装可复用的评分 Rubric Skill。它不会安装到主运行 agent;顶层 `skills` 也不会自动安装到 judge。benchmark 下 `with_skill` / `without_skill` 都会安装 judge Skills,因为它们属于评分工具。路径相对 Skill 根目录解析,安装依赖具体 Agent adapter 的原生 Skill 支持;不要把 Skill 文件内容复制进 `criteria`。
      
      ## 运行环境
      
      | type | 适用场景 | 说明 |
      | --- | --- | --- |
      | `none` | 纯文本 I/O、不强依赖沙箱 | 冷启动最快 |
      | `opensandbox` | 需要远程沙箱(文件、命令执行等) | 需 `OPENSANDBOX_API_KEY`;服务地址等可放在 `environment.kwargs` 或 `OPENSANDBOX_BASE_URL` |
      | `docker` | 本地容器隔离,无需远程服务 | 需本地 `docker` CLI 和 Docker daemon;镜像需提前拉取 |
      
      ### OpenSandbox 示例
      
      ```yaml
      environment:
        type: opensandbox
        image: registry.example.com/your-org/sandbox-base:latest
        workspace_mount: /workspace
        ready_timeout_seconds: 300
        kwargs:
          base_url: https://agent-sandbox.example.com
          extensions: '{"profile":"ci"}'
          request_timeout_seconds: "900"
          file_transfer_parallelism: "8"
      ```
      
      常用 `kwargs`:`base_url`、`extensions`(JSON 字符串)、`request_timeout_seconds`、`file_transfer_parallelism` 等。鉴权密钥来自环境变量 `OPENSANDBOX_API_KEY`。
      
      ### Docker 示例
      
      ```yaml
      environment:
        type: docker
        image: node:22                    # 必填,需提前 docker pull
        workspace_mount: /workspace       # 默认 /workspace
        env:
          NPM_CONFIG_REGISTRY: https://registry.npmmirror.com
        setup_steps:
          - run: npm install -g typescript
        entrypoint: ["sleep", "infinity"] # 默认 sleep infinity
      ```
      
      前置条件:本地 `docker` CLI 和 Docker daemon。`network_policy: deny_all` 以 `--network=none` 创建容器;`allow_declared` 暂不支持。
      
      
      ## MCP
      
      - `mode: real` 会把真实 MCP Server 装进 Agent。
      - HTTP MCP 可 inline 或 `config_ref` 指向 `evals/fixtures/mcp/*.yaml`。
      - stdio MCP 可配置 `command` / `args`。
      - 环境变量引用:`${VAR}` 或整值 `$VAR`;`required_env` 会注入 Agent 环境。
      - eval 级 `mcp` 是默认配置;用例可在 `cases/*.yaml` 里声明自己的 `mcp.servers`(MVP 仅 `mode: mocked`)按 `name` 整条覆盖同名 Server,从而在相同 Server/工具名下切换 mocked fixture。`config_ref` 仍相对 Skill 目录解析。
      
      ## Engine 与模型
      
      - `engine.model` 可选;省略时由引擎本地默认模型接管。
      - `provider` / `name` 组合在 CLI 中形如 `anthropic/claude-sonnet-4-6`、`openai/gpt-4` 等。
      - `qodercli` 通常无需配置 `model`。
      
      ### `engine.kwargs` —— agent 私有开关
      
      `engine.kwargs` 是字符串键值对,每个 agent 只读取自己关心的 key,未知 key 被忽略。无人认识的 key(拼写错误,如 `bypas_sandbox`)会在 verbose 日志里打 DEBUG,`-v` 可见。CLI 等价开关:`--engine-kwarg key=value`(别名 `--ek`),可重复。优先级 `--engine-kwarg` > `engine.kwargs` > 缺省。
      
      ```yaml
      engine:
        name: codex
        kwargs:
          bypass_sandbox: "true"
      ```
      
      | key | agent | true 时行为 | 缺省 / false |
      |---|---|---|---|
      | `bypass_sandbox` | `codex` | 命令行强制 `--dangerously-bypass-approvals-and-sandbox`,覆盖根据 runtime 自动决定的 sandbox flag。用于宿主内核不支持 Landlock 的场景(典型:部分 CI 容器) | 维持现状:`none` runtime 用 `--sandbox workspace-write`,其它 runtime 已是 bypass |
      | `bypass_sandbox` | `claude_code` | no-op(claude 现有命令已固定 `--permission-mode=bypassPermissions`) | no-op |
      | `bypass_sandbox` | `qodercli` | no-op(qoder CLI 无对应 flag) | no-op |
      
      ## 常见错误
      
      - `opensandbox` 但未配置鉴权或 `base_url` → 运行时失败
      - `engine.model` 与网关不匹配 → 连接报错
      - `cases.files` 路径不存在 → validate 失败
      - 所有相对路径相对于 **Skill 根目录**(`SKILL.md` 所在目录)
      
    • install.md 2 KB
      # 安装 / 升级 / 排错
      
      `skill-up` 以预编译单二进制发布在 [GitHub Releases](https://github.com/alibaba/skill-up/releases),无运行时依赖(不需要 Go、Python、Node 等即可使用官方安装脚本)。
      
      > **平台**:仅支持 **macOS / Linux**,暂不支持 Windows。
      
      ## 官方安装脚本(macOS / Linux)
      
      ```bash
      curl -fsSL https://raw.githubusercontent.com/alibaba/skill-up/main/install.sh | bash
      ```
      
      脚本行为概要:
      
      - 识别 OS(darwin / linux)与架构(amd64 / arm64)
      - 从 GitHub Releases 下载对应压缩包与校验文件
      - 默认安装到 `~/.local/bin/skill-up`
      - 可用 `sha256sum` / `shasum` 校验(若本机有相应工具)
      
      ### 版本与安装目录
      
      ```bash
      # 固定版本(可为 vX.Y.Z 或 X.Y.Z,脚本会规范化为带 v 的 tag)
      export SKILL_UP_VERSION=v0.1.0
      curl -fsSL https://raw.githubusercontent.com/alibaba/skill-up/main/install.sh | bash
      
      # 自定义目录
      export INSTALL_DIR="$HOME/bin"
      curl -fsSL https://raw.githubusercontent.com/alibaba/skill-up/main/install.sh | bash
      ```
      
      ## 验证安装
      
      ```bash
      skill-up --version
      skill-up --help
      ```
      
      ## 升级
      
      再次执行安装脚本即可覆盖旧二进制(可先设 `SKILL_UP_VERSION` 锁定版本)。
      
      ## 排错
      
      ### `command not found: skill-up`
      
      通常是 `~/.local/bin` 不在 `PATH`。
      
      **macOS(zsh)**:
      
      ```bash
      echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
      source ~/.zshrc
      ```
      
      **Linux(bash)**:
      
      ```bash
      echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
      source ~/.bashrc
      ```
      
      ### 下载失败 / 网络受限
      
      - 配置代理:`export HTTPS_PROXY=http://your-proxy:port`
      - 或从 [Releases](https://github.com/alibaba/skill-up/releases) 手动下载对应 `skill-up_*_*.tar.gz` 与 `checksums.txt`,解压后将二进制放到 PATH 内并 `chmod +x`
      
      ### macOS "无法验证开发者"
      
      ```bash
      xattr -d com.apple.quarantine "$(which skill-up)"
      ```
      
      或在「系统设置 → 隐私与安全性」中允许。
      
      ### 从源码构建
      
      已与仓库 schema 一致,适合开发:
      
      ```bash
      make build
      ```
      
      
    • judge-types.md 3 KB
      # Judge 类型选型与写法(skill-up)
      
      skill-up 的评估分两层:`expect`(零成本门槛) + `judge`(质量评估)。expect 不过 judge 就跳过,所以能用 expect 先过滤的尽量用 expect。
      
      每个用例只能选**一种** judge 类型。
      
      ## 选型决策树
      
      1. 有明确关键词 / 文件 / 退出码 / 工具调用可判定?→ **rule_based**
      2. 有结构化输出,想写自定义脚本检查?→ **script**
      3. 以上都不行,要 LLM 做语义判断?→ **agent_judge**(最贵,慎用)
      
      ## rule_based — 确定性规则
      
      ```yaml
      judge:
        type: rule_based
        success:
          - output_contains:
              all: ["bug", "null"]
              any: ["建议修复", "推荐更改"]
              not: ["LGTM"]
          - output_matches:
              all: ["(?m)^## Status$", "(?m)^## Evidence$"]
              any: ["(?i)pass", "(?i)success"]
              not: ["(?i)api[_-]?key\\s*="]
          - exit_code: 0
          - tool_called:
              name: "github::create_pull_request"
              args:
                title: "Fix null check"
        failure:
          - output_contains:
              any: ["无需修改", "代码正确"]
      ```
      
      评估逻辑:`failure` 优先,任一条命中立即 FAIL;否则所有 `success` 必须满足才 PASS。
      
      **支持的匹配器**:
      
      - `output_contains`
      - `output_matches`(Go regexp,支持 `all` / `any` / `not`)
      - `exit_code`
      - `tool_called`
      - `files_exist` / `files_not_exist`
      
      ## agent_judge — LLM 评审
      
      ```yaml
      judge:
        type: agent_judge
        model: anthropic/claude-sonnet-4-6
        skills:
          - source: local_path
            path: evals/fixtures/judge-rubric
            include: [SKILL.md, "references/**"]
            exclude: ["references/drafts/**"]
        criteria:
          - "输出中识别了真实存在的 bug,并符合 judge-rubric 中的评分细则"
          - "没有将正确代码误报为 bug"
          - "建议具有可操作性,不是泛泛而谈"
        pass_threshold: 0.7
      ```
      
      **注意事项**:
      
      - 会额外消耗 token,慢且贵
      - criteria 尽量具体、可验证
      - 能拆出确定性条件时先用 `rule_based` / `expect` 挡一道
      - 需要长 Rubric、领域规则、复用评分规范时,把它们放进 `judge.skills`
      - `judge.skills` 只会安装给 judge agent,不会污染被测 run agent;安装依赖具体 Agent adapter 的 Skill 支持,不会回退为 prompt 拼接
      - `judge.skills[].include` / `exclude` 与顶层 `skills` 语义一致:相对 `path` 的 doublestar glob,且 exclude 优先
      
      ## script — 自定义脚本
      
      ```yaml
      judge:
        type: script
        script_path: evals/fixtures/scripts/check-quality.sh
        timeout_seconds: 30
      ```
      
      **脚本约定**:
      
      - 退出码 `0` = PASS,非 `0` = FAIL
      - 工作目录是用例工作区根目录
      - 环境变量:`$EVAL_FINAL_MESSAGE`、`$EVAL_EXIT_CODE`、`$EVAL_TRANSCRIPT_PATH`(若可用)
      
      ## 成本提醒
      
      | judge | 相对成本 | 何时选 |
      | --- | --- | --- |
      | expect | 0 | 任何时候先挡一道 |
      | rule_based | 极低 | 默认首选 |
      | script | 低(取决于脚本) | 灵活自定义 |
      | agent_judge | 高 | 真的需要语义理解 |
      
    • migrate-anthropic.md 1.9 KB
      # 从 Anthropic evals.json 迁移(skill-up)
      
      若使用 Anthropic skill-creator 生成过 Skill,目录下可能有 `evals/evals.json`。skill-up 可以直接消费它,也可一次性转成原生 YAML。
      
      ## 方式一:`--auto` 直接跑(零配置)
      
      ```bash
      cd my-skill/
      skill-up run --auto
      skill-up run ./my-skill/ --auto
      skill-up run --auto --engine codex
      ```
      
      **适用**:快速 CI 回归、多 Engine 验证、与 Anthropic evals 源文件保持同步。
      
      **限制**:
      
      - 不支持多轮对话
      - `expectations` 往往映射为 `agent_judge.criteria`,消耗评审 token
      - 不便在 `--auto` 路径上叠加复杂 `opensandbox` / MCP / 强 `expect` 门槛(需转 YAML 后编辑)
      
      ## 方式二:`import` 转原生 yaml(深度定制)
      
      ```bash
      skill-up import ./evals/evals.json
      skill-up import ./evals/evals.json --output ./evals-v2
      ```
      
      生成 `eval.yaml` + `cases/*.yaml` 后,你可以:
      
      - 添加 `expect` 确定性门槛
      - 使用 `rule_based` / `script` 替代或补充 LLM 评判
      - 配置多轮 `turns`
      - 配置 `environment.type: opensandbox`、MCP 等
      
      ## 对比
      
      | | `--auto` | `import` |
      | --- | --- | --- |
      | 操作 | 运行时读取 | 一次性落盘 YAML |
      | 同步 | evals.json 更新即生效 | 之后独立维护 YAML |
      | 定制 | 受限于 JSON | 完全可控 |
      
      > 可先用 `--auto` 跑通,再对重试用例 `import` 手改。
      
      ## evals.json 映射(摘要)
      
      | evals.json | skill-up YAML |
      | --- | --- |
      | `prompt` | `input.prompt` |
      | `expectations` | 默认 `judge.agent_judge.criteria` |
      | `expected_output` | 常为 `description` |
      | `files` | `context.files` 等 |
      
      ## 推荐路径
      
      1. `skill-up run --auto` 验证可走通  
      2. `skill-up import ./evals/evals.json --output ./evals-native`  
      3. 编辑 YAML:补 `expect`、`rule_based`、`opensandbox` / MCP  
      4. `skill-up run ./evals-native/eval.yaml`
      
      Ideal:Anthropic 迭代 Skill → skill-up `--auto` 进 CI → 深度场景转 YAML 长期维护。
      
  • README.md 919 B
    # skill-upper
    
    An Agent Skill that helps you evaluate and evolve other Agent Skills using the
    `skill-up` CLI.
    
    ## What it does
    
    `skill-upper` guides you through an evaluation-to-evolution loop:
    
    - **Locate** the target Skill and understand its capabilities
    - **Scaffold** `evals/eval.yaml` and `evals/cases/*.yaml` with proper judge types
    - **Validate** configuration before running
    - **Run** evaluations against real Agent Engines (Claude Code, Codex, qodercli, etc.)
    - **Diagnose** failures from structured reports and output evidence
    - **Evolve** the Skill or strengthen eval coverage, then rerun the suite
    
    ## When to use
    
    - You want to evaluate, test, or regress a Skill
    - You want to fix or iterate a Skill from eval failures
    - You need to write `eval.yaml` / `case.yaml` or choose a judge type
    - You're running `skill-up run/validate/list-cases/report/import/init`
    - You're migrating from Anthropic `evals.json`
    
  • README.zh.md 944 B
    # skill-upper
    
    一个帮助你使用 `skill-up` CLI 评测并持续演进其他 Agent Skill 的 Agent Skill。
    
    ## 功能概述
    
    `skill-upper` 引导你完成从评测到演进的闭环:
    
    - **定位** 目标 Skill,理解其能力边界
    - **搭建** `evals/eval.yaml` 和 `evals/cases/*.yaml` 脚手架,选择合适的 judge 类型
    - **校验** 配置,在运行前发现 schema 错误
    - **运行** 评测,调用真实 Agent Engine(Claude Code、Codex、qodercli 等)
    - **诊断** 结构化报告和输出证据中的失败原因
    - **演进** 修复目标 Skill 或增强 eval 覆盖,然后重新运行评测
    
    ## 使用场景
    
    - 需要对某个 Skill 进行评测、测试或回归验证
    - 需要根据评测失败修复并持续迭代某个 Skill
    - 需要编写 `eval.yaml` / `case.yaml` 或选择 judge 类型
    - 运行 `skill-up run/validate/list-cases/report/import/init`
    - 从 Anthropic `evals.json` 迁移到 skill-up 格式
    
  • SKILL.md 13.3 KB
    ---
    name: skill-upper
    description: "Create, run, diagnose, and iteratively improve Agent Skill evaluations (evals) with the skill-up CLI / 使用 skill-up CLI 创建、运行、诊断并持续改进 Agent Skill 评测. Use when the user asks to evaluate, test, regress, verify, fix, improve, iterate, or evolve a Skill; add or strengthen eval cases; write eval.yaml/case.yaml; run skill-up run/validate/list-cases/report/import/init; or migrate from Anthropic evals.json. Handles Skill discovery, eval scaffolding, judge authoring, validation, runs, reports, and evidence-based repair loops."
    ---
    
    # use-skill-up-cli
    
    Help the user evaluate and evolve Agent Skills through the `skill-up` CLI.
    
    Manual: <https://alibaba.github.io/skill-up/>
    
    ## Language Policy
    
    **Default to English when responding to the user. If the user writes in Chinese (or any other language), switch to that language and stay consistent with the user's input throughout the session.**
    
    Detection rules (highest priority first):
    
    1. The user explicitly specifies a language in the current message (e.g. "answer in English" / "用中文回答") → follow the user's instruction.
    2. The natural language used in the user's current message → match it.
    3. None of the above → use English (default).
    
    Regardless of the response language, technical identifiers in this SKILL — CLI commands, `eval.yaml` / `case.yaml` field names, report field names, etc. — MUST stay in their original English form. Do not translate them.
    
    ### Language Rules for Generated Artifacts
    
    When creating or editing `eval.yaml`, `case.yaml`, grading scripts, README snippets, final replies, or any other user-visible artifact, treat the language of the user's current message as the output language for this turn:
    
    - If the user asks in Chinese, write the final response and all generated natural-language content in Chinese, including YAML comments, `title`, `description`, `input.prompt`, `expect` keywords, and `judge.criteria`.
    - If the user asks in English, write the final response and all generated natural-language content in English, including YAML comments, `title`, `description`, `input.prompt`, `expect` keywords, and `judge.criteria`; do not leave Chinese or CJK characters in generated case files.
    - If the target Skill itself is written in Chinese but the user asks in English, translate the Skill's functional intent into English test prompts and assertions instead of copying Chinese prose from the target Skill or templates.
    - In an English context, deterministic keywords in `rule_based` cases, including `expect.must_contain` and `judge.success.output_contains`, must also be English keywords. Translate terms such as `资源泄漏`, `关闭`, and `异常处理` into `resource leak`, `close`, and `exception handling`; do not write bilingual parentheticals like `"资源" (resources)`.
    - Keep technical identifiers unchanged, such as `schema_version`, `environment.type`, `engine.name`, `rule_based`, `agent_judge`, `script_path`, file paths, and commands.
    - Generated YAML comments must use field-leading comments. Keep each comment short: one line for field meaning, plus one line for options only when useful.
    - When listing options in comments, keep enum values unchanged, such as `none | opensandbox | docker` and `rule_based | agent_judge | script`.
    - Treat `assets/*.tmpl` as structural references only. Rewrite placeholder prose and comments into the current output language; in an English context, translate or remove every Chinese comment and Chinese placeholder before writing generated files.
    - `skill-up import` uses the CLI conversion path and does not preserve template comments; do not promise commented YAML for import-generated files.
    - In an English context, after generating all files but BEFORE submitting the final reply, you **MUST perform a CJK self-check**: open every `evals/cases/*.yaml` and `evals/eval.yaml` and scan for CJK characters (Unicode ranges `\u4e00-\u9fff\u3400-\u4dbf\uf900-\ufaff\u3000-\u303f\uff00-\uffef`), including but not limited to `title`, `description`, `input.prompt`, `expect` keywords, `judge.criteria`, and YAML comments. If any CJK character is found, **replace it with an equivalent English expression before finishing the task**. This step is mandatory and must not be skipped.
    
    ## What is skill-up
    
    `skill-up` is an evaluation CLI for Agent Skill authors. It installs the Skill into a real Agent Engine (Claude Code, Codex, qodercli, etc.), spins up an execution environment for each case, runs the prompt, then grades the result via declared rules / LLM judges / custom scripts, and finally produces a report.
    
    Typical layout:
    
    ```
    my-skill/
      SKILL.md
      evals/
        eval.yaml
        cases/
          <case-id>.yaml
        fixtures/
    ```
    
    ## When to trigger
    
    Use this skill in any of the following situations:
    
    - The user asks to "run / evaluate / verify / test this skill".
    - The user asks to "fix / improve / iterate / evolve this skill" from eval failures.
    - The user wants to "add evals, test cases, or regression cases to a skill".
    - The user wants to edit `eval.yaml` / `case.yaml`, or asks you to choose an appropriate `judge` type.
    - The user mentions `skill-up run/validate/list-cases/report/import/init`.
    - The user wants to migrate from Anthropic `evals.json` to skill-up.
    - The current working directory contains `evals/eval.yaml` or `evals/evals.json` and the user wants to run it.
    
    ## Main flow (follow this order strictly)
    
    ### Step 0: Make sure skill-up is installed
    
    Before doing anything, verify `skill-up` is available:
    
    ```bash
    command -v skill-up && skill-up --version
    ```
    
    If a version is printed, continue. If you see `command not found`, on **macOS / Linux**:
    
    ```bash
    curl -fsSL https://raw.githubusercontent.com/alibaba/skill-up/main/install.sh | bash
    
    export SKILL_UP_VERSION=v0.1.0
    curl -fsSL https://raw.githubusercontent.com/alibaba/skill-up/main/install.sh | bash
    
    export INSTALL_DIR="$HOME/bin"
    curl -fsSL https://raw.githubusercontent.com/alibaba/skill-up/main/install.sh | bash
    ```
    
    > **Platform:** `skill-up` currently supports **macOS / Linux** only; Windows is not supported.
    
    After installing, run `skill-up --version` again. If the command is still missing, add `~/.local/bin` to `PATH`.
    
    More details: `references/install.md`.
    
    ### Step 0.5 (optional): User config and telemetry
    
    For OTLP defaults, `runtime_kwargs` (e.g. OpenSandbox `base_url`), etc.:
    
    ```bash
    skill-up init
    skill-up init --local
    skill-up init --print
    skill-up init --force
    ```
    
    Precedence (low → high): embedded empty defaults < user config < project `.skill-up.yaml` < `--config`. `SKILL_UP_CONFIG` can point at the user config file (env var name is historical). See the upstream README "User config".
    
    ### Step 1: Locate the target Skill
    
    1. Identify the root directory of the target Skill (the directory containing `SKILL.md`). Search in this priority: user path → nearest `SKILL.md` upward from CWD → recently viewed files.
    2. Read the target `SKILL.md` for scope, triggers, and dependencies. If the Skill is Chinese but the user writes in English, translate capabilities into English for prompts and assertions.
    3. Check `evals/`:
       - `evals/eval.yaml` exists → Step 4 (optionally Step 3).
       - Only `evals/evals.json` → `references/migrate-anthropic.md` (`skill-up run --auto` or `skill-up import`).
       - Nothing → Step 2.
    
    ### Step 2: Scaffold the evals (only when none exist)
    
    - Copy `assets/eval.yaml.tmpl` to `<skill-root>/evals/eval.yaml`.
    - Copy `assets/case.yaml.tmpl` to `<skill-root>/evals/cases/<case-id>.yaml`.
    
    Adapt language per "Language Rules for Generated Artifacts". In an English context, it is **prohibited** to copy Chinese placeholder text from the templates into generated files — all prose must be rewritten in English. The Chinese in the templates is for structural reference only, not to be carried over.
    Preserve short field-leading comments in generated YAML. In Chinese context, rewrite those comments into Chinese while keeping field names and enum values in English.
    
    Selection guidelines:
    
    - `environment.type`: use `none` for pure-text Skills; use `opensandbox` when you need a remote sandbox (set `OPENSANDBOX_API_KEY`, put non-secrets in `environment.kwargs`).
    - `engine.name` + `engine.model`: default `claude_code`; `model` is optional. For `qodercli`, often omit `model`.
    - `judge.type`: `rule_based` (preferred), `script`, `agent_judge` (expensive) — see `references/judge-types.md`.
    - Case ID = filename without `.yaml`; prompts should exercise real Skill value.
    
    See `references/eval-yaml.md` and `references/case-yaml.md`.
    
    ### Step 3: Fill the gaps (when evals already exist)
    
    - `skill-up list-cases <path>`
    - Review `eval.yaml` and representative cases; avoid `agent_judge` abuse.
    - Add or edit YAML under `cases/` as needed.
    
    ### Step 4: Validate the configuration
    
    ```bash
    skill-up validate <skill-root>/evals/eval.yaml
    ```
    
    Expect: `✓ eval.yaml is valid (loaded N case(s))`.
    
    ### Step 5: Prepare credentials
    
    Priority: `--api-key` > env (`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `QODER_PERSONAL_ACCESS_TOKEN`) > `~/.skill-up/credentials.yaml`.
    
    ```bash
    printenv | grep -E 'ANTHROPIC_API_KEY|OPENAI_API_KEY|QODER_PERSONAL_ACCESS_TOKEN'
    ```
    
    If missing, **stop and ask**; do not write secrets into YAML without consent.
    
    For `opensandbox`, also ensure `OPENSANDBOX_API_KEY` (and related env) as needed.
    
    ### Step 6: Run the evaluation
    
    ```bash
    skill-up run <skill-root>/evals/eval.yaml
    ```
    
    | Scenario                         | Command                               |
    | -------------------------------- | ------------------------------------- |
    | Subset                           | `--include-case-name "basic-*"`       |
    | Exclude                          | `--exclude-case-name "*-flaky"`       |
    | HTML report                      | `--format html`                       |
    | Engine override                  | `--engine codex --model openai/gpt-4` |
    | Parallelism                      | `--parallelism 4` (1–256)             |
    | Anthropic JSON                   | `--auto`                              |
    | Stability/flakiness sampling     | `--iteration 3`                       |
    | Auto-append after last iteration | `--iteration 0` (default behavior)    |
    | Verbose                          | `-v`, `-vv`                           |
    
    Exit `0` = all passed; `1` = failure or error — suitable for CI. When
    an explicit positive `--iteration N` runs more than one sample, inspect the
    terminal's simple current-command summary for lines like
    `case_a: 3 trials, 2 PASS, 1 FAIL -> flaky`.
    
    ### Step 7: Interpret the report
    
    Artifacts under `<skill-root>/<skill-name>-workspace/iteration-N/`:
    
    - `result.json`, `benchmark.json`, optional `report.html`
    - `<case-id>/with_skill/grading.json`, `outputs/`
    
    Summarize: pass rate and timing; for failures, case id, assertion `text`, and `evidence`; benchmark deltas if enabled; offer HTML path or `skill-up report result.json --format html`.
    
    ### Step 8: Evolve the Skill when requested
    
    Only enter this loop when the user asks to fix, improve, iterate, or evolve the
    target Skill. If the user only asks to evaluate or report results, stop after
    Step 7 without modifying it.
    
    1. Diagnose failures from `result.json`, `grading.json`, and output evidence.
    2. Fix `SKILL.md` or supporting files when the Skill behavior is incorrect.
    3. Add or refine eval cases when coverage is missing.
    4. Do not weaken valid assertions merely to make a failure pass.
    5. Rerun failed cases first, then run the full eval suite.
    6. Continue until the evals pass or clearly report what remains blocked.
    
    ## Command quick reference
    
    | Command                                       | Purpose                           |
    | --------------------------------------------- | --------------------------------- |
    | `skill-up validate <eval.yaml>`               | Validate before `run`.            |
    | `skill-up list-cases <eval.yaml>`             | List cases.                       |
    | `skill-up run [eval.yaml]`                    | Run evals.                        |
    | `skill-up run --auto`                         | Run from `evals/evals.json`.      |
    | `skill-up report <result.json> --format html` | Re-render reports.                |
    | `skill-up import <evals.json>`                | Convert Anthropic format to YAML. |
    | `skill-up init`                               | Write user-config template.       |
    | `skill-up debug judge <input.json>`           | Debug judge.                      |
    | `skill-up debug report <input.json>`          | Debug report.                     |
    
    Full flags: `references/cli.md`.
    
    ## Common pitfalls
    
    - Model IDs vs proxy aliases — preserve what works for the user's `base_url`.
    - `opensandbox` without `OPENSANDBOX_API_KEY` — auth failures.
    - Chinese `expect.must_contain` vs English model output — align language in prompts/assertions.
    - Abusing `agent_judge`.
    - Anthropic `evals.json` expectations → default `agent_judge`; use `import` + hand edits for deterministic checks.
    - Paths relative to Skill root (`SKILL.md` directory).
    - `--iteration 0` appends one run after the latest existing iteration without
      summarizing history; positive `--iteration N` runs N samples of the selected
      cases and, when N > 1, prints a simple stability/flakiness summary covering
      only samples from the current command.
    
    ## References
    
    - `references/install.md`
    - `references/eval-yaml.md`
    - `references/case-yaml.md`
    - `references/judge-types.md`
    - `references/cli.md`
    - `references/migrate-anthropic.md`
    - `assets/eval.yaml.tmpl`, `assets/case.yaml.tmpl`
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related