Files
superpowers-zh/.github/workflows/ci.yml
AI不止语 a9e02b501e chore: 跟上游 v5.1.0 对齐 (#22)
补齐上游漏的根级文件:CLAUDE.md(翻译 + 中文 fork 备注)、
AGENTS.md(symlink → CLAUDE.md,跟上游 mode 120000 一致)、
RELEASE-NOTES.md(上游英文原样 1180 行)、RELEASE-NOTES.zh.md
(新建中文 fork 自身 release log)、.codex-plugin/plugin.json
(中文化)、.version-bump.json、scripts/bump-version.sh、
assets/{app-icon.png,superpowers-small.svg}、4 个上游新增测试。

跟上游意图对齐,删上游已废弃流程:
- commands/ 全 3 个 deprecated stub(上游 #1188)
- agents/code-reviewer.md(已上升进 requesting-code-review skill,
  上游 PR #1299)
- bin/superpowers-zh.js 删 install agents 逻辑,保留 uninstall 用
  hardcoded LEGACY_AGENT_FILENAMES 列表清理已装用户残留
- .github/workflows/ci.yml 删 "Validate agents" 段
- package.json files 字段移除 agents/ commands/

主动修上游 v5.1.0 疏忽:
- .cursor-plugin/plugin.json 删 dangling 的 "agents": "./agents/"
  和 "commands": "./commands/"。上游删目录但忘同步 manifest
  (git blame 显示自 2026-02-13 起从未更新)。

配套:
- scripts/sync-plugin-version.js 扩到 .codex-plugin/plugin.json
- npm pack 校验 90 文件 228KB,agents/commands 残留 0 条

中文版"手动新增"叠加层全部保留:bin/ + npx 流程、docs/、
chinese-* skill、mcp-builder、workflow-runner、README 主推 npx、
各 INSTALL.md、.gemini/、sync-plugin-version.js。

详见 RELEASE-NOTES.zh.md v1.3.0 段。
2026-05-10 22:27:52 +08:00

71 lines
2.1 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
validate:
name: Validate skills and structure
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Count skills
run: |
TOTAL=$(ls -d skills/*/ 2>/dev/null | wc -l)
echo "Total skills: $TOTAL"
ls -d skills/*/
- name: Validate skill frontmatter
run: |
ERRORS=0
for dir in skills/*/; do
SKILL_FILE="${dir}SKILL.md"
if [ ! -f "$SKILL_FILE" ]; then
echo "::error::Missing SKILL.md in $dir"
ERRORS=$((ERRORS + 1))
continue
fi
# Check frontmatter exists
if ! head -1 "$SKILL_FILE" | grep -q '^---'; then
echo "::error file=$SKILL_FILE::Missing frontmatter"
ERRORS=$((ERRORS + 1))
continue
fi
# Check required fields
FRONTMATTER=$(sed -n '1,/^---$/p' "$SKILL_FILE" | tail -n +2)
for field in name description; do
if ! echo "$FRONTMATTER" | grep -q "^${field}:"; then
echo "::error file=$SKILL_FILE::Missing required field: $field"
ERRORS=$((ERRORS + 1))
fi
done
done
if [ $ERRORS -gt 0 ]; then
echo "::error::$ERRORS validation error(s) found"
exit 1
fi
echo "All skills validated successfully"
- name: Check package.json
run: |
node -e "
const pkg = JSON.parse(require('fs').readFileSync('package.json', 'utf8'));
const required = ['name', 'version', 'description', 'license'];
const missing = required.filter(f => !pkg[f]);
if (missing.length) {
console.error('Missing package.json fields:', missing.join(', '));
process.exit(1);
}
console.log('package.json OK:', pkg.name, 'v' + pkg.version);
"
- name: Validate install script
run: node bin/superpowers-zh.js --help