用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/SocketDev/socket-btm --skill updating-coverage命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Run this repo's GitHub Actions locally with Agent-CI before pushing CI-sensitive changes.
Audit Actions permissions/allowlists against the fleet baseline; --conform fixes drift.
Propagate a wheelhouse template change across fleet repos: worktrees, push/PR fallback, cleanup.
基于 SOC 职业分类
正在显示 SKILL.md
| name | updating-coverage |
| description | Refresh the README coverage badge by running coverage and rewriting the shields.io badge line. |
| user-invocable | true |
| allowed-tools | Read, Bash(pnpm run cover:*), Bash(pnpm run coverage:*), Bash(pnpm run test:cover:*), Bash(node:*), Bash(git:*) |
| model | claude-haiku-4-5 |
| context | fork |
| metadata | {"internal":true} |
Runs the repo's coverage script and rewrites the README badge so the published number matches reality. Invoked directly via /update-coverage or as a phase of the updating umbrella.
updating umbrella flow when the repo declares a
coverage script.package.json, the skill reports that and exits.README.md is
rewritten. Nested READMEs under packages/* have their own
badges and lifecycles.| # | Phase | Outcome |
|---|---|---|
| 1 | Discovery | Find the coverage script in package.json (cover / coverage / test:cover, in that preference). |
| 2 | Run | pnpm run <script>. Fail loudly if the run errors. |
| 3 | Rewrite | node scripts/fleet/gen/coverage-badge.mts — reads .cache/fleet/coverage/coverage-summary.json, rewrites the badge. |
| 4 | Commit | docs(readme): refresh coverage badge to N%. Direct-push per fleet norm. |
The parse + rewrite math (read the summary, round the percent, pick the color bucket, edit the README) is owned by scripts/fleet/gen/coverage-badge.mts and its lib scripts/fleet/lib/coverage-badge.mts — the same owner the commit-time gate scripts/fleet/check/coverage-badge-is-current.mts reads. This skill never re-derives the number or the format in shell; if it did, the badge it wrote (e.g. two decimals, a hard-coded color) would be rejected by check --all. The skill is orchestration over those scripts; the judgment it keeps is surfacing a real coverage-run failure.
node -e "import('./scripts/fleet/lib/coverage-badge.mts').then(m => { const s = m.coverageScriptName(process.cwd()); if (!s) { process.exit(1) } console.log(s) })"
coverageScriptName returns the first of cover / coverage / test:cover declared in package.json, or exits non-zero when the repo tracks no coverage. That is not a failure mode — many fleet repos don't track coverage; the skill exits cleanly.
pnpm run <SCRIPT>
Use the standard pnpm runner so the repo's own env config (catalog versions, etc.) applies. A real coverage-run failure is surfaced, not swallowed — that's the judgment this skill keeps.
node scripts/fleet/gen/coverage-badge.mts
This reads .cache/fleet/coverage/coverage-summary.json (the json-summary reporter's output) and rewrites the README badge in place: the percent is Math.round-ed to an integer and the color is the bucket badgeColor computes (red → brightgreen). Exit 0 = written or already current; exit 1 = no coverage data / no badge to fill. To see the before value first, run node scripts/fleet/gen/coverage-badge.mts --check — the dry-run the gate uses — and read its output.
The canonical badge line in README.md is the placeholder a seeded repo ships:

The script fills <PCT> (and updates the color); the %25 is URL-encoded % and is left alone.
git add README.md
git commit -m "docs(readme): refresh coverage badge to <N>%"
git push origin <default-branch>
Direct-push per the fleet's Commits & PRs → Push policy rule; fall back to PR if the remote rejects.
When called via /update-coverage, emit a one-line summary of the integer percent before → after (read from the --check run). When no coverage script exists or the percentage is unchanged, exit silently.
.claude/skills/updating/SKILL.md: umbrella that calls this skill when applicable..claude/skills/updating-security/SKILL.md: sibling under updating.template/README.md: canonical README skeleton ships the placeholder badge.