This file follows the agents.md convention and provides machine-readable guidance for AI coding agents (Qoder, Claude Code, Codex, Cursor, etc.) working in this repository. For a human-oriented overview, see
README.mdandCONTRIBUTING.md.
skill-up is a CLI evaluation framework for Agent Skill developers, written
in Go. It loads declarative eval configs (evals/eval.yaml + cases/*.yaml),
provisions an isolated workspace, invokes an Agent Engine (Qoder CLI / Claude
Code / Codex), runs Judges (rule_based / script / agent_judge), and emits
structured reports (JSON / JUnit / HTML / Anthropic grading.json).
- Module path:
github.com/alibaba/skill-up - Entry point:
cmd/skill-up/main.go - Go version: 1.25+ (see
go.mod) - License: Apache-2.0
# Fetch dependencies (only needed after cloning or go.mod changes)
go mod download
# Install git hooks (pre-commit + commit-msg). Idempotent; auto-runs on first build.
make hooks
# Install pinned lint tools into .tools/bin/ (golangci-lint v2.11.4, revive v1.10.0)
make lint-toolsIf you are in mainland China and go install is slow, set
GOPROXY=https://goproxy.cn,direct before running the commands above.
On Windows, make is unavailable by default; use the PowerShell equivalents
in scripts/windows/ (hooks.ps1, lint-tools.ps1, verify.ps1). See the
Windows support guide for supported features and
known limitations.
# Standard build with version injection via ldflags -> bin/skill-up
make build
# Fast iteration build (no version injection)
go build -o bin/skill-up ./cmd/skill-up
# Run the CLI
./bin/skill-up --help
./bin/skill-up run ./evals/eval.yaml
./bin/skill-up validate ./evals/eval.yaml# Unit tests (race detector enabled — always use this)
make test
# equivalent: go test -race ./...
go test -race ./...
# GitHub Action adapter tests (requires Python 3)
make test-action
# Run a single test
go test -race -run TestFoo ./internal/config/
# End-to-end tests (build-tag gated, slower)
make e2e
# equivalent: go test -tags e2e -v ./e2eRules for agents:
- Always run
make testbefore declaring a change complete. New code must not break any existing tests. - Add or update tests alongside any behavior change. Table-driven tests are the dominant pattern in this repo — follow it.
- Avoid network-dependent tests; use fixtures under
internal/*/testdata/ore2e/testdata/for inputs. - E2E tests live in
e2e/and are gated by thee2ebuild tag; do not add them to regular unit packages.
The CI gate (and pre-commit hook) is make verify, which chains:
fmt-check -> gofmt must be clean (run `make fmt` to auto-fix)
vet -> go vet ./...
revive -> revive -config revive.toml ./... (incremental linter)
lint -> golangci-lint run ./... (config: .golangci.yml)
Agents MUST:
- Run
make fmtbefore committing Go files. - Run
make verifybefore declaring a change complete. If any step fails, fix the findings — do not disable lints to pass CI. - Keep the pinned tool versions consistent between
Makefile(GOLANGCI_LINT_VERSION,REVIVE_VERSION), CI workflows under.github/workflows/, and documentation. - Not introduce new abstractions, helpers, or files unless the task actually requires them. Bug fixes should stay local.
Language & comments:
- Public (exported) identifiers need Go doc comments starting with the name.
- Inline comments are sparse — only explain non-obvious intent.
- Comment and documentation language: English for code-level artifacts;
user-facing docs may be bilingual (
README.md+README.zh.md).
cmd/skill-up/ CLI main (keep minimal; delegate to internal/cli)
internal/ Private implementation — never import from outside the module
cli/ Cobra subcommands (run / validate / list-cases / report / import / debug)
config/ eval.yaml + cases/*.yaml loader, schema, validator (v1alpha1)
credential/ API key resolution (flags / env / ~/.skill-up/credentials.yaml)
runtime/ Workspace runtime: none / opensandbox
agent/ Agent Engine adapters (qoder_cli / claude_code / codex)
mcp/ MCP provisioner (mock / real)
skill/ Install Skill files into Engine's conventional path (excluding evals/)
evaluator/ Evaluator: iterates cases, calls agent.Run, returns CaseResult
judge/ Judges: rule_based, script, agent_judge
report/ Report generators: JSON / JUnit / HTML / Anthropic grading & benchmark
runner/ End-to-end orchestration for `skill-up run`
logging/ observability/ shellquote/ ui/ Cross-cutting utilities
pkg/ Publicly importable APIs (semver-stable; change with care)
skillup/ Embeddable evaluation API
transcript/ Transcript parsing helpers
skills/skill-upper/ Distributable Agent Skill that guides AI agents through the
skill-up eval workflow (scaffolding, running, interpreting).
Contains SKILL.md, assets/
templates, references/, and its own evals/ suite. Not part of
`go build`; consumed by Agent Engines (Cursor, Claude Code,
Qoder, etc.) at runtime.
e2e/ End-to-end tests (build-tag gated) + testdata/
examples/ Example fixtures and debug inputs
docs/ Design docs, user manuals, and the VitePress site
(built & deployed to GitHub Pages by .github/workflows/docs.yml)
internal/is private. Never import it from outside this module; never re-export its types throughpkg/without a conscious API-stability review.pkg/skillup/andpkg/transcript/are public, semver-stable. Breaking changes here require a new module major version.- CLI glue belongs in
internal/cli/; business logic belongs in the correspondinginternal/<domain>/package.
- Schema version:
v1alpha1(declared in each YAML'sschema_version). eval.yaml->internal/config.EvalConfigcases/*.yaml->internal/config.CaseConfig- Path resolution:
cases.filesand fixture-style references are resolved relative to the directory that containsSKILL.md, not the current working directory.
When changing the schema: update schema.go, validator.go, their tests,
defaults.yaml, and any affected example under examples/ or e2e/testdata/
in the same commit.
- Conventional Commits are enforced by
.githooks/commit-msg. Subject format:<type>(<scope>): <description>. Allowed types:feat,fix,docs,style,refactor,perf,test,build,ci,chore,revert. Examples:feat(cli): add validate commandfix(config): correct default timeoutdocs: update AGENTS.md
- Keep commits focused; prefer multiple small commits over one sweeping change.
- Do not commit:
- Real API keys, tokens, or credentials (see
internal/credential/README.md). - Local caches (
.cache/,.tools/bin/), build outputs (bin/,dist/), or personal editor configs. These are in.gitignore— keep it that way.
- Real API keys, tokens, or credentials (see
- Before opening a PR:
make fmtmake verifymake test- If you touched anything under
e2e/orinternal/runner/, also runmake e2e. - Update
CHANGELOG.mdif the change is user-visible.
- Credentials resolve in this priority order: CLI flag -> environment variable
->
~/.skill-up/credentials.yaml. Never log raw credential values; redact them via the helpers ininternal/credential/. - External processes (Agent Engines, MCP servers, scripts) run in the selected
runtime (
noneoropensandbox). When adding new shell execution paths, useinternal/shellquote— never concatenate untrusted strings into a shell command. gosecandnoctxare enabled in.golangci.yml; fix findings rather than silencing them.
- Releases are driven by GoReleaser, triggered by pushing
a
v*tag. CI workflow:.github/workflows/release.yml. - Version is injected at build time via
-ldflags "-X main.version=<tag>". The fallbackvar version = "dev"lives incmd/skill-up/main.go. - Do not create tags or invoke
goreleaser releaseautomatically — release cadence is owned by maintainers.
- Do not modify
go.mod/go.sumexcept viago getormake tidy. - Do not add new top-level directories without updating this file,
CONTRIBUTING.md, and theProject Structuresection ofREADME.md. - Do not disable or weaken existing lint rules, tests, or git hooks to make a change pass.
- Do not introduce dependencies on
internal/*from outside the module, or on GPL / network-only packages. - Do not generate large refactors, planning docs, or analysis documents unless the task explicitly asks for them.