$npx -y skills add AndrewNgGirl/SkillLens --skill skill-scorerEvaluates Agent Skills (Cursor / Claude / OpenClaw compatible) and produces a quantitative, rubric-based score with actionable improvement suggestions. Use when the user asks to review, rate, audit, grade, lint, or improve a SKILL.md file, a skill folder, or a skill archive, or s
| 1 | # skill-scorer |
| 2 | |
| 3 | 一个"评测 Skill 的 Skill"。接收任意 Agent Skill 的源文件,必须依据本仓库的官方评分入口和 `rubric/rubric.yaml` |
| 4 | 给出 5 大支柱的 100 分制评分、等级、证据引用与改进建议。Rubric 内置三类型差异化(atomic / pipeline / composite),子维度数随 skill 结构自动启用,由 `applies_to` 字段控制。同时兼容 **Cursor / Claude / OpenClaw** 三套规范。 |
| 5 | |
| 6 | ## When to use |
| 7 | |
| 8 | - 用户提供 `SKILL.md` / skill 文件夹 / `.zip` / GitHub URL,并请求评分、审计或改进建议。 |
| 9 | - 用户询问"我这个 skill 写得怎么样"、"怎么提升我的 skill 质量"、"帮我对齐官方最佳实践"。 |
| 10 | - **不适用于**:评价非 Skill 类文档(普通 README / 博客 / prompt 模板)。 |
| 11 | |
| 12 | ## Code Agent Quick Start |
| 13 | |
| 14 | 如果你是 Cursor、WorkBuddy、Hermes、小龙虾或类似 code agent,先读 `USAGE.md`。 |
| 15 | |
| 16 | 推荐先运行 CLI 向导,让用户选择通用评测或金融专家版;如果选择金融专家版,向导会继续确认金融子场景,并输出后续官方命令: |
| 17 | |
| 18 | ```bash |
| 19 | python3 skills/skill-scorer/scripts/score.py --agent-wizard <path-to-skill-zip-dir-or-SKILL.md> |
| 20 | ``` |
| 21 | |
| 22 | 规则分预览: |
| 23 | |
| 24 | ```bash |
| 25 | python3 skills/skill-scorer/scripts/score.py <path-to-skill-zip-dir-or-SKILL.md> |
| 26 | ``` |
| 27 | |
| 28 | 完整 agent-side Deep Review(使用 code agent 自己的模型套餐,不消耗 SkillLens 服务端 key): |
| 29 | |
| 30 | ```bash |
| 31 | python3 skills/skill-scorer/scripts/score.py --agent-prompt <path-to-skill-zip-dir-or-SKILL.md> > agent-deep-review-prompt.md |
| 32 | # 将 agent-deep-review-prompt.md 完整交给当前 code agent 的模型,保存严格 JSON 为 agent-llm-results.json |
| 33 | python3 skills/skill-scorer/scripts/score.py --llm-results agent-llm-results.json <path-to-skill-zip-dir-or-SKILL.md> |
| 34 | ``` |
| 35 | |
| 36 | 不得临时生成自定义评分脚本替代官方 CLI;最终分数必须来自最后一步官方 CLI 输出。 |
| 37 | |
| 38 | 金融专家版(可选)应优先通过 `--agent-wizard` 选择;手动执行时,必须在 `--agent-prompt` 和 `--llm-results` 两步都加入相同的 `--domain finance --scenario <scenario-id>`。支持的场景详见 `USAGE.md`。 |
| 39 | |
| 40 | ## Inputs |
| 41 | |
| 42 | - 一个 `SKILL.md` 文本,或 |
| 43 | - 一个 skill 目录(含 `scripts/` `references/` `assets/` 等),或 |
| 44 | - 一个 `.zip` 打包的 skill,或 |
| 45 | - 一个指向 skill 仓库/子目录的 GitHub URL(Web 工具侧支持)。 |
| 46 | |
| 47 | ## Outputs |
| 48 | |
| 49 | ```json |
| 50 | { |
| 51 | "spec": "claude | openclaw", |
| 52 | "language": "zh | en", |
| 53 | "score": 0-100, |
| 54 | "grade": "S | A | B | C | D", |
| 55 | "pillars": [ |
| 56 | { |
| 57 | "id": "business_value", |
| 58 | "score": 0-25, |
| 59 | "dimensions": [ |
| 60 | { |
| 61 | "id": "...", |
| 62 | "checks": [ |
| 63 | { |
| 64 | "id": "...", |
| 65 | "status": "pass|partial|fail|n_a", |
| 66 | "evidence": "<primary-language alias>", |
| 67 | "evidence_zh": "中文现状", |
| 68 | "evidence_en": "English diagnosis", |
| 69 | "fix": "<primary-language alias>", |
| 70 | "fix_zh": "中文改法", |
| 71 | "fix_en": "English fix" |
| 72 | } |
| 73 | ] |
| 74 | } |
| 75 | ] |
| 76 | } |
| 77 | ], |
| 78 | "bonus": 0-5, |
| 79 | "suggestions": [ |
| 80 | { |
| 81 | "title": "Top 改进项", |
| 82 | "title_zh": "中文 Top 改进项", |
| 83 | "title_en": "English Top Improvement", |
| 84 | "why": "现状", |
| 85 | "why_zh": "中文现状", |
| 86 | "why_en": "English why", |
| 87 | "how": "改法", |
| 88 | "how_zh": "中文改法", |
| 89 | "how_en": "English how" |
| 90 | } |
| 91 | ], |
| 92 | "deepReviewCertificate": { |
| 93 | "status": "verified" |
| 94 | } |
| 95 | } |
| 96 | ``` |
| 97 | |
| 98 | `evidence_zh` + `evidence_en` (and `fix_zh` + `fix_en`, `why_zh` + `why_en`, `how_zh` + `how_en`, `title_zh` + `title_en`) are the canonical bilingual fields ≥ engineVersion 0.4.1. The unsuffixed `evidence` / `fix` / `why` / `how` / `title` are preserved as back-compat aliases pointing at the primary language so older readers keep working. The HTML report's ZH/EN toggle uses the suffixed fields to switch body content; falls back to the bare field when the JSON predates the bilingual schema. |
| 99 | |
| 100 | ## Workflow |
| 101 | |
| 102 | 1. **Locate SkillLens root**:先定位包含 `skills/skill-scorer/rubric/rubric.yaml` 的 SkillLens 仓库根目录。 |
| 103 | 2. **Run official scorer**:运行官方 CLI,不得临时生成替代评分脚本: |
| 104 | |
| 105 | ```bash |
| 106 | python3 skills/skill-scorer/scripts/score.py <path-to-skill-zip-dir-or-SKILL.md> |
| 107 | ``` |
| 108 | |
| 109 | 3. **Choose review mode**:优先运行 `--agent-wizard`。如手动执行,必须确认是否启用领域专家版;当前 MVP 支持 `finance`,并必须确认具体 `--scenario`。 |
| 110 | 4. **Agent-side Deep Review when requested**:如需完整深度评测,必须先运行 `--agent-prompt` 生成官方提示词,用当前 code agent 的模型返回严格 JSON,再运行 `--llm-results` 合并。领域专家版必须在两步命令都带上相同的 `--domain` / `--scenario`。 |
| 111 | 5. **Use official JSON only**:总分、等级、pillar/dimension/check 分数必须来自官方 CLI 最终 JSON 输出,不能由 Agent 自己重算或补满。 |
| 112 | 6. **Verify certificate**:完整 Deep Review 必须包含 `deepReviewCertificate.status="verified"`;金融专家版还必须包含 `domainExpert` 和 `deepReviewCertificate.domain`;没有证书只能称为规则分预览或非官方结果。 |
| 113 | 7. **Render**:按用户阅读语言(zh / en)从 JSON 取双语字段(`evidence_zh` + `evidence_en`, `fix_zh` + `fix_en`, `why_zh` + `why_en`, `how_zh` + `how_en`)渲染报告;Top 改进项必须来自 JSON 的 `suggestions`,旧版单语 JSON 可回退到 `evidence` / `fix` / `why` / `how`。 |
| 114 | |
| 115 | ## Official Tool Contract |
| 116 | |
| 117 | - **MUST** call `skills/skill-scorer/scripts/score.py` for local tool use, or call the deployed SkillLens Web/API endpoint when the user explicitly提供该服务地址。 |
| 118 | - **SHOULD** start with `--agent-wizard` for agent-side Deep Review so the user explicitly chooses general vs. finance expert review |