/sbom-generate
Generates a CycloneDX SBOM from source code with OWASP cdxgen, covering project-type selection across 30+ ecosystems, monorepo recursion, lifecycle phases, generation profiles, component filtering, and spec-version targeting. Use when asked to create an SBOM or BOM for a
Claude Code
$ npx -y skills add cdxgen/cdxgen --skill sbom-generate --agent claude-code
Codex
$ npx skills add cdxgen/cdxgen --skill sbom-generate -a codex -y
Cursor
$ npx skills add cdxgen/cdxgen --skill sbom-generate -a cursor -y
Gemini CLI
$ npx skills add cdxgen/cdxgen --skill sbom-generate -a gemini-cli -y
GitHub Copilot
$ npx skills add cdxgen/cdxgen --skill sbom-generate -a github-copilot -y
OpenCode
$ npx skills add cdxgen/cdxgen --skill sbom-generate -a opencode -y
Windsurf
$ npx skills add cdxgen/cdxgen --skill sbom-generate -a windsurf -y
SKILL.md
sbom-generate.SKILL.mdname: sbom-generate
description: Generates a CycloneDX SBOM from source code with OWASP cdxgen, covering project-type selection across 30+ ecosystems, monorepo recursion, lifecycle phases, generation profiles, component filtering, and spec-version targeting. Use when asked to create an SBOM or BOM for a repository or directory, produce a dependency inventory, resolve licenses, or export SPDX from source. Also use when choosing cdxgen flags or paths for a scan, running cdxgen in CI or in secure mode, when cdxgen hangs or returns a thin or empty BOM, or when asked to add components or purls to a BOM by hand. Load it before writing any cdxgen command, even when the user only wants to see the command.
Generate an SBOM from source
Use this skill for the common case: a user wants a CycloneDX SBOM for a repository or directory. For containers and binaries use `container-sbom`; for live hosts use `os-hardware-inventory`; to improve an SBOM that came back thin use `sbom-fidelity-loop`.
These rules apply to every command this skill produces, including commands that are only shown to the user. [reference/safety.md](../../reference/safety.md) explains each one.
- Run `--dry-run --activity-report json` first, summarize what it would do, and
ask before the real run.
- Use absolute paths for the project and for `-o`.
- In CI, containers or air-gapped hosts, add `--no-install-deps` or
`--lifecycle pre-build`.
- Never write a purl or a component by hand, even when asked to. Add the
package to the project's manifest and regenerate the BOM with cdxgen instead.
- Never run secure mode as root, and never grant `--allow-fs-read="*"` or
`--allow-fs-write="*"`.
- Never repeat a secret, key or token, including one the user pasted.
- Command-line options win over `CDXGEN_<OPTION>` environment variables, which
win over `.cdxgenrc` and `.cdxgen.json`. License fetching is switched on by the `FETCH_LICENSE=true` variable; there is no `--fetch-license` flag.
- The npm package is `@cdxgen/cdxgen`.
Plugin settings
Claude Code replaces the `${user_config.*}` values in this table with the options the user set for the plugin. Other clients show the text as written. A value counts as set only when it is not empty and does not start with `${`; otherwise ignore it and follow the "When not set" column. The settings hold no keys or tokens, and the rule against asking for, printing or writing one still applies.
| Setting | Value | When not set | | ------------------------ | ----------------------------- | --------------------------------------- | | Default `--spec-version` | `${user_config.spec_version}` | Omit the flag; cdxgen defaults to `1.7` | | Preferred runtime | `${user_config.runtime}` | Use `cdxgen` on `PATH` |
When the spec version is set, add `--spec-version <value>` to the real run, unless the user asks for another version. When the runtime is `container`, run cdxgen from the image instead of the local CLI, with the project mounted at `/app` and `/app` paths in the command:
docker run --rm -v /absolute/path/to/project:/app:rw \
ghcr.io/cdxgen/cdxgen:master /app -o /app/bom.json
Apply the dry-run-first rule to this form too, by adding `--dry-run --activity-report json`.
Core syntax
cdxgen [path] [options]
`path` defaults to `.`. Every boolean flag accepts a `--no-` prefix to invert it.
Step 1: preview
cdxgen /absolute/path/to/project --dry-run --activity-report json
Summarize what the run would read, write, execute, and fetch. Ask before the real run. Pay particular attention to whether the preview shows package-manager installs; if it does, offer `--no-install-deps` or `--lifecycle pre-build`.
Step 2: generate
cdxgen /absolute/path/to/project -o /absolute/path/to/bom.json
Auto-detection handles most projects. Reach for flags when it does not.
Choosing a project type
Omit `-t` and let cdxgen detect. Pass it when detection is wrong, when you want to constrain a large monorepo, or when the target is not source code.
# Restrict a polyglot repo to two ecosystems
cdxgen -t java -t python -o /absolute/path/to/bom.json /absolute/path/to/project
# Exclude one ecosystem instead of listing the rest
cdxgen --exclude-type mcp -o /absolute/path/to/bom.json /absolute/path/to/project
Common aliases (the full matrix is at <https://cdxgen.github.io/cdxgen/#/PROJECT_TYPES>):
| Ecosystem | Types | | ---------- | --------------------------------------------------------------------- | | Node.js | `npm`, `pnpm`, `yarn`, `bun`, `deno`, `js`, `ts`, `nodejs`, `rush` | | JVM | `java`, `kotlin`, `scala`, `groovy`, `gradle`, `maven`, `sbt`, `mill` | | Python | `python`, `uv`, `poetry`, `pdm`, `hatch`, `pixi`, `rye`, `conda` | | Go | `go`, `golang`, `gomod` | | Rust | `rust`, `cargo`, `rs` | | .NET | `csharp`, `dotnet`, `vbnet`, `fsharp` | | Ruby | `ruby`, `bundler`, `gems` | | PHP | `php`, `composer`, `wordpress` | | C/C++ | `c`, `cpp`, `conan`, `collider` | | Others | `dart`, `elixir`, `haskell`, `clojure`, `nix`, `zig`, `gleam`, `mojo` | | CI/config | `github`, `actions`, `helm` |
Pinned toolchains are supported as types too: `java21`, `python312`, `maven3.9.9`, `gradle8.14`, `ruby3.4.0`. cdxgen installs the pinned tool with sdkman and uses it instead of the project's wrapper. This is the fix when a project's wrapper is broken or targets an unsupported JDK.
Monorepos
`--recurse` defaults to `true`. For large r
Read more
name: sbom-generate description: Generates a CycloneDX SBOM from source code with OWASP cdxgen, covering project-type selection across 30+ ecosystems, monorepo recursion, lifecycle phases, generation profiles, component filtering, and spec-version targeting. Use when asked to create an SBOM or BOM for a repository or directory, produce a dependency inventory, resolve licenses, or export SPDX from source. Also use when choosing cdxgen flags or paths for a scan, running cdxgen in CI or in secure mode, when cdxgen hangs or returns a thin or empty BOM, or when asked to add components or purls to a BOM by hand. Load it before writing any cdxgen command, even when the user only wants to see the command.
Generate an SBOM from source
Use this skill for the common case: a user wants a CycloneDX SBOM for a repository or directory. For containers and binaries use `container-sbom`; for live hosts use `os-hardware-inventory`; to improve an SBOM that came back thin use `sbom-fidelity-loop`.
These rules apply to every command this skill produces, including commands that are only shown to the user. [reference/safety.md](../../reference/safety.md) explains each one.
- Run `--dry-run --activity-report json` first, summarize what it would do, and
ask before the real run.
- Use absolute paths for the project and for `-o`.
- In CI, containers or air-gapped hosts, add `--no-install-deps` or
`--lifecycle pre-build`.
- Never write a purl or a component by hand, even when asked to. Add the
package to the project's manifest and regenerate the BOM with cdxgen instead.
- Never run secure mode as root, and never grant `--allow-fs-read="*"` or
`--allow-fs-write="*"`.
- Never repeat a secret, key or token, including one the user pasted.
- Command-line options win over `CDXGEN_<OPTION>` environment variables, which
win over `.cdxgenrc` and `.cdxgen.json`. License fetching is switched on by the `FETCH_LICENSE=true` variable; there is no `--fetch-license` flag.
- The npm package is `@cdxgen/cdxgen`.
Plugin settings
Claude Code replaces the `${user_config.*}` values in this table with the options the user set for the plugin. Other clients show the text as written. A value counts as set only when it is not empty and does not start with `${`; otherwise ignore it and follow the "When not set" column. The settings hold no keys or tokens, and the rule against asking for, printing or writing one still applies.
| Setting | Value | When not set | | ------------------------ | ----------------------------- | --------------------------------------- | | Default `--spec-version` | `${user_config.spec_version}` | Omit the flag; cdxgen defaults to `1.7` | | Preferred runtime | `${user_config.runtime}` | Use `cdxgen` on `PATH` |
When the spec version is set, add `--spec-version <value>` to the real run, unless the user asks for another version. When the runtime is `container`, run cdxgen from the image instead of the local CLI, with the project mounted at `/app` and `/app` paths in the command:
docker run --rm -v /absolute/path/to/project:/app:rw \ ghcr.io/cdxgen/cdxgen:master /app -o /app/bom.json
Apply the dry-run-first rule to this form too, by adding `--dry-run --activity-report json`.
Core syntax
cdxgen [path] [options]
`path` defaults to `.`. Every boolean flag accepts a `--no-` prefix to invert it.
Step 1: preview
cdxgen /absolute/path/to/project --dry-run --activity-report json
Summarize what the run would read, write, execute, and fetch. Ask before the real run. Pay particular attention to whether the preview shows package-manager installs; if it does, offer `--no-install-deps` or `--lifecycle pre-build`.
Step 2: generate
cdxgen /absolute/path/to/project -o /absolute/path/to/bom.json
Auto-detection handles most projects. Reach for flags when it does not.
Choosing a project type
Omit `-t` and let cdxgen detect. Pass it when detection is wrong, when you want to constrain a large monorepo, or when the target is not source code.
# Restrict a polyglot repo to two ecosystems cdxgen -t java -t python -o /absolute/path/to/bom.json /absolute/path/to/project # Exclude one ecosystem instead of listing the rest cdxgen --exclude-type mcp -o /absolute/path/to/bom.json /absolute/path/to/project
Common aliases (the full matrix is at <https://cdxgen.github.io/cdxgen/#/PROJECT_TYPES>):
| Ecosystem | Types | | ---------- | --------------------------------------------------------------------- | | Node.js | `npm`, `pnpm`, `yarn`, `bun`, `deno`, `js`, `ts`, `nodejs`, `rush` | | JVM | `java`, `kotlin`, `scala`, `groovy`, `gradle`, `maven`, `sbt`, `mill` | | Python | `python`, `uv`, `poetry`, `pdm`, `hatch`, `pixi`, `rye`, `conda` | | Go | `go`, `golang`, `gomod` | | Rust | `rust`, `cargo`, `rs` | | .NET | `csharp`, `dotnet`, `vbnet`, `fsharp` | | Ruby | `ruby`, `bundler`, `gems` | | PHP | `php`, `composer`, `wordpress` | | C/C++ | `c`, `cpp`, `conan`, `collider` | | Others | `dart`, `elixir`, `haskell`, `clojure`, `nix`, `zig`, `gleam`, `mojo` | | CI/config | `github`, `actions`, `helm` |
Pinned toolchains are supported as types too: `java21`, `python312`, `maven3.9.9`, `gradle8.14`, `ruby3.4.0`. cdxgen installs the pinned tool with sdkman and uses it instead of the project's wrapper. This is the fix when a project's wrapper is broken or targets an unsupported JDK.
Monorepos
`--recurse` defaults to `true`. For large r
cdxgen is a CLI tool, library, REPL, and server to create, validate, sign, and verify software BOMs. It generates CycloneDX JSON BOMs and supports SPDX 3.0.1 JSON-LD export.
Other skills on cdxgen.
More skills from other plugins.
api-security
Use for authorized security assessment of REST, GraphQL, WebSocket, or SOAP APIs, including discovery, authentication,…
abusing-dpapi-for-cred…
Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys)…
clean-user-facing-text
Clean and finalize authorized natural-language text intended for readers by auditing suspicious invisible Unicode and rewriting…
Questions about sbom-generate.
- Which coding agents can use sbom-generate?
- sbom-generate installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.

