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;
Install
npx skills add https://github.com/alibaba/skill-up/tree/main/skills/skill-upper
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install alibaba-skill-up@llmmart
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.
The canonical Skill instructions and references are in English. A localized overview is available in README.zh.md.
What it does
skill-upper guides you through an evaluation-to-evolution loop:
- Locate the target Skill and understand its capabilities
- Scaffold
evals/eval.yamlandevals/cases/*.yamlwith proper judge types - Simulate responsive user turns with an independent model, alongside fixed turns or across an autonomous conversation
- Validate configuration before running
- Run evaluations against real Agent Engines (Claude Code, Codex, qodercli, etc.)
- Diagnose failures from structured reports and output evidence
- Capture explicitly attributed Skill usage, evidence, and feedback through the Codex or DSH observer integration
- Review locally captured Skill observations and turn approved feedback into regression cases
- Evolve the Skill or strengthen eval coverage, then rerun the suite
Observation capture and review support Codex and observer-enabled DSH. Claude
Code, qodercli, Qwen Code, and other Agent Engines remain available for ordinary
skill-up evaluation runs, but are not supported by the observation workflow.
When to use
- You want to evaluate, test, or regress a Skill
- You want to fix or iterate a Skill from eval failures
- You want to capture explicitly attributed Skill usage or feedback
- You want to review a captured observation or convert approved feedback into a regression case
- You need to write
eval.yaml/case.yamlor choose a judge type - You're running
skill-up run/validate/list-cases/report/import/init - You're migrating from Anthropic
evals.json
User simulator scaffolding regression
evals/eval-dashscope.yaml runs only scaffold-with-user-simulator with local
OpenCode and DashScope qwen3.8-max as both the tested agent and the configured
judge. The case checks independent simulator configuration, mixed fixed and
simulated turns, and an autonomous case with a bounded turn count. It passed
with OpenCode 1.14.24; all five judge criteria and the file-existence check passed.
The generated YAML was also independently validated with skill-up validate.
The original Claude-based seven-case suite was not run in this verification.
Supply DASHSCOPE_API_KEY through your secret manager and install OpenCode.
From the repository root:
make build
PATH="$PWD/bin:$PATH" ./bin/skill-up run ./skills/skill-upper/evals/eval-dashscope.yaml
The credential-gated TestSkillUpper_UserSimulator_DashScope E2E uses this
configuration and runs in the manually dispatched full-mode model E2E suite.
This case generates configuration and runs validation; its test-model is a
placeholder. Actual simulator calls are covered separately by
the user simulator example.
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):
- The user explicitly specifies a language in the current message (e.g. "answer in English" or "reply in Chinese") → follow the user's instruction.
- The natural language used in the user's current message → match it.
- 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
Use the user's current language for replies, newly authored explanatory prose, and YAML comments. Preserve the language and semantics of test inputs, expected output literals, identifiers, commands, paths, and existing regression cases. Do not translate a deterministic assertion merely because the conversation language changed. When testing localized behavior, keep the original business text even in an English conversation.
Treat assets/*.tmpl as structural references: adapt placeholder prose and
comments to the requested language. Review only files created or changed for
this task; never rewrite unrelated cases to enforce a language preference.
Use short field-leading comments for generated YAML. Explain actual configured
fields: schema_version, environment.type, engine.name, cases.files, and
report.formats in eval.yaml; id, title, input.prompt, and judge.type in
case YAML. For nested fields, place the comment inside the parent mapping
immediately before the child field, rather than only before the parent.
For example, comment both prompt and type at their own indentation:
input:
# User request sent to the agent.
prompt: Review this code.
# Cheap prerequisites checked before the judge.
expect:
must_contain: ["suggestion"]
judge:
# Deterministic grading strategy for this case.
type: rule_based
Comment expect and a top-level judge when present; do not add an
optional field just to satisfy a comment check. Keep field names and enum values
unchanged. skill-up import does not preserve template comments.
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 asks to record explicitly attributed Skill usage, evidence, or feedback.
- The user wants to review captured Skill observations or turn approved feedback into a regression case.
- The user wants to edit
eval.yaml/case.yaml, or asks you to choose an appropriatejudgetype. - The user mentions
skill-up run/validate/list-cases/report/import/init. - The user wants to migrate from Anthropic
evals.jsonto skill-up. - The current working directory contains
evals/eval.yamlorevals/evals.jsonand the user wants to run it.
Choose the requested workflow
- Diagnose or plan: read the target Skill and supplied evidence, identify concrete problems, and propose changes or cases. Do not install tools, create eval files, change configuration, or run evaluations unless requested.
- Create or edit cases: use Steps 1–4 to create or update the suite and validate its configuration. Stop before credentials and execution unless the user also requests a run. Report the actual config/case paths and validation status in the final reply.
- Evaluate: follow Steps 0–7 for the requested suite; report failures without automatically editing the Skill.
- Improve: follow the evaluation workflow and Step 8 within the requested scope. Preserve valid existing cases and assertions.
Evaluation workflow
Observation capture mode (optional)
Use this mode when the user asks to record the current Skill interaction or
feedback and observation tools are available. It requires either a current
Codex release with the codex-skill-up plugin and lifecycle-hook support, or DSH with
the skill-up plugin's observer explicitly enabled. Do not retrofit observation
capture onto the pinned Codex 0.80.0 evaluation adapter.
If the user asks how to install either host plugin, or the required observation
tools are missing and the user asks to enable them, read
references/install.md under "Install an observation host plugin (optional)". Do not
install or enable a plugin unless the user asks.
Claude Code, qodercli, Qwen Code, and other Agent Engines are not supported for
this observation workflow. This restriction does not apply to normal skill-up
evaluation runs, which remain multi-engine.
- Attribute the interaction only when the user explicitly references a Skill
(for example,
$my-skill) or the responsible Skill is otherwise known with certainty. - In Codex, if explicit attribution is absent but certain, call
mark_skill_invocationonce with the Skill name and optional version. DSH derives exact attribution from its durable/skillinjection or successfulskilltool result; do not add inferred attribution. - In Codex, use
attach_skill_evidenceonly for references that help reproduce or evaluate the behavior. Prefer paths and short summaries over copied file contents. - In Codex, use
record_skill_feedbackduring the observed turn. In DSH, the observer stores the next user turn in the same session as an unclassified follow-up candidate. For explicit feedback, userecord_observation_feedbackwith the completed observation's ID. Never invent sentiment or comments.
Both adapters redact common credential shapes before local persistence, but still avoid sending secrets to marker tools. If the request is capture-only, stop after recording it; do not edit, evaluate, commit, or publish a Skill unless the user also asks for that work.
Observation input mode (optional)
When the request starts from a captured Skill observation, read
references/observations.md first. Use the available observation tools to
inspect and preview the observation, require explicit approval for the exact
candidate, write it only after approval, and then continue at Step 4. If the
request does not start from an observation, use the normal flow below.
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-upcurrently 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, including optional Codex and DSH observation host plugins:
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
- Identify the root directory of the target Skill (the directory containing
SKILL.md). Search in this priority: user path → nearestSKILL.mdupward from CWD → recently viewed files. - Read the target
SKILL.mdfor scope, triggers, and dependencies. Preserve localized behavior and expected literals when designing cases. - Check
evals/:evals/eval.yamlexists → Step 4 (optionally Step 3).- Only
evals/evals.json→references/migrate-anthropic.md(skill-up run --autoorskill-up import). - Nothing → Step 2.
Step 2: Scaffold the evals (only when none exist)
- Copy
assets/eval.yaml.tmplto<skill-root>/evals/eval.yaml. - Copy
assets/case.yaml.tmplto<skill-root>/evals/cases/<case-id>.yaml.
Start with the smallest complete scaffold requested by the user. Unless they
request broader coverage, create one representative case; add more only for
distinct requirements. For a script judge, implement the required output
contract in a short script and reuse it across cases with the same contract.
Do not build a general report parser or an extensive script test matrix as part
of scaffolding. For a JSON-only contract, use json.loads and explicit field
checks; support prose or Markdown wrappers only when the contract allows them.
Adapt language per "Language Rules for Generated Artifacts". Replace the templates' generic English placeholders with case-specific prose in the requested output language. Preserve short field-leading comments in generated YAML; translate them when the output language differs from English, while keeping field names and enum values in English.
Selection guidelines:
environment.type: usenonefor pure-text Skills; useopensandboxwhen you need a remote sandbox (setOPENSANDBOX_API_KEY, put non-secrets inenvironment.kwargs).engine.name+engine.model: defaultclaude_code;modelis optional. Forqodercli, often omitmodel.judge.type:rule_based(preferred),script,agent_judge(expensive) — seereferences/judge-types.md.- Case ID = filename without
.yaml; prompts should exercise real Skill value. - For interactive cases, preserve fixed
input.turns[].contentwhere the user message is known. Useinput.turns[].respondonly for a reply that must react to the agent, orinput.promptplus case-leveluser_simulator.scenariowhen the simulator should choose all later replies and when to stop. Set an independent eval-leveluser_simulatormodel and a boundedmax_turns; see both YAML references. Do not reuseengine.modelorjudge.modelas an implicit simulator model.
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.yamland representative cases; avoidagent_judgeabuse. - Add or edit YAML under
cases/as needed. - For byte-for-byte preservation checks, compare
sha256sum <file>(orshasum -a 256 <file>) before and after editing, within the user's allowed command profile. - If adding simulated user turns, check that the selected engine supports session resumption, configure the separate simulator connection, and retain deterministic fixed turns and judge assertions wherever possible.
Step 4: Validate the configuration
skill-up validate <skill-root>/evals/eval.yaml
Expect: ✓ eval.yaml is valid (loaded N case(s)).
For a case-authoring request, finish here with the config and case paths plus
validation status. Do not start a background evaluation as part of scaffolding.
Before replying, reopen the generated YAML and check comments immediately
before nested input.prompt, judge.type, and report.formats where configured.
A comment before input, judge, or report does not document its child field.
Check every generated case separately: read its actual judge: block and ensure
the explanatory comment sits between judge: and type:, indented like type:.
If the comment is above judge:, move it inside the mapping and validate again.
Do not infer comment coverage from a successful YAML validation or from what you
intended to write.
For an expect block, put its explanatory comment immediately above expect:;
a comment inside it above must_contain does not document the parent gate.
For a new scoring script, check one passing and one failing sample when feasible,
then report the checks and finish. Do not expand into unrelated script features
or a large test matrix unless the user asks for that work.
Step 5: Prepare credentials
Check authentication for the selected engine and provider. Provider API keys
resolve from --api-key, environment variables, or ~/.skill-up/credentials.yaml;
engine-specific tokens and saved login sessions follow the engine's auth rules.
Never dump environment variables or credential files, or print secret values
into tool output, logs, or the conversation. Check only whether a relevant
variable has a non-empty value. For example, for an OpenAI API-key workflow:
if printenv OPENAI_API_KEY | grep -q .; then
printf '%s\n' 'OPENAI_API_KEY: configured'
else
printf '%s\n' 'OPENAI_API_KEY: not configured in the environment'
fi
An absent environment variable does not rule out file-based credentials or an existing engine login. If the selected authentication path is unavailable, stop and ask the user to configure it locally; do not ask them to paste a secret into the conversation or write secrets into YAML without consent.
When asked to author a credential probe, respect the user's allowed command
profile during verification too. Writing a script does not authorize launching
it with sh, sh -x, or sourcing it when that profile excludes script execution.
Inspect the written probe instead and report that execution was not performed;
do not add an unsupported launcher just to test it. Check shell-tracing behavior
only in an explicitly permitted isolated test with synthetic credentials.
The user simulator resolves credentials by its own user_simulator.provider. For provider: simulation, set SIMULATION_API_KEY and SIMULATION_BASE_URL, or configure the simulation provider in ~/.skill-up/credentials.yaml. For provider: openai, use OPENAI_API_KEY and optionally OPENAI_BASE_URL; its standard endpoint is the fallback. Choose protocol: openai for Chat Completions or protocol: anthropic for Messages; custom base URLs must match that protocol. For provider: anthropic with protocol: anthropic, use ANTHROPIC_API_KEY and optional ANTHROPIC_BASE_URL (official endpoint fallback). --api-key for the agent does not supply the simulator connection. Never put a raw key in eval YAML.
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, optionalreport.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.
For simulated cases, inspect each turn's source and any stop_reason alongside the transcript. Hitting max_turns is an execution error; a simulator stop does not itself mean PASS, because the configured judge still grades the result.
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.
- Diagnose failures from
result.json,grading.json, transcripts, and produced artifacts. Distinguish a Skill defect from an invalid eval, execution or infrastructure error, and an uncertain outcome. Before editing, state the observed failure, the smallest proposed change, and the behavior it should change; cite the evidence rather than assuming a score increase proves why. - Preserve the original Skill and its run artifacts so the candidate can be
compared or reverted without overwriting either version's evidence. Fix
SKILL.mdor supporting files within the requested scope. Keep unrelated changes separate so their effects can be assessed. - Preserve valid assertions. If an eval or judge is wrong, explain and correct it separately, then evaluate both Skill versions against that same corrected suite. Add regression coverage and nearby counterexamples where needed to distinguish a reusable fix from a rule tailored to one prompt.
- Compare the original and candidate on the affected cases with the same engine,
model, environment, inputs, and judges. Reuse existing runs only when those
conditions match.
--baselinecompares with and without a Skill; it does not compare old and new Skill versions. Use separate output directories for the two versions. For uncertain or intermittent outcomes, repeat both versions within the user's budget;--iteration Nsamples one version, not N revisions. - Run the full eval suite for a promising candidate. Accept it only when the evidence supports the intended improvement without regressions in important existing behaviors. Inspect runtime, token usage, and execution errors where available. A single PASS, a higher aggregate score, or a preferred-looking answer alone does not establish a reliable improvement.
- Revert unsupported changes or report uncertainty; keeping the original is a valid outcome. Stop when the requested improvement is verified, the agreed budget is reached, or an external blocker prevents validation. Summarize the accepted or reverted change, comparative evidence and artifact paths, regressions, costs, and remaining limitations. Record reusable lessons only when the execution evidence supports them, with their scope and uncertainty.
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. opensandboxwithoutOPENSANDBOX_API_KEY— auth failures.- Match the language of deterministic assertions to the behavior under test, not merely to the conversation language.
- Abusing
agent_judge. - Anthropic
evals.jsonexpectations → defaultagent_judge; useimport+ hand edits for deterministic checks. - Paths relative to Skill root (
SKILL.mddirectory). - A simulator reply is literal user text, including
{{placeholders}}; captured-variable substitution belongs only in configured fixed turns andrespondinstructions. --iteration 0appends one run after the latest existing iteration without summarizing history; positive--iteration Nruns 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.mdreferences/eval-yaml.mdreferences/case-yaml.mdreferences/judge-types.mdreferences/cli.mdreferences/migrate-anthropic.mdreferences/observations.mdassets/eval.yaml.tmpl,assets/case.yaml.tmpl
Files (skill-up)
-
assets
-
case.yaml.tmpl 3.4 KB · in bundle
-
eval.yaml.tmpl 3.3 KB · in bundle
-
-
evals
-
cases
-
add-case-to-existing.yaml 1.1 KB
Loading… -
credential-presence-only.yaml 2.6 KB
Loading… -
english-context-generates-english-only-cases.yaml 1.3 KB
Loading… -
evolve-existing-skill.yaml 1.4 KB
Loading… -
external-trace-review.yaml 1.3 KB
Loading… -
plan-without-mutation.yaml 1.5 KB
Loading… -
preserve-localized-regressions.yaml 1.3 KB
Loading… -
review-evolution-evidence.yaml 2.4 KB
Loading… -
scaffold-new-evals.yaml 1.5 KB
Loading… -
scaffold-with-qodercli-engine.yaml 1.3 KB
Loading… -
scaffold-with-script-judge.yaml 1.2 KB
Loading… -
scaffold-with-user-simulator.yaml 2.1 KB
Loading…
-
-
fixtures
-
scripts
-
assert-credential-presence.sh 34.3 KB
Loading… -
assert-english-only-generated-cases.sh 5 KB
Loading… -
assert-localized-regressions.sh 15.7 KB
Loading… -
assert-read-only-plan.sh 7 KB
Loading…
-
-
skills
-
sample-no-evals
-
SKILL.md 774 B
Loading…
-
-
sample-with-evals
-
evals
-
cases
-
add-todo.yaml 272 B
Loading…
-
-
eval.yaml 255 B
Loading…
-
-
SKILL.md 611 B
Loading…
-
-
-
-
eval-dashscope.yaml 474 B
Loading… -
eval.yaml 1.3 KB
Loading… -
README.md 492 B
Loading… -
requirements.txt 15 B
Loading… -
test_regression_scripts.py 44.6 KB
Loading…
-
-
references
-
case-yaml.md 5.7 KB
Loading… -
cli.md 5.5 KB
Loading… -
eval-yaml.md 8.9 KB
Loading… -
install.md 5.5 KB
Loading… -
judge-types.md 5 KB
Loading… -
migrate-anthropic.md 2 KB
Loading… -
observations.md 3.2 KB
Loading…
-
-
README.md 2.9 KB
# skill-upper An Agent Skill that helps you evaluate and evolve other Agent Skills using the `skill-up` CLI. The canonical Skill instructions and references are in English. A localized overview is available in [README.zh.md](README.zh.md). ## 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 - **Simulate** responsive user turns with an independent model, alongside fixed turns or across an autonomous conversation - **Validate** configuration before running - **Run** evaluations against real Agent Engines (Claude Code, Codex, qodercli, etc.) - **Diagnose** failures from structured reports and output evidence - **Capture** explicitly attributed Skill usage, evidence, and feedback through the Codex or DSH observer integration - **Review** locally captured Skill observations and turn approved feedback into regression cases - **Evolve** the Skill or strengthen eval coverage, then rerun the suite Observation capture and review support Codex and observer-enabled DSH. Claude Code, qodercli, Qwen Code, and other Agent Engines remain available for ordinary `skill-up` evaluation runs, but are not supported by the observation workflow. ## When to use - You want to evaluate, test, or regress a Skill - You want to fix or iterate a Skill from eval failures - You want to capture explicitly attributed Skill usage or feedback - You want to review a captured observation or convert approved feedback into a regression case - 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` ## User simulator scaffolding regression `evals/eval-dashscope.yaml` runs only `scaffold-with-user-simulator` with local OpenCode and DashScope `qwen3.8-max` as both the tested agent and the configured judge. The case checks independent simulator configuration, mixed fixed and simulated turns, and an autonomous case with a bounded turn count. It passed with OpenCode 1.14.24; all five judge criteria and the file-existence check passed. The generated YAML was also independently validated with `skill-up validate`. The original Claude-based seven-case suite was not run in this verification. Supply `DASHSCOPE_API_KEY` through your secret manager and install OpenCode. From the repository root: ```bash make build PATH="$PWD/bin:$PATH" ./bin/skill-up run ./skills/skill-upper/evals/eval-dashscope.yaml ``` The credential-gated `TestSkillUpper_UserSimulator_DashScope` E2E uses this configuration and runs in the manually dispatched full-mode model E2E suite. This case generates configuration and runs validation; its `test-model` is a placeholder. Actual simulator calls are covered separately by [the user simulator example](../../examples/user-simulator/README.md). -
README.zh.md 2.5 KB
Loading… -
SKILL.md 22.2 KB
--- name: skill-upper description: "Capture and review Agent Skill observations, and create, run, diagnose, or iteratively improve Skill evaluations (evals) with the skill-up CLI. Use when the user asks to record explicitly attributed Skill usage or feedback; review observations or user-supplied traces/transcripts; turn an approved observation into a regression case; 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. Plugin observation capture/review require either the Codex skill-up plugin or an observer-enabled DSH skill-up plugin. User-supplied external evidence can be reviewed without a plugin; evaluation remains multi-engine." --- # 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" or "reply in Chinese") → 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 Use the user's current language for replies, newly authored explanatory prose, and YAML comments. Preserve the language and semantics of test inputs, expected output literals, identifiers, commands, paths, and existing regression cases. Do not translate a deterministic assertion merely because the conversation language changed. When testing localized behavior, keep the original business text even in an English conversation. Treat `assets/*.tmpl` as structural references: adapt placeholder prose and comments to the requested language. Review only files created or changed for this task; never rewrite unrelated cases to enforce a language preference. Use short field-leading comments for generated YAML. Explain actual configured fields: `schema_version`, `environment.type`, `engine.name`, `cases.files`, and `report.formats` in eval.yaml; `id`, `title`, `input.prompt`, and `judge.type` in case YAML. For nested fields, place the comment inside the parent mapping immediately before the child field, rather than only before the parent. For example, comment both `prompt` and `type` at their own indentation: ```yaml input: # User request sent to the agent. prompt: Review this code. # Cheap prerequisites checked before the judge. expect: must_contain: ["suggestion"] judge: # Deterministic grading strategy for this case. type: rule_based ``` Comment `expect` and a top-level `judge` when present; do not add an optional field just to satisfy a comment check. Keep field names and enum values unchanged. `skill-up import` does not preserve template comments. ## 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 asks to record explicitly attributed Skill usage, evidence, or feedback. - The user wants to review captured Skill observations or turn approved feedback into a regression case. - 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. ## Choose the requested workflow - **Diagnose or plan:** read the target Skill and supplied evidence, identify concrete problems, and propose changes or cases. Do not install tools, create eval files, change configuration, or run evaluations unless requested. - **Create or edit cases:** use Steps 1–4 to create or update the suite and validate its configuration. Stop before credentials and execution unless the user also requests a run. Report the actual config/case paths and validation status in the final reply. - **Evaluate:** follow Steps 0–7 for the requested suite; report failures without automatically editing the Skill. - **Improve:** follow the evaluation workflow and Step 8 within the requested scope. Preserve valid existing cases and assertions. ## Evaluation workflow ### Observation capture mode (optional) Use this mode when the user asks to record the current Skill interaction or feedback and observation tools are available. It requires either a current Codex release with the `codex-skill-up` plugin and lifecycle-hook support, or DSH with the skill-up plugin's observer explicitly enabled. Do not retrofit observation capture onto the pinned Codex 0.80.0 evaluation adapter. If the user asks how to install either host plugin, or the required observation tools are missing and the user asks to enable them, read `references/install.md` under "Install an observation host plugin (optional)". Do not install or enable a plugin unless the user asks. Claude Code, qodercli, Qwen Code, and other Agent Engines are not supported for this observation workflow. This restriction does not apply to normal `skill-up` evaluation runs, which remain multi-engine. 1. Attribute the interaction only when the user explicitly references a Skill (for example, `$my-skill`) or the responsible Skill is otherwise known with certainty. 2. In Codex, if explicit attribution is absent but certain, call `mark_skill_invocation` once with the Skill name and optional version. DSH derives exact attribution from its durable `/skill` injection or successful `skill` tool result; do not add inferred attribution. 3. In Codex, use `attach_skill_evidence` only for references that help reproduce or evaluate the behavior. Prefer paths and short summaries over copied file contents. 4. In Codex, use `record_skill_feedback` during the observed turn. In DSH, the observer stores the next user turn in the same session as an unclassified follow-up candidate. For explicit feedback, use `record_observation_feedback` with the completed observation's ID. Never invent sentiment or comments. Both adapters redact common credential shapes before local persistence, but still avoid sending secrets to marker tools. If the request is capture-only, stop after recording it; do not edit, evaluate, commit, or publish a Skill unless the user also asks for that work. ### Observation input mode (optional) When the request starts from a captured Skill observation, read `references/observations.md` first. Use the available observation tools to inspect and preview the observation, require explicit approval for the exact candidate, write it only after approval, and then continue at Step 4. If the request does not start from an observation, use the normal flow below. ### 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, including optional Codex and DSH observation host plugins: `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. Preserve localized behavior and expected literals when designing cases. 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`. Start with the smallest complete scaffold requested by the user. Unless they request broader coverage, create one representative case; add more only for distinct requirements. For a script judge, implement the required output contract in a short script and reuse it across cases with the same contract. Do not build a general report parser or an extensive script test matrix as part of scaffolding. For a JSON-only contract, use `json.loads` and explicit field checks; support prose or Markdown wrappers only when the contract allows them. Adapt language per "Language Rules for Generated Artifacts". Replace the templates' generic English placeholders with case-specific prose in the requested output language. Preserve short field-leading comments in generated YAML; translate them when the output language differs from English, 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. - For interactive cases, preserve fixed `input.turns[].content` where the user message is known. Use `input.turns[].respond` only for a reply that must react to the agent, or `input.prompt` plus case-level `user_simulator.scenario` when the simulator should choose all later replies and when to stop. Set an independent eval-level `user_simulator` model and a bounded `max_turns`; see both YAML references. Do not reuse `engine.model` or `judge.model` as an implicit simulator model. 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. - For byte-for-byte preservation checks, compare `sha256sum <file>` (or `shasum -a 256 <file>`) before and after editing, within the user's allowed command profile. - If adding simulated user turns, check that the selected engine supports session resumption, configure the separate simulator connection, and retain deterministic fixed turns and judge assertions wherever possible. ### Step 4: Validate the configuration ```bash skill-up validate <skill-root>/evals/eval.yaml ``` Expect: `✓ eval.yaml is valid (loaded N case(s))`. For a case-authoring request, finish here with the config and case paths plus validation status. Do not start a background evaluation as part of scaffolding. Before replying, reopen the generated YAML and check comments immediately before nested `input.prompt`, `judge.type`, and `report.formats` where configured. A comment before `input`, `judge`, or `report` does not document its child field. Check every generated case separately: read its actual `judge:` block and ensure the explanatory comment sits between `judge:` and `type:`, indented like `type:`. If the comment is above `judge:`, move it inside the mapping and validate again. Do not infer comment coverage from a successful YAML validation or from what you intended to write. For an `expect` block, put its explanatory comment immediately above `expect:`; a comment inside it above `must_contain` does not document the parent gate. For a new scoring script, check one passing and one failing sample when feasible, then report the checks and finish. Do not expand into unrelated script features or a large test matrix unless the user asks for that work. ### Step 5: Prepare credentials Check authentication for the selected engine and provider. Provider API keys resolve from `--api-key`, environment variables, or `~/.skill-up/credentials.yaml`; engine-specific tokens and saved login sessions follow the engine's auth rules. Never dump environment variables or credential files, or print secret values into tool output, logs, or the conversation. Check only whether a relevant variable has a non-empty value. For example, for an OpenAI API-key workflow: ```bash if printenv OPENAI_API_KEY | grep -q .; then printf '%s\n' 'OPENAI_API_KEY: configured' else printf '%s\n' 'OPENAI_API_KEY: not configured in the environment' fi ``` An absent environment variable does not rule out file-based credentials or an existing engine login. If the selected authentication path is unavailable, **stop and ask** the user to configure it locally; do not ask them to paste a secret into the conversation or write secrets into YAML without consent. When asked to author a credential probe, respect the user's allowed command profile during verification too. Writing a script does not authorize launching it with `sh`, `sh -x`, or sourcing it when that profile excludes script execution. Inspect the written probe instead and report that execution was not performed; do not add an unsupported launcher just to test it. Check shell-tracing behavior only in an explicitly permitted isolated test with synthetic credentials. The user simulator resolves credentials by its own `user_simulator.provider`. For `provider: simulation`, set `SIMULATION_API_KEY` and `SIMULATION_BASE_URL`, or configure the `simulation` provider in `~/.skill-up/credentials.yaml`. For `provider: openai`, use `OPENAI_API_KEY` and optionally `OPENAI_BASE_URL`; its standard endpoint is the fallback. Choose `protocol: openai` for Chat Completions or `protocol: anthropic` for Messages; custom base URLs must match that protocol. For `provider: anthropic` with `protocol: anthropic`, use `ANTHROPIC_API_KEY` and optional `ANTHROPIC_BASE_URL` (official endpoint fallback). `--api-key` for the agent does not supply the simulator connection. Never put a raw key in eval YAML. 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`. For simulated cases, inspect each turn's `source` and any `stop_reason` alongside the transcript. Hitting `max_turns` is an execution error; a simulator stop does not itself mean PASS, because the configured judge still grades the result. ### 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`, transcripts, and produced artifacts. Distinguish a Skill defect from an invalid eval, execution or infrastructure error, and an uncertain outcome. Before editing, state the observed failure, the smallest proposed change, and the behavior it should change; cite the evidence rather than assuming a score increase proves why. 2. Preserve the original Skill and its run artifacts so the candidate can be compared or reverted without overwriting either version's evidence. Fix `SKILL.md` or supporting files within the requested scope. Keep unrelated changes separate so their effects can be assessed. 3. Preserve valid assertions. If an eval or judge is wrong, explain and correct it separately, then evaluate both Skill versions against that same corrected suite. Add regression coverage and nearby counterexamples where needed to distinguish a reusable fix from a rule tailored to one prompt. 4. Compare the original and candidate on the affected cases with the same engine, model, environment, inputs, and judges. Reuse existing runs only when those conditions match. `--baseline` compares with and without a Skill; it does not compare old and new Skill versions. Use separate output directories for the two versions. For uncertain or intermittent outcomes, repeat both versions within the user's budget; `--iteration N` samples one version, not N revisions. 5. Run the full eval suite for a promising candidate. Accept it only when the evidence supports the intended improvement without regressions in important existing behaviors. Inspect runtime, token usage, and execution errors where available. A single PASS, a higher aggregate score, or a preferred-looking answer alone does not establish a reliable improvement. 6. Revert unsupported changes or report uncertainty; keeping the original is a valid outcome. Stop when the requested improvement is verified, the agreed budget is reached, or an external blocker prevents validation. Summarize the accepted or reverted change, comparative evidence and artifact paths, regressions, costs, and remaining limitations. Record reusable lessons only when the execution evidence supports them, with their scope and uncertainty. ## 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. - Match the language of deterministic assertions to the behavior under test, not merely to the conversation language. - 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). - A simulator reply is literal user text, including `{{placeholders}}`; captured-variable substitution belongs only in configured fixed turns and `respond` instructions. - `--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` - `references/observations.md` - `assets/eval.yaml.tmpl`, `assets/case.yaml.tmpl`
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.