skill-reviewer
Reviews and improves Claude Code skills against official best practices. Supports three modes - self-review (validate your own skills), external review (evaluate others' skills), and auto-PR (fork, improve, submit). Use when checking skill quality, reviewing skill repositories, or contributing improvements to open-source skills.
1How It Works & Mechanism
The automated review core is the executable script review_skill.py: it performs static checks on the target skill directory (frontmatter quality, directory structure, SKILL.md < 500 lines, hardcoded path/secret regexes, script hygiene, subagent_type validity, and instruction style heuristics), while delegating YAML/schema/internal path validation to the canonical validator in the companion skill-creator.
The reviewer delegates YAML, schema, and internal-path validation to the canonical `skill-creator` validator bundled in the same suite. It then checks frontmatter quality, directory structure, SKILL.md size, hardcoded paths and secrets, script hygiene, `subagent_type` validity, and instruction-style heuristics.
Static rule implementation: PATH_PATTERNS (/Users/, /home/, C:\Users\ absolute path regexes) and SECRET_PATTERNS (api_key/token/password assignments, sk-, ghp_ prefixes) make 'hardcoded paths and secrets' machine-checkable; script hygiene uses ast parsing to detect bare except statements and flags requests/httpx imports for dependency registration.
SECRET_PATTERNS = [ re.compile( r"\b(?:api[_-]?key|secret[_-]?key|password|token)\b" r"\s*[:=]\s*['\"](?P<value>[^'\"]{8,})['\"]", re.IGNORECASE, ), re.compile(r"(?P<value>sk-[A-Za-z0-9]{20,})"), re.compile(r"(?P<value>ghp_[A-Za-z0-9]{36})"), ]
Three-mode routing: self-review (script + skill-creator security_scan + manual checklist), external review (clone repository to /tmp → read all documentation first → identify author intent → run checklist → generate improvement report), and auto-PR (gh fork → additive improvements → self-review respect check → submit PR).
Auto-PR Workflow: - [ ] Fork repository (gh repo fork) - [ ] Create feature branch - [ ] Apply additive improvements only - [ ] Self-review: respect check passed? - [ ] Create PR with detailed explanation
The review philosophy is embedded as a 'Respect Check' list and PR tone discipline: PRs targeting others' skills are strictly additive, include a 'What's NOT Changed' section, and maintain a tone focused on discoverability rather than critique.
❌ "Your skill doesn't follow best practices" ✅ "This PR aligns with best practices for better discoverability"
Explicit capability boundaries: validating marketplace.json plugin boundaries and layouts falls under the domain of the marketplace-dev skill; rather than overstepping to reinvent templates, this skill directs users to daymade-claude-code:marketplace-dev in the same repository.
skill's domain — don't author it from a template here.
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| package | PyYAML(经 uv run --with PyYAML 从 PyPI 现场提供) |
| cli | uv(依赖提供与脚本运行) |
| cli | gh(仅 Mode 3 auto-PR:fork/分支/PR,用户显式选用时执行) |
| cli | git(Mode 2/3 克隆外部仓库到 /tmp) |
| package | skill-creator 同套件脚本(quick_validate.py / security_scan.py,sibling 依赖) |
4Recommended Governance & Evidence
- scripts/: Executes local scripts or commands: scripts/review_skill.py (python3 via uv; executes read-only static checks on target skill directories)
- 网络端点: Declares external network access: uv fetches PyYAML from PyPI (on initial run)
- 本地工作目录: File read/write and artifact output: Mode 2/3 (when selected by user): clones repositories under /tmp, creates branches, and pushes additive changes
5Second-Pass Verification
- [ok] 委托 skill-creator validator 且不执行被评脚本 — subprocess.run 仅 [sys.executable, validator, skill_path];validator 路径 = parents[2]/skill-creator/scripts/quick_validate.py;同套件 skill-creator 目录真实存在。
- [ok] 密钥/硬编码路径机检规则 — PATH_PATTERNS 三平台绝对路径正则、SECRET_PATTERNS(key/token/password 赋值 + sk- + ghp_)、PLACEHOLDER_SECRET_PATTERNS 均在源码中逐字可查。
- [ok] 三模式与 additive-only 原则 — SKILL.md Mode 1/2/3 章节 + 'Core Principle: Additive Only'(NEVER Delete existing files…ALWAYS Add new capabilities)与 Auto-PR Workflow 清单一致。
- [ok] 退出码契约 — EXIT_CLEAN/EXIT_WARNINGS/EXIT_FINDINGS/EXIT_OPERATIONAL = 0/1/2/3 常量 + SKILL.md 说明一致。
- [ok] 网络/凭证反例搜索 — review_skill.py 无网络代码、无凭证读取、无 shell=True;唯一外部依赖是 uv 提供 PyYAML;gh/git 动作仅在 SKILL.md Mode 2/3 的模型执行清单里(用户显式选用)。
- [ok] 功能声明 vs 实际能力夸大检查 — description『Reviews and improves Claude Code skills against official best practices』——review 由脚本+清单兑现,improve 走 additive PR 流程;不声称自动化重写或深度安全渗透(后者显式指向 skill-creator security_scan)。
- [ok] 元数据(commit/license/stars) — 本地 HEAD == pin d5c4678cb5d4fd6acc9c922690df035dbd33d247;GitHub API:MIT、stars 1385(2026-09-09 实采)、pushed_at 2026-09-09T12:33:29Z。
6Verdict & Scenarios
faaf2fe7a6e55ee9…