fleet-auditing-api-surface

Identifies and classifies unused or dead API export subpaths in libraries via fleet-wide analysis.

125|42|Updated May 19, 2025
One-click install
npx skills add https://github.com/SocketDev/socket-mcp --skill fleet-auditing-api-surface
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fleet-auditing-api-surface
Source: https://github.com/SocketDev/socket-mcp/tree/main/.agents/skills/fleet-auditing-api-surface
Command: npx skills add https://github.com/SocketDev/socket-mcp --skill fleet-auditing-api-surface

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Audits a library's published export surface to identify dead or unconsumed subpaths and measures their impact across fleet repos, enabling non-destructive cleanup.

Core Features & Use Cases

  • Classifies each package.json.exports subpath by usage across fleet repos and references in src/.
  • Generates a ranked report showing dead, single-consumer, internal-only, and consumed subpaths for prioritization.
  • Read-only: reports guide human decision-making before any version bumps or bundle trimming.

Quick Start

Run the audit to generate the api-surface report for your library and review flagged subpaths.

Frequently Asked Questions about fleet-auditing-api-surface

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find unused package.json exports across my repository fleet?

To find unused package.json exports, audit your library's API surface by cross-referencing the exports map and internal src references against fleet repos. This classifies each subpath as dead, single-consumer, internal-only, or consumed for targeted pruning.

What is an API surface audit and when do I need it for my library?

An API surface audit identifies and classifies dead or unconsumed export subpaths in a library. You need it for weekly health checks, pre-release cleanup, or bundle size optimization to safely prune unused code across a fleet.

How do I classify dead versus consumed library exports before pruning?

Classify dead versus consumed library exports by cross-referencing internal src references and fleet repository usage against the exports map. This generates a ranked report categorizing subpaths into dead, single-consumer, internal-only, or consumed.

Does the API surface audit modify my library or is it read-only?

The API surface audit is strictly read-only and does not modify your library. It generates a ranked report of dead, single-consumer, internal-only, and consumed subpaths to guide human decision-making before version bumps or bundle trimming.

Can I run an API surface audit on a single library or does it require a fleet?

An API surface audit requires a fleet of repos to measure consumption impact. It reads the package.json exports map and internal src references, then cross-references fleet repos to classify subpaths and generate a health check report.