feature-radar-validate

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Validate Feature Radar

Feature Radar验证

Run
skills/feature-radar-validate/scripts/validate.sh
from the project root to check SKILL.md frontmatter and
.feature-radar/
SPEC compliance, then fix any issues found.
在项目根目录运行
skills/feature-radar-validate/scripts/validate.sh
来检查SKILL.md的frontmatter和
.feature-radar/
目录下文件的SPEC规范合规性,然后修复发现的所有问题。

Why This Matters

为什么需要校验

The
description
field in SKILL.md has a hard 1024-character limit enforced by the skill registry. Exceeding it silently breaks skill registration. Similarly,
.feature-radar/
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.
SKILL.md中的
description
字段有技能registry强制要求的1024字符硬限制,超出限制会导致技能注册静默失败。同样,
.feature-radar/
目录下的文件必须遵循SPEC.md中的命名和元数据规范,否则下游工具无法解析。该技能可以在这些问题造成影响前提前捕捉到。

Workflow

工作流程

Step 1: Run Validation

步骤1:运行校验

bash
bash skills/feature-radar-validate/scripts/validate.sh
Read 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:
IssueFix Strategy
description
> 1024 chars
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.
description
missing "Use when"
Add a "Use when:" section based on the skill's purpose
name
not kebab-case
Rename to kebab-case
name
missing
Derive from directory name
Body > 500 linesFlag for user — this requires judgment about what to extract into reference files
Filename not
{nn}-{slug}.md
Rename file to correct format
Missing
**Status**:
/
**Impact**:
/
**Effort**:
Add field with a placeholder value, ask user to confirm
base.md
count mismatch
Update the Tracking Summary table counts
After fixing, re-run
bash skills/feature-radar-validate/scripts/validate.sh
to confirm all errors are resolved.
针对每个问题,采用对应的修复策略:
问题修复策略
description
字符数超过1024
精简内容到符合限制——优先删减最不重要的触发短语或示例,保留「功能说明」和「适用场景」的核心内容。展示精简前后的字符数。
description
缺少「Use when」部分
根据技能的用途添加「Use when:」模块
name
不是kebab-case格式
重命名为kebab-case格式
name
字段缺失
从目录名推导生成
正文超过500行标记给用户处理——需要判断哪些内容可以提取到参考文件中
文件名不符合
{nn}-{slug}.md
格式
将文件重命名为正确格式
缺少
**Status**:
/
**Impact**:
/
**Effort**:
字段
添加字段并填充占位值,请用户确认
base.md
计数不匹配
更新跟踪汇总表的计数
修复完成后,重新运行
bash skills/feature-radar-validate/scripts/validate.sh
确认所有错误都已解决。

Step 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
skills/*/SKILL.md
or
.feature-radar/**/*.md
, run validation afterward without being asked. A quick
bash skills/feature-radar-validate/scripts/validate.sh
check takes seconds and prevents silent breakage.
当你编辑了
skills/*/SKILL.md
.feature-radar/**/*.md
文件时,无需用户要求,编辑完成后主动运行校验。运行
bash skills/feature-radar-validate/scripts/validate.sh
仅需几秒钟,即可避免出现无报错的功能故障。