Multi-tier framework for evaluating AI agent skills and plugins with quality gates, security scanning, harness compatibility checks, semantic overlap detection, synthetic evaluation dataset generation, and live agent evaluation that measures how skills affect agent behavior. Ships reusable CI templates that bring every check to any repository.
Python agent-evaluationagent-pluginsagent-securityagent-skillsagentic-aibenchmarkci-templatesclaude-codecodexevaluateevaluationharnesspluginplugin-evaluationsecurity-scannerskill-evalskill-evaluationskill-evaluatorskill-gap-analysisskills
# SPDX-License-Identifier: Apache-2.0
"""Keep this repository's consumer callers compatible with trusted upstream CI."""
import json
import re
import subprocess
from pathlib import Path
import yaml
ROOT = Path(__file__).parents[2]
SCAN = ".github/workflows/skill-checks-all-tiers.yml"
FEEDBACK = ".github/workflows/skill-feedback-all-tiers.yml"
# Reviewed support commit on main; runtime and image retain their release pins.
REVIEWED_PRODUCER_WORKFLOW_REF = "bf44a24704833083c556feb0b433ab0d647c3826"
def workflow(path):
return yaml.load((ROOT / path).read_text(), Loader=yaml.BaseLoader)
def test_repository_skill_checks_use_reviewed_full_three_tier_configuration():
scan = workflow(SCAN)
assert set(scan["on"]) == {"pull_request", "push", "workflow_dispatch"}
assert scan["on"]["push"]["branches"] == ["main"]
# Unrelated pull requests start no run and receive no feedback comment;
# caller changes still run so the setup change is exercised.
triggers = ["skills/**", SCAN, FEEDBACK]
assert scan["on"]["pull_request"] == {"paths": triggers}
assert scan["on"]["push"]["paths"] == triggers
assert scan["permissions"] == {
"contents": "read",
"actions": "read",
"pull-requests": "read",
"id-token": "write",
}
job = scan["jobs"]["skills"]
prefix = "NVIDIA/SkillEvaluator/.github/workflows/evaluate-all-tiers.yml@"
assert job["uses"].startswith(prefix)
producer = job["uses"].removeprefix(prefix)
assert re.fullmatch(r"[0-9a-f]{40}", producer)
assert producer == REVIEWED_PRODUCER_WORKFLOW_REF
inputs = job["with"]
assert re.fullmatch(r"ghcr.io/nvidia/skillevaluator-tier1@sha256:[0-9a-f]{64}", inputs["image"])
assert inputs["tools-repository"] == "NVIDIA/SkillEvaluator"
assert re.fullmatch(r"[0-9a-f]{40}", inputs["tools-ref"])
assert inputs["tiers"] == "1,2,3"
assert inputs["paths"] == "skills"
assert inputs["scan-mode"] == "auto"
assert inputs["env-mode"] == "docker"
assert inputs["min-score"] == "70"
assert inputs["tier1-llm"] == "true"
assert inputs["tier1-provider"] == "nv_build"
assert inputs["tier1-model"] == "nvidia/nemotron-3.5-super-vl-120b-a12b"
assert inputs["provider"] == inputs["embedding-provider"] == "nv_build"
assert inputs["model"] == "nvidia/nemotron-3.5-lightning-30b-a3b"
assert inputs["tier3-provider"] == "openai-compatible"
assert inputs["tier3-base-url"] == "${{ vars.SKILL_EVAL_TIER3_BASE_URL }}"
assert inputs["tier3-model"] == "us/aws/anthropic/eccn-claude-opus-4-8"
assert inputs["agents"] == "codex,claude-code"
assert inputs["agent-models"].splitlines() == [
"codex=openai/openai/eccn-gpt-6.1-sol",
"claude-code=aws/anthropic/eccn-claude-opus-5-5",
]
assert inputs["environment"] == "skillevaluator"
assert inputs["environment-deployment"] == "false"
assert inputs["n-attempts"] == inputs["n-concurrent"] == "1"
assert "tier3-required" not in inputs
secrets = {key: "${{ secrets." + key + " }}" for key in ("OPENAI_API_KEY", "ANTHROPIC_API_KEY", "NVIDIA_API_KEY")}
secrets["LLM_API_KEY"] = "${{ secrets[vars.SKILL_EVAL_GATEWAY_SECRET] }}"
assert job["secrets"] == secrets
assert "steps" not in job
def test_repository_feedback_and_benchmarks_approve_exact_caller_and_preserve_public_publisher():
feedback = workflow(FEEDBACK)
assert feedback["on"] == {"workflow_run": {"workflows": [workflow(SCAN)["name"]], "types": ["completed"]}}
assert feedback["permissions"] == {"contents": "read", "actions": "read", "pull-requests": "write"}
assert set(feedback["jobs"]) == {"feedback", "benchmarks"}
job = feedback["jobs"]["feedback"]
# A consumer keeps its reviewed runtime when a later release descriptor changes.
runtime = workflow(SCAN)["jobs"]["skills"]["with"]["tools-ref"]
assert job["uses"] == ("NVIDIA/SkillEvaluator/.github/workflows/feedback-all-tiers.yml@" + runtime)
assert set(job) == {"uses", "with"}
inputs = job["with"]
assert inputs["tools-repository"] == "NVIDIA/SkillEvaluator"
assert inputs["tools-ref"] == runtime
assert inputs["trusted-workflow-ref"] == workflow(SCAN)["jobs"]["skills"]["uses"]
# Apply the checkout's clean filters exactly as committing the caller does.
blob = subprocess.check_output(["git", "hash-object", "--path", SCAN, SCAN], cwd=ROOT, text=True).strip()
assert inputs["trusted-caller-blobs"] == blob
benchmarks = feedback["jobs"]["benchmarks"]
assert set(benchmarks) == {"uses", "with", "permissions"}
assert benchmarks["uses"] == ("NVIDIA/SkillEvaluator/.github/workflows/publish-benchmarks.yml@" + runtime)
assert benchmarks["permissions"] == {"contents": "write", "actions": "read", "pull-requests": "write"}
assert benchmarks["with"] == inputs
public = workflow(".github/workflows/feedback-all-tiers.yml")
assert set(public["on"]) == {"workflow_call"}
assert public["jobs"]["feedback"]["steps"]
def test_repository_skill_has_committed_complete_dataset_prerequisites():
from ci.run_tiers import dataset_preflight
skills = sorted((ROOT / "skills").glob("*/SKILL.md"))
assert skills
for manifest in skills:
digests = dataset_preflight(manifest.parent)
assert "evals/evals.json" in digests
def test_repository_callers_pin_a_released_evaluator_runtime():
"""The pinned runtime must stay resolvable after the pull request that set it merges.
GitHub resolves ``uses: owner/repo/path@<sha>`` only for a commit reachable
from a branch or tag. A commit taken from a pull-request branch vanishes once
that branch is squash-merged and deleted, and every later run then fails before
any job starts with "error parsing called workflow ... workflow was not found".
Runtime and publisher pins remain in released descriptors. The producer
workflow may use the separately reviewed main commit above to receive a
workflow-only fix without changing the released evaluator runtime.
"""
descriptors = [
ROOT / "src/skillevaluator/ci-release-all-tiers.json",
*sorted((ROOT / "ci/bundles").glob("*/release.json")),
]
released = set()
for descriptor in descriptors:
data = json.loads(descriptor.read_text())
released.update(
str(value)
for key, value in data.items()
if key.endswith("_ref") and re.fullmatch(r"[0-9a-f]{40}", str(value))
)
assert released
runtime = workflow(SCAN)["jobs"]["skills"]["with"]["tools-ref"]
assert runtime in released, f"{runtime} is not a workflow_ref or tools_ref of any committed release descriptor"