/cdxgen:bom-slimmerfrom cdxgen
Reviews direct dependencies via cdxgen SBOM and usage evidence to design zero-dependency replacements, cutting node_modules bloat and copyleft risk.
Ships in cdxgen. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill guides a local LLM through analyzing a project's direct dependencies, identifying high-overhead packages, and designing low-risk, zero-dependency custom replacements.
A CycloneDX SBOM generated by cdxgen (bom.json) provides a complete, normalized, and machine-readable inventory of all direct and transitive dependencies. Use it as your primary source of truth:
bom.metadata.component (the parent package) and trace its relationships in the dependencies array.dependencies block at the root of the SBOM. Each entry maps a package ref to its direct dependency dependsOn refs:
{
"ref": "pkg:npm/[email protected]",
"dependsOn": ["pkg:npm/[email protected]", "pkg:npm/[email protected]"]
}
dependsOn graph in the SBOM to identify how many total sub-packages will be completely purged from node_modules if that direct dependency is removed.type: "development" components or dev-only scopes if you are optimizing production boot time and install footprint.When cdxgen is run under --profile research (or during deep Evinse executions), it populates components with schema-valid occurrences and callstacks under evidence:
component.evidence.occurrences to find exactly which source files and line numbers import or reference the dependency.component.evidence.callstack to view the execution flows, depth of call paths, and entry points leading to the package.Use the following additional SBOM metadata to guide the business and legal aspects of the replacement:
licenses array of the component. Replacing copyleft-licensed dependencies (e.g. GPL, LGPL) with a permissive custom implementation is a major compliance win.authors and publisher fields. Dependencies maintained by single authors or unknown publishers present higher supply chain risk (e.g., maintainer abandonment, malicious takeover) compared to standard built-ins or custom code.package.json, Cargo.toml, pyproject.toml) and gather the list of direct production dependencies.bom.json to verify their version and active presence in the dependency graph.grep to scan the codebase for all references.Evaluate candidates against these key replacement archetypes:
uuid with crypto.randomUUID(), got/axios with standard fetch, or yoctocolors/picocolors with standard ANSI sequences).properties-reader to get a single version string, or keyv to wrap a standard Map).For viable candidates, design a zero-dependency JS/TS snippet. Follow these requirements:
globalThis) where possible.Assign a risk category to each proposed replacement:
| Risk Category | Criteria | Example |
|---|---|---|
| Low Risk | Standard built-in exists; utility does basic string formatting/math; isolated to a single non-critical utility. | Replacing uuid with crypto.randomUUID() or yoctocolors with ANSI codes. |
| Medium Risk | Requires writing custom parsing logic for standard formats; used in core execution paths; handles external network calls. | Replacing cheerio with regex/slicing for HTML page scraping. |
| High Risk | Parser/validation logic for complex, specification-heavy formats; deeply integrated across numerous modules. | Replacing yaml, @babel/parser, or ajv schema validator. |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
dependency-analysis, sbom, cdxgen, node-modules, license-risk
npx claudepluginhub cdxgen/cdxgen --plugin cdxgen14 skills in this plugin
/ai-bomGenerates AI-BOM, MCP inventory, AI skill inventory, and AI authorship provenance documents with cdxgen, cataloging models, inference services, Hugging Face purls, MCP servers and their tools/prompts/resources, agent instruction files, and cdx:ai:codegen provenance signals, then audits them with AI-focused rule packs. Use when asked to inventory AI or ML usage, catalog MCP servers, audit agent instruction or skill files, assess AI supply-chain risk, or detect AI-generated code authorship./bom-auditRuns supply-chain risk analysis on CycloneDX BOMs with cdx-audit predictive auditing and cdxgen --bom-audit embedded rules, covering npm and PyPI package compromise posture, CI permission risk, dependency source integrity, license policy violations, and SARIF or JSON reporting for code scanning. Use when asked to audit an SBOM, assess supply-chain or dependency risk, check for compromised or malicious packages, triage which dependencies to review first, or produce SARIF from a BOM./bom-convert-validateConverts CycloneDX BOMs to SPDX 3.0.1 JSON-LD or between CycloneDX spec versions with cdx-convert, and validates BOMs against JSON schema, deep consistency checks, and OWASP SCVS and EU Cyber Resilience Act compliance benchmarks with cdx-validate, emitting SARIF for code scanning. Use when asked to convert an SBOM to SPDX, downgrade or upgrade a BOM spec version, validate or lint a BOM, check SCVS or CRA compliance, or score SBOM quality./bom-evidenceEnriches an existing CycloneDX BOM with occurrence, callstack, reachability, data-flow, and crypto-flow evidence using cdxgen evinse, including Go analysis via Golem and Rust analysis via Rusi, and produces SaaSBOM service and endpoint inventory. Use when asked which dependencies are actually used or reachable, for callstack or usage evidence, a SaaSBOM, API endpoint inventory, data-flow or taint analysis, or to distinguish real from declared dependency usage, or what Golem found in a Go project, including requests to show Golem's raw values./bom-exploreExplores and triages a CycloneDX BOM interactively with the cdxi REPL, using built-in commands for dependency trees, licenses, services, cryptographic assets, audit findings, evidence occurrences and callstacks, unpackaged container binaries, HBOM and OBOM categories, and Golem or Cargo hotspots. Use when asked to inspect, query, summarize, or triage an existing BOM, find what is inside an SBOM, or answer ad hoc questions about BOM contents without writing scripts./bom-signingSigns and verifies CycloneDX BOMs using cdxgen's native JSON Signature Format (JSF) implementation via cdx-sign and cdx-verify, supporting granular component, service, and annotation signatures, parallel multi-signatures, and sequential signature chains. Use when asked to sign an SBOM, verify a BOM signature, establish BOM authenticity or non-repudiation, build an approval trail across pipeline stages, or generate signing keys.Other plugins' skills for the same job