umbraco-skill-validator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill Content Validator
Skill内容验证器
Validates all SKILL.md files in the repository for broken links, missing references, and invalid paths.
验证仓库中所有SKILL.md文件的失效链接、缺失引用和无效路径。
What This Skill Does
本工具功能
- Runs deterministic validation script - Fast, consistent checking of all links
- Generates structured report - JSON output with all issues found
- Spawns fixer subagent - AI-powered fix suggestions for issues
- Presents fix plan - Diff-style changes for approval
- Executes approved fixes - Only applies changes user approves
- 运行确定性验证脚本 - 快速、一致地检查所有链接
- 生成结构化报告 - 包含所有问题的JSON输出
- 启动修复子Agent - 基于AI的问题修复建议
- 展示修复方案 - 以Diff格式呈现变更供审核
- 执行已批准的修复 - 仅应用用户认可的变更
Validation Checks
验证检查项
| Check Type | Description |
|---|---|
| External URLs | HTTP HEAD request to verify accessibility |
| Skill references | Verify referenced skills exist (e.g., |
| Internal links | Check relative paths resolve (e.g., |
| File paths | Verify Umbraco-CMS paths via GitHub API if not local |
| Import paths | Check |
| 检查类型 | 描述 |
|---|---|
| 外部URL | 通过HTTP HEAD请求验证可访问性 |
| Skill引用 | 验证被引用的Skill是否存在(例如: |
| 内部链接 | 检查相对路径是否可解析(例如: |
| 文件路径 | 若本地不存在,通过GitHub API验证Umbraco-CMS路径 |
| 导入路径 | 检查 |
Running the Validator
运行验证器
Via Slash Command
通过Slash命令
/validate-skills/validate-skillsVia Script Directly (CI/CD)
直接通过脚本运行(CI/CD)
bash
cd .claude/skills/umbraco-skill-validator/scripts
npm install
npm run validatebash
cd .claude/skills/umbraco-skill-validator/scripts
npm install
npm run validateReport Format
报告格式
The script outputs JSON that gets formatted as:
markdown
undefined脚本输出的JSON会被格式化为:
markdown
undefinedSkill Validation Report
Skill验证报告
Summary
摘要
- Skills scanned: 25
- Issues found: 3
- Auto-fixable: 2
- 已扫描Skill数量:25
- 发现问题数:3
- 可自动修复数:2
Issues by Skill
各Skill的问题
umbraco-dashboard
umbraco-dashboardumbraco-dashboard
umbraco-dashboard| Line | Type | Issue | Status |
|---|---|---|---|
| 45 | Broken URL | [example-broken-url] returns 404 | :x: |
| 行号 | 类型 | 问题 | 状态 |
|---|---|---|---|
| 45 | 失效URL | [example-broken-url] 返回404 | :x: |
umbraco-tree
umbraco-treeumbraco-tree
umbraco-tree| Line | Type | Issue | Status |
|---|---|---|---|
| 72 | Missing skill | [example-missing-skill] not found | :x: |
undefined| 行号 | 类型 | 问题 | 状态 |
|---|---|---|---|
| 72 | 缺失Skill | [example-missing-skill] 未找到 | :x: |
undefinedFix Plan Format
修复方案格式
When issues are found, the fixer subagent generates:
markdown
undefined当发现问题时,修复子Agent会生成:
markdown
undefinedFix Plan
修复方案
Fix 1: Update broken URL
修复1:更新失效URL
File: plugins/.../umbraco-dashboard/SKILL.md
Line: 45
Action: Replace with current documentation URL
- [Dashboard docs][old-url]
- [Dashboard docs][new-url]
文件: plugins/.../umbraco-dashboard/SKILL.md
行号: 45
操作: 替换为当前文档URL
- [Dashboard文档][old-url]
- [Dashboard文档][new-url]
Approval
审核
- Fix 1: Update broken URL
- Fix 2: ...
undefined- 修复1:更新失效URL
- 修复2: ...
undefinedLink Patterns Detected
可检测的链接模式
External URLs
外部URL
https://docs.umbraco.com/...
https://github.com/umbraco/...https://docs.umbraco.com/...
https://github.com/umbraco/...Skill References
Skill引用
`umbraco-dashboard`
`umbraco-workspace``umbraco-dashboard`
`umbraco-workspace`Internal Pattern Links
内部模式链接
[Pattern Name](patterns/pattern-name.md)
[Example](examples/example-name/)[Pattern Name](patterns/pattern-name.md)
[Example](examples/example-name/)File Paths
文件路径
/Umbraco-CMS/src/Umbraco.Web.UI.Client/...
src/packages/core/.../Umbraco-CMS/src/Umbraco.Web.UI.Client/...
src/packages/core/...Import Paths (in code blocks)
导入路径(代码块中)
typescript
import { ... } from '@umbraco-cms/backoffice/notification';typescript
import { ... } from '@umbraco-cms/backoffice/notification';Workflow Instructions
工作流说明
When this skill is invoked:
-
Run the validation scriptbash
cd .claude/skills/umbraco-skill-validator/scripts npx tsx validate-links.ts -
Read the JSON output from stdout or
validation-report.json -
Format as markdown report using the template above
-
If issues found, spawn theagent:
skill-content-fixer- Pass the JSON report as context
- Request fix suggestions with diffs
-
Present fix plan to user with AskUserQuestion
-
Execute only approved fixes using Edit tool
调用本工具时:
-
运行验证脚本bash
cd .claude/skills/umbraco-skill-validator/scripts npx tsx validate-links.ts -
读取JSON输出 从标准输出或文件
validation-report.json -
格式化为Markdown报告 使用上述模板
-
若发现问题,启动Agent:
skill-content-fixer- 将JSON报告作为上下文传入
- 请求带有Diff的修复建议
-
向用户展示修复方案 并使用AskUserQuestion询问
-
仅执行已批准的修复 使用Edit工具
Edge Cases
边缘情况处理
- Rate limiting: Script batches URL checks with 100ms delays
- Redirects: Reported as warnings with new URL suggestion
- Missing Umbraco-CMS: Falls back to GitHub API
- Timeouts: 5 second timeout per URL request
- Large repos: Processes files in batches of 10
- 速率限制:脚本将URL检查分批处理,每批间隔100ms
- 重定向:作为警告报告并建议新URL
- 缺失Umbraco-CMS:回退使用GitHub API
- 超时:每个URL请求超时时间为5秒
- 大型仓库:按每批10个文件处理