用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/SocketDev/action --skill tidying-rolldown-bundles命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Propagate a wheelhouse template change across fleet repos: worktrees, push/PR fallback, cleanup.
Run this repo's GitHub Actions locally with Agent-CI before pushing CI-sensitive changes.
Audit package exports for dead, internal-only, or weakly-consumed subpaths before pruning.
基于 SOC 职业分类
正在显示 SKILL.md
| name | tidying-rolldown-bundles |
| description | Keep rolldown bundles lean by reporting collapsible deps, catalog drift, and fat external shims. |
| user-invocable | true |
| allowed-tools | Bash(node:*), Bash(pnpm dedupe:*), Bash(pnpm run build:*), Read |
| model | claude-haiku-4-5 |
| context | fork |
| metadata | {"internal":true} |
The fleet's rolldown bundle repos (socket-lib's external/ surface today) accrete
two kinds of dependency drift: lockfile transitives that pnpm can collapse, and the
slow risk that an external/<dep>.js re-export shim stops delegating to a shared
*-pack bundle and starts re-vendoring its own tree. This skill is the conservative,
no-prompt sweep that keeps both in check — the tidying-* family member for bundles.
/loop).# Dry-run (default): report dedupe opportunities + override drift + fat shims.
node .claude/skills/fleet/tidying-rolldown-bundles/lib/tidy-rolldown-bundles.mts
# Act: also run `pnpm dedupe` for the repos with collapsible transitives.
node .claude/skills/fleet/tidying-rolldown-bundles/lib/tidy-rolldown-bundles.mts --fix
# One repo.
node .claude/skills/fleet/tidying-rolldown-bundles/lib/tidy-rolldown-bundles.mts --repo socket-lib
Reads the canonical roster from cascading-fleet/lib/fleet-repos.txt; resolves repos
under $PROJECTS (default ~/projects). Repos without an external/ dir or a
scripts/bundle.mts are skipped.
/loop 12h /fleet:tidying-rolldown-bundles --fix
The conservative contract makes an unattended --fix safe: its only mutation is
pnpm dedupe, whose effect is lockfile-only — the published artifact is unchanged.
pnpm dedupe --check reports collapsible transitives.
Under --fix, runs pnpm dedupe (lockfile-only). Re-run the bundle build after
to confirm the externals still load.@socketsecurity/*,
@socketregistry/*) is referenced but not routed through a catalog: override, so
it can float to a duplicate version. Reported (not auto-fixed — the override block is
fleet-canonical, sync-managed).external/<dep>.js exceeds the re-export-shim size cap, meaning it
likely re-vendors its own tree instead of delegating to a shared *-pack bundle
— the *-pack.js consolidation bundles are exempt. Reported for a human.The fleet's external/ bundles already dedupe by design: shared deps are consolidated
into mega-bundles (socket-lib's npm-pack / external-pack), and the per-dep files are
thin re-export shims — module.exports = require('./npm-pack').semver. So a shared dep
like semver exists once, not once per consumer. This sweep's job is to keep it that way
(catch a shim that regresses to fat) and to collapse the lockfile transitives that
accumulate around the bundle, not to re-architect the consolidation.
pnpm dedupe (lockfile-only); override + fat-shim findings are
reported for a human to act on.--fix opts into the dedupe.--fix dedupe, the operator (or the skill's caller) rebuilds the affected
bundle to confirm the externals still load — a dedupe shifts resolved versions.