用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/SocketDev/action --skill auditing-api-surface命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 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 Actions permissions/allowlists against the fleet baseline; --conform fixes drift.
基于 SOC 职业分类
正在显示 SKILL.md
| name | auditing-api-surface |
| description | Audit package exports for dead, internal-only, or weakly-consumed subpaths before pruning. |
| user-invocable | true |
| allowed-tools | Read, Grep, Glob, Bash(node:*), Bash(rg:*), Bash(git:*), Bash(gh:*) |
| model | claude-haiku-4-5 |
| context | fork |
| metadata | {"internal":true} |
Find published API that nobody uses. A core infra lib like @socketsecurity/lib
exports 500+ subpaths; some are referenced by no other fleet repo and not even
by the lib's own internals. That dead surface is pure carrying cost — bundle
weight, a wider type-check graph, a tax on every refactor. This skill surfaces
it. Read-only: it reports prune candidates, it never removes an export (mirrors
auditing-gha, which reports drift but flips no setting).
Repo-generic: it reads the host repo's own package.json name + export map, so
the same skill audits any lib-shaped fleet repo. socket-lib is the primary
target; other libs get a meaningful report too.
dead or single-consumer export is a
candidate to remove (major) or inline into its one consumer.trimming-bundle; an unconsumed subpath is
weight no downstream needs.dead row
may be a deliberate public entry point a not-yet-released consumer will use.dead export is safe to remove. The scan sees only the fleet
repos present under $PROJECTS (CI clones the full roster first). A repo on
the roster but absent locally is reported unscanned, and any subpath with an
unscanned repo is classed unverifiable — never silently "dead".consumed. Symbol-level analysis is a future pass.| Class | Meaning | Action |
|---|---|---|
dead | no internal refs, no external consumers, all repos scanned | prune candidate |
single-consumer | exactly one external consumer | candidate to inline there |
internal-only | used inside the lib, by no other repo | keep (flagged for awareness) |
consumed | ≥2 external consumers | healthy, keep |
unverifiable | no consumer found, but a roster repo was unscanned | re-run with that repo cloned |
Both import forms are matched: <pkg>/<subpath> and the -stable alias
<pkg>-stable/<subpath> (every consumer aliases the lib both ways in
pnpm-workspace.yaml).
From the repo being audited:
node .claude/skills/fleet/auditing-api-surface/lib/audit-api-surface.mts --report
Or target a sibling checkout by name (greps the others as consumers):
PROJECTS=~/projects \
node .claude/skills/fleet/auditing-api-surface/lib/audit-api-surface.mts \
--repo socket-lib --report
--report (default) writes .claude/reports/api-surface-audit.md (untracked,
per the report-location rule). --json prints the machine-readable result to
stdout — the cron workflow consumes this to build its issue body.
The report header states the scanned-repo count and the exact import forms
matched. The internal-ref counter is a loose basename match (it errs toward
keeping an export, never toward calling a live one dead). Before acting on a
dead finding, confirm by hand:
rg '@socketsecurity/<pkg>(-stable)?/<subpath>' ~/projects/socket-* --glob '!**/node_modules/**'
A finding is a lead, not a verdict.