#!/usr/bin/env python3 """列出各技能的 evals 与是否已有回归报告(reports/evals/.md)。""" from __future__ import annotations import json from pathlib import Path ROOT = Path(__file__).resolve().parent.parent rows = [] for pj in sorted(ROOT.glob("skills-*/*-plugin/.claude-plugin/plugin.json")): meta = json.loads(pj.read_text()) name = meta.get("install_name") if not name: continue ev = next((pj.parent.parent / "skills").rglob("evals/evals.json"), None) cases = 0 if ev: try: cases = len(json.loads(ev.read_text()).get("evals", [])) except Exception: cases = 0 report = ROOT / "reports" / "evals" / f"{name}.md" rows.append((name, meta.get("status", "promoted"), cases, report.is_file())) with_evals = sum(1 for r in rows if r[2] > 0) with_report = sum(1 for r in rows if r[3]) print(f"{'技能':32} {'status':10} {'用例':4} 回归报告") for name, status, cases, has_report in rows: if cases == 0: continue print(f"{name:32} {status:10} {cases:<4} {'有' if has_report else '-'}") print(f"\n有 evals 的技能: {with_evals}/{len(rows)};已有回归报告: {with_report}/{with_evals}")