bom-slimmer
Skill1.1k starsChanged 14 days agoApache-2.0View on GitHub
Reviews a codebase's direct dependencies and designs lightweight, low-risk, zero-dependency custom replacements using cdxgen SBOM evidence, occurrence/callstack usage data, and license and supply-chain risk evaluation. Use when asked to shrink node_modules, reduce dependency bloat or copyleft exposure, find small or utility packages that could be replaced with built-in code, or replace utility packages with native or built-in implementations. Load it before suggesting any command for that analysis, even when the user only wants to see the commands.
1 other project uses a version of this.
Trending
Quiet this year.about the whole repository
Most recently taken up by
- cdxgen/cdxgenword for word, first seen Oct 8, 2026
Who's talking about CycloneDX/cdxgen
- nodejs/node“npm on Windows fails with module not found for Node.js 22.0.0”GitHub · Apr 25, 2024 · 33 reactions
- CycloneDX/cyclonedx-go“Improve support for the `Component.Evidence.Identity` field in CycloneDX 1.6”GitHub · Jul 30, 2024 · 4 reactions
- cdxgen/cdxgen“Bazel build being run for non-Bazel projects, causing errors”GitHub · Sep 10, 2024 · 3 reactions
- cdxgen/cdxgen“[pnpm] Improve metadata collection with node_modules parsing”GitHub · Aug 7, 2025 · 2 reactions
- cdxgen/cdxgen“Add docs and fix for allowlist of hosts and commands”GitHub · Jun 29, 2025 · 2 reactions
The biggest 5 of 41 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 41
Talked about on GitHub and Bluesky (41 times).
On GitHub · 40
- Apr 25, 2024npm on Windows fails with module not found for Node.js 22.0.0 — nodejs/node33 reactions · 47 comments
- Jul 30, 2024Improve support for the `Component.Evidence.Identity` field in CycloneDX 1.6 — CycloneDX/cyclonedx-go4 reactions · 11 comments
- Sep 10, 2024Bazel build being run for non-Bazel projects, causing errors — cdxgen/cdxgen3 reactions · 3 comments
- Aug 7, 2025[pnpm] Improve metadata collection with node_modules parsing — cdxgen/cdxgen2 reactions · 6 comments
- Jun 29, 2025Add docs and fix for allowlist of hosts and commands — cdxgen/cdxgen2 reactions · 1 comment
35 more on GitHub
- May 1, 2025feat: make bazel query compatible with newer bazel versions and rules… — cdxgen/cdxgen2 reactions · 3 comments
- Oct 27, 2024Run some GitHub action jobs only on main repository — cdxgen/cdxgen2 reactions
- Jul 2, 2024Invalid Dotnet version detected and missing versions for the dependencies — cdxgen/cdxgen2 reactions · 12 comments
- Apr 22, 2024Add support for executing dependencies task in parallel for Gradle — cdxgen/cdxgen2 reactions · 6 comments
- Feb 1, 2024Added support for components properties filter — cdxgen/cdxgen2 reactions · 4 comments
- Dec 23, 2023[core] Improve exclude to match sub-directories — cdxgen/cdxgen2 reactions
- Oct 8, 2023Switching to java 21 — cdxgen/cdxgen2 reactions · 2 comments
- Sep 11, 2023Fix npm package deps tree — cdxgen/cdxgen2 reactions · 13 comments
- Jun 27, 20231.4 compatibility mode — cdxgen/cdxgen2 reactions
- May 26, 2023Even after setting CDX_MAVEN_INCLUDE_TEST_SCOPE=false some of the dependencies of test modules created in BOM — cdxgen/cdxgen2 reactions · 5 comments
- Oct 7, 2025Re-enable license fetching — MediaMarktSaturn/technolinator1 reaction · 1 comment
- Aug 15, 2025Extend data tracked for each package type and ecosystem with extra reference information — package-url/purl-spec1 reaction · 3 comments
- Jun 9, 2025bugfix: normalize component evidence identities to always be array — cdxgen/cdxgen1 reaction
- Jun 8, 2025Fix technique filtering logic by correctly checking for intersection — cdxgen/cdxgen1 reaction
- Apr 15, 2025Ignore uncommented lines in gradle build scripts — cdxgen/cdxgen1 reaction · 3 comments
- Feb 20, 2025Fix pnpm and yarn lock file detection — cdxgen/cdxgen1 reaction
- Jul 24, 2024Speed up SBOM generation by using newest features — apache/airflow1 reaction
- Jul 2, 2024Do not aggressively exclude while dealing with java projects — cdxgen/cdxgen1 reaction · 4 comments
- May 30, 2024Sanitize externalReferences URLs and exclude invalid ones + Strict JSON Schema validation — cdxgen/cdxgen1 reaction · 13 comments
- May 20, 2024Fix: Split linux-tests job into two jobs — cdxgen/cdxgen1 reaction
- Apr 30, 2024Adds a new workflow to generate SBOM — DefectDojo/django-DefectDojo1 reaction · 4 comments
- Apr 18, 2024Regenerate lock file and types. Adds vuln scanning — cdxgen/cdxgen1 reaction
- Mar 27, 2024cdx 1.6 spec support with some goodies — cdxgen/cdxgen1 reaction · 5 comments
- Jan 27, 2024Make 10.x branch the default — cdxgen/cdxgen1 reaction · 1 comment
- Jan 27, 2024Remove xml format — cdxgen/cdxgen1 reaction
- Nov 21, 2023Feature/nydus demo — cdxgen/cdxgen1 reaction
- Nov 16, 2023Fixes for Server params — cdxgen/cdxgen1 reaction · 5 comments
- Nov 15, 2023Support for private docker registry — cdxgen/cdxgen1 reaction · 2 comments
- Oct 23, 2023Generated license sometimes not valid according to BOM schema — cdxgen/cdxgen1 reaction · 6 comments
- Oct 12, 2023Filters and config files support — cdxgen/cdxgen1 reaction
- Jul 3, 2023MINOR: 9.1.0 release with deno, evidences and python dependency tree. 1 BREAKING change — cdxgen/cdxgen1 reaction · 2 comments
- Jun 30, 2023Provide possibility to define alternative NUGET API base url — cdxgen/cdxgen1 reaction · 3 comments
- May 29, 2023scanning setup.py doesn't work if "install_requires" is initialized to a variable instead of a list of strings — cdxgen/cdxgen1 reaction · 2 comments
- Mar 7, 2023Rendering multiple Subtrees in dependency tree tab of Dependency tracker — DependencyTrack/dependency-track1 reaction · 4 comments
- Feb 27, 2023Dependency Graph cannot be generated — cdxgen/cdxgen1 reaction · 11 comments
On Bluesky · 1
- Feb 4, 2025The first step towards #crypto #agility is to be able to make an inventory of all your crypto assets. Currently, there are no… — @seceng.bsky.social0 likes and reposts · 2 replies
Other versions1 project uses a version of this.
Word for word · 1
- cdxgen/cdxgen★ 1.1k100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- custom-property-authorSkill
- cyclonedx-spec-reviewerSkill
- ecosystem-onboardingSkill
- sbom-fidelity-loopSkill
- SKILL.mdSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 4 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
Look under bom.metadata.component (the parent package) and trace its relationships in the dependencies array.
- Very specific: line 37
When cdxgen is run under --profile research (or during deep Evinse executions), it populates components with schema-valid occurrences and …
- Very specific: line 39
Occurrences: Check component.evidence.occurrences to find exactly which source files and line numbers import or reference the dependency.
- Very specific: line 40
Callstack: Check component.evidence.callstack to view the execution flows, depth of call paths, and entry points leading to the package.
- Distinctive: line 45
Use the following additional SBOM metadata to guide the business and legal aspects of the replacement:
- Very specific: line 47
Licenses: Check the licenses array of the component.
- Very specific: line 48
Authors and Publishers: Check authors and publisher fields.
- Very specific: line 56
Read the project's manifest (e.g.
- Very specific: line 61
Use occurrences/callstack evidence (if present in the SBOM) or grep to scan the codebase for all references.
- Distinctive: line 65
If the usage is isolated to a single file, utility, or helper function.
- Distinctive: line 79
Compatibility: Ensure the new implementation supports the exact same input/output formats and signatures as the replaced library APIs.
- Distinctive: line 80
Standards: Avoid complex regexes that could cause backtracking vulnerabilities (e.g.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: BOM Slimmer
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.
1. Using cdxgen SBOM as the Authoritative Data Source
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:
- Locate Direct Dependencies:
Look under
bom.metadata.component(the parent package) and trace its relationships in thedependenciesarray. - Trace Dependency Trees:
Find the
dependenciesblock at the root of the SBOM. Each entry maps a packagerefto its direct dependencydependsOnrefs:{ "ref": "pkg:npm/foo@1.0.0", "dependsOn": ["pkg:npm/bar@2.0.0", "pkg:npm/baz@1.5.0"] } - Calculate Transitive Footprint:
For any candidate direct dependency, traverse the
dependsOngraph in the SBOM to identify how many total sub-packages will be completely purged fromnode_modulesif that direct dependency is removed. - Inspect Metadata:
Filter out
type: "development"components or dev-only scopes if you are optimizing production boot time and install footprint.
2. Advanced Analysis Data Points
Note 1: Utilizing Occurrence and Callstack Evidence
When cdxgen is run under --profile research (or during deep Evinse executions), it populates components with schema-valid occurrences and callstacks under evidence:
- Occurrences: Check
component.evidence.occurrencesto find exactly which source files and line numbers import or reference the dependency. - Callstack: Check
component.evidence.callstackto view the execution flows, depth of call paths, and entry points leading to the package. - LLM Action: Parse these arrays to immediately determine the depth and scope of usage without needing manual grep passes. If a package has only a single occurrence at a shallow depth, it is a prime candidate for pruning.
Note 2: Incorporating License, Author, and Publisher Data
Use the following additional SBOM metadata to guide the business and legal aspects of the replacement:
- Licenses: Check the
licensesarray of the component. Replacing copyleft-licensed dependencies (e.g. GPL, LGPL) with a permissive custom implementation is a major compliance win. - Authors and Publishers: Check
authorsandpublisherfields. 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.
3. Step-by-Step Analysis Workflow
Step 1: Mapping the Surface Area
- Read the project's manifest (e.g.
package.json,Cargo.toml,pyproject.toml) and gather the list of direct production dependencies. - Cross-reference this list with
bom.jsonto verify their version and active presence in the dependency graph.
Step 2: Code Search & Usage Audit
- Use occurrences/callstack evidence (if present in the SBOM) or
grepto scan the codebase for all references. - Note:
- Which files import the package.
- Which specific functions/methods are called.
- If the usage is isolated to a single file, utility, or helper function.
Step 3: Assessing Replacement Viability
Evaluate candidates against these key replacement archetypes:
- Native Replacements: The functionality is now natively supported by modern runtimes (e.g. replacing
uuidwithcrypto.randomUUID(),got/axioswith standardfetch, oryoctocolors/picocolorswith standard ANSI sequences). - High-Overhead/Low-Usage Utilities: Packages imported to perform trivial tasks (e.g.
properties-readerto get a single version string, orkeyvto wrap a standardMap). - Complex/Risky Packages: Monolithic parser libraries (like TOML, YAML, HTML parsers, or JSON schema validators). These are High Risk to replace because custom parsers frequently miss edge cases or suffer from performance bugs.
Step 4: Drafting Custom Replacements
For viable candidates, design a zero-dependency JS/TS snippet. Follow these requirements:
- Compatibility: Ensure the new implementation supports the exact same input/output formats and signatures as the replaced library APIs.
- Standards: Avoid complex regexes that could cause backtracking vulnerabilities (e.g. ReDoS). Prefer simple string splitting, slice operations, and standard built-ins.
- Cross-Platform: Support Node.js, Bun, and Deno by using global/web-standard APIs (
globalThis) where possible.
4. Risk Assessment Guide
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. |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

