技能测试员

人工智能 社区

技能解读

当前原文的自动摘译,尚未人工审校。

何时使用

添加或修改技能之后 提交更改之前 提交插件进行人工审核之前 作为 eval-creator 需要验证技能质量时外循环的一部分

1. 人择规范验证

对skills/中的每个技能运行quick_validate.py(不包括-ci变体):通过标准:每个技能的退出代码为0。 Frontmatter 仅允许使用键(name、description、license、allowed-tools、metadata、compatibility)。名称为 kebab-case,最多 64 个字符。描述最多 1024 个字符,无尖括号。

2. 项目约定检查

对于每个技能目录:检查 · 规则 · 严重性名称与文件夹匹配 · Frontmatter name == 目录名称 · 错误行数限制 · SKILL.md 低于 500 行(软),低于 600 行(硬) · 警告/错误 无 README.md · 技能文件夹不得包含 README.md · 错误

3. 交叉引用验证

验证这些文件中列出的所有技能是否确实以目录形式存在: CLAUDE.md — 技能参考部分 AGENTS.md — 技能参考部分 .github/copilot-instructions.md — 技能参考部分 README.md — 技能表

4. 钩子脚本测试

对于具有scripts/目录的每个技能:

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
人工智能
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
88 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@pskoett · 未声明许可证
上下文用量评级
低消耗
接入复杂程度
需简单配置
是否需要外部接口密钥
不需要
兼容的系统
未声明(默认跨平台)
运行环境要求
未检出明确要求
检测到的文件与系统行为
  • 只读
  • 允许写入 / 修改
  • 命令执行
网络行为
仅限本地
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

# Skill Tester

Validates all interactive (non-CI) skills in this repo. Runs the Anthropic skill-creator's `quick_validate.py` plus project-specific checks.

## When to Use

- After adding or modifying a skill
- Before committing changes
- Before submitting the plugin for Anthropic review
- As part of the outer loop when eval-creator needs to verify skill quality

## Checks

### 1. Anthropic Spec Validation

Run `quick_validate.py` on every skill in `skills/` (excluding `-ci` variants):

```bash
for d in skills/*/; do
  skill=$(basename "$d")
  [[ "$skill" == *-ci ]] && continue
  python3 .claude/skills/skill-creator/scripts/quick_validate.py "$d"
done
```

**Pass criteria:** Exit code 0 for every skill. Frontmatter has only allowed keys (`name`, `description`, `license`, `allowed-tools`, `metadata`, `compatibility`). Name is kebab-case, max 64 chars. Description max 1024 chars, no angle brackets.

### 2. Project Convention Checks

For each skill directory:

| Check | Rule | Severity |
|-------|------|----------|
| Name matches folder | Frontmatter `name` == directory name | Error |
| Line limit | SKILL.md under 500 lines (soft), under 600 lines (hard) | Warning / Error |
| No README.md | Skill folders must not contain README.md | Error |
| Scripts executable | All `.sh` files in `scripts/` must have execute permission | Error |
| References exist | Files referenced in SKILL.md body actually exist in `references/` | Warning |
| Description non-empty | Description field is present and non-empty | Error |

### 3. Cross-Reference Validation

Verify that all skills listed in these files actually exist as directories:

- `CLAUDE.md` — Skill References section
- `AGENTS.md` — Skill References section
- `.github/copilot-instructions.md` — Skill References section
- `README.md` — Skills table

Also verify reverse: every skill directory is listed in all four files.

### 4. Hook Script Testing

For each skill with a `scripts/` directory:

```bash
# Syntax check
bash -n scripts/*.sh

# Verify shebang
head -1 scripts/*.sh | grep -q "^#!/bin/bash"

# Verify executable
test -x scripts/*.sh
```

### 5. Plugin Skill Validation

For skills that exist in both `skills/` and `plugin/skills/`:

| Check | Rule |
|-------|------|
| Plugin frontmatter keys | Only Claude Code-specific keys (`hooks`, `user-invocable`, `argument-hint`) added beyond spec |
| Content alignment | Body content matches or plugin has extracted references |
| Beta markers consistent | If `skills/` copy has `[Beta]`, plugin copy should too |

## Output Format

```markdown
## Skill Test Results

**Date:** YYYY-MM-DD
**Skills tested:** N
**Passed:** N
**Warnings:** N
**Failed:** N

### Failures
- [skill-name]: [check]: [error message]

### Warnings
- [skill-name]: [check]: [warning message]

### All Passed
- [list of clean skills]
```

## Running

Invoke manually:
```
/skill-tester
```

Or run the script directly:
```bash
bash skills/skill-tester/scripts/run-tests.sh
```

## What This Skill Does NOT Do

- Does not test CI skills (use `skill-tester-ci` for those)
- Does not modify skills — reports findings only
- Does not run behavioral evals (trigger testing) — use skill-creator's `run_eval.py` for that
- Does not replace the eval-creator regression framework — this tests skill structure, not promoted rules

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。