feat(skill): beta 技能 diagnosing-bugs + 月度审阅与 evals 工具
skill-gate / gate (pull_request) Waiting to run
skill-gate / gate (pull_request) Waiting to run
- 新增 diagnosing-bugs(beta):先建红循环再推理、二分定位、补回归测试;含 evals 与四段式文档 - 路由表加入难查 bug 行 - scripts/monthly-review.sh:一条命令跑月度审阅 - scripts/evals-status.py + reports/evals/TEMPLATE.md:evals 覆盖与回归报告模板 - skill-creator 实战记录 #1(待观察后晋升)
This commit is contained in:
Executable
+31
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env python3
|
||||
"""列出各技能的 evals 与是否已有回归报告(reports/evals/<name>.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}")
|
||||
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
# 月度技能审阅:一条命令跑完 MAINTENANCE 里的月度项。
|
||||
# 用法: ./scripts/monthly-review.sh
|
||||
set -uo pipefail
|
||||
cd "$(git rev-parse --show-toplevel)" || exit 1
|
||||
echo "== 技能月度审阅 $(date '+%F %H:%M') =="
|
||||
echo; echo "-- 1. 覆盖率(promoted + model-invoked)--"
|
||||
python3 scripts/validate-skills.py --coverage
|
||||
echo; echo "-- 2. 本仓库安全扫描 --"
|
||||
./scripts/scan-skill.sh | tail -2
|
||||
echo; echo "-- 3. 第三方已装技能扫描 --"
|
||||
./scripts/scan-installed.sh | tail -2
|
||||
echo; echo "-- 4. catalog 是否最新 --"
|
||||
python3 scripts/generate-catalog.py --check
|
||||
echo; echo "-- 5. catalog 摘要与 description 异常项 --"
|
||||
python3 - <<'PY'
|
||||
import json
|
||||
d = json.load(open('catalog.json'))
|
||||
print("总数:", d['total'], "| 分布:", d['counts'])
|
||||
bad = [(x['name'], x['description_len']) for x in d['skills']
|
||||
if x['description_len'] < 60 or x['description_len'] > 600]
|
||||
print("description 长度异常:", bad if bad else "无")
|
||||
cov = d.get('coverage', {})
|
||||
print(f"覆盖率: evals {cov.get('with_evals')}/{cov.get('required')},文档 {cov.get('with_docs')}/{cov.get('required')}")
|
||||
PY
|
||||
Reference in New Issue
Block a user