feature-radar-validate
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseValidate Feature Radar
Feature Radar验证
Run from the project root to check SKILL.md frontmatter and SPEC compliance, then fix any issues found.
skills/feature-radar-validate/scripts/validate.sh.feature-radar/在项目根目录运行来检查SKILL.md的frontmatter和目录下文件的SPEC规范合规性,然后修复发现的所有问题。
skills/feature-radar-validate/scripts/validate.sh.feature-radar/Why This Matters
为什么需要校验
The field in SKILL.md has a hard 1024-character limit enforced by the skill registry. Exceeding it silently breaks skill registration. Similarly, files must follow SPEC.md naming and metadata conventions or downstream tools can't parse them. This skill catches these issues before they cause problems.
description.feature-radar/SKILL.md中的字段有技能registry强制要求的1024字符硬限制,超出限制会导致技能注册静默失败。同样,目录下的文件必须遵循SPEC.md中的命名和元数据规范,否则下游工具无法解析。该技能可以在这些问题造成影响前提前捕捉到。
description.feature-radar/Workflow
工作流程
Step 1: Run Validation
步骤1:运行校验
bash
bash skills/feature-radar-validate/scripts/validate.shRead the full output. Note the exit code:
- Exit 0: all checks passed (may still have warnings)
- Exit 1: errors found — must be fixed
bash
bash skills/feature-radar-validate/scripts/validate.sh查看完整输出,留意退出码:
- 退出码 0:所有检查通过(可能仍有警告)
- 退出码 1:发现错误——必须修复
Step 2: Report Results
步骤2:报告结果
Present the results clearly:
── Feature Radar: Validate ──
Errors: {n}
Warnings: {n}
{List each error/warning with file path and issue}If everything passes, say so and stop. No further action needed.
清晰呈现校验结果:
── Feature Radar: Validate ──
Errors: {n}
Warnings: {n}
{List each error/warning with file path and issue}如果所有检查都通过,告知用户即可,无需后续操作。
Step 3: Auto-Fix (if errors or warnings found)
步骤3:自动修复(如果发现错误或警告)
For each issue, apply the appropriate fix:
| Issue | Fix Strategy |
|---|---|
| Trim to fit — cut the least essential trigger phrases or examples first, keep the core "what it does" and "Use when" intact. Show before/after char count. |
| Add a "Use when:" section based on the skill's purpose |
| Rename to kebab-case |
| Derive from directory name |
| Body > 500 lines | Flag for user — this requires judgment about what to extract into reference files |
Filename not | Rename file to correct format |
Missing | Add field with a placeholder value, ask user to confirm |
| Update the Tracking Summary table counts |
After fixing, re-run to confirm all errors are resolved.
bash skills/feature-radar-validate/scripts/validate.sh针对每个问题,采用对应的修复策略:
| 问题 | 修复策略 |
|---|---|
| 精简内容到符合限制——优先删减最不重要的触发短语或示例,保留「功能说明」和「适用场景」的核心内容。展示精简前后的字符数。 |
| 根据技能的用途添加「Use when:」模块 |
| 重命名为kebab-case格式 |
| 从目录名推导生成 |
| 正文超过500行 | 标记给用户处理——需要判断哪些内容可以提取到参考文件中 |
文件名不符合 | 将文件重命名为正确格式 |
缺少 | 添加字段并填充占位值,请用户确认 |
| 更新跟踪汇总表的计数 |
修复完成后,重新运行确认所有错误都已解决。
bash skills/feature-radar-validate/scripts/validate.shStep 4: Completion Summary
步骤4:完成总结
── Feature Radar: Validate Complete ──
Files fixed: ~ {path} ({what changed})
Errors fixed: {n}
Warnings fixed: {n}
Remaining: {n} (need user input)── Feature Radar: Validate Complete ──
Files fixed: ~ {path} ({what changed})
Errors fixed: {n}
Warnings fixed: {n}
Remaining: {n} (need user input)Proactive Triggering
主动触发场景
When you notice yourself editing or , run validation afterward without being asked. A quick check takes seconds and prevents silent breakage.
skills/*/SKILL.md.feature-radar/**/*.mdbash skills/feature-radar-validate/scripts/validate.sh当你编辑了或文件时,无需用户要求,编辑完成后主动运行校验。运行仅需几秒钟,即可避免出现无报错的功能故障。
skills/*/SKILL.md.feature-radar/**/*.mdbash skills/feature-radar-validate/scripts/validate.sh