SPDX
SPDX (System Package Data Exchange, formerly Software Package Data Exchange) is the Linux Foundation's open standard for bills of materials, licensing and provenance; SPDX 2.2.1 is ISO/IEC 5962:2021. With this skill the agent produces and checks SPDX 3.0 JSON-LD documents, SPDX 2.3 documents, SPDX license expressions and SPDX-License-Identifier tags, and upgrades SPDX 2.x to 3.0.
Follow the workflow below step by step. Every rule here comes from a source in Sources, with the section it cites. When a rule and the pinned source disagree, the source wins; when the source has a newer revision than the pin, follow the refresh steps.
Inputs (fill in, or ask before starting)
- Role: producer (a tool or build that emits SPDX), consumer (a tool that reads or validates it), or source-tree maintainer (license tags only).
- Artifact: an SBOM document, license expressions only, or
SPDX-License-Identifiertags in source files. - Target version: SPDX 3.0 at 3.0.1 (default). SPDX 2.3 is supported: emit it only for a named consumer that cannot read 3.0. SPDX 2.2 and SPDX 2.1 and earlier are legacy: read and upgrade, never author. SPDX 3.1 is a preview (posture: track): never emit
specVersion3.1. License identifiers come from SPDX License List 3.29 (its own family). Seereferences/versions.md. - Serialization: SPDX 3.0 JSON-LD (default), or for 2.3 one of tag:value, JSON, YAML, RDF/XML or spreadsheet.
- Profiles: which SPDX 3.0 profiles the document claims in
profileConformance(at leastcore; usuallysoftwareandsimpleLicensing). - Minimum elements: whether the SBOM must cover the 2021 NTIA or 2026 CISA minimum elements.
- Revision: the pinned revision in Sources, unless the user names another.
- Sources: when refreshing this skill or when a rule looks out of date, re-read every URL in Sources, check the
spdx/spdx-specandspdx/spdx-3-modelreleases for a 3.1 final or a 2.3.1 release, check the License List version, and update the pins.
Invariants
- One SpdxDocument per serialization. A serialization must not contain or define more than one SpdxDocument (3.0.1 Serializations, Serialization information; model
SpdxDocument). - Every Element has
spdxId,typeandcreationInfo.spdxIdis a URI, exactly one;creationInfois exactly one CreationInfo (modelElement). CreationInfo needsspecVersion,createdand at least onecreatedByAgent (modelCreationInfo). - JSON-LD uses the SPDX global context. Every 3.0.1 JSON-LD document references
https://spdx.org/rdf/3.0.1/spdx-context.jsonldin a top-level@context, and must pass both the SPDX JSON Schema and the SPDX OWL ontology with its SHACL shapes (3.0.1 Serializations, JSON-LD context file and JSON-LD validation). - Core is mandatory. Every other profile builds on Core, and naming a profile in
profileConformanceclaims every contained element meets that profile's restrictions (3.0.1 Conformance; modelProfileIdentifierType). - Collections name their roots. An ElementCollection with at least one
elementhas at least onerootElement, and neither may be an SpdxDocument (modelElementCollection). - Unknown is not none. Use
NoAssertionElementorNoAssertionLicensewhen no determination was made, andNoneElementorNoneLicenseonly for a positive "there is none";NoneElementmust be the onlyto(modelRelationship,NoAssertionElement,NoneElement,NoAssertionLicense,NoneLicense). In 2.3 the same split isNOASSERTIONandNONE(2.3 § 7.7, § 7.13, § 11.1). - License expressions follow the ABNF. Whitespace around
WITH, whitespace or parentheses aroundANDandOR, no whitespace before+, one line in tag:value; precedence is+,WITH,AND,OR(3.0.1 Annex SPDX license expressions; 2.3 Annex D). - Identifiers match case-insensitively, operators do not. Write the canonical case from the License List;
LicenseRef-andAdditionRef-prefixes are case-sensitive (3.0.1 license expressions, Case sensitivity). - Every custom license is defined. A
LicenseRef-needs its text:SimpleLicensingTextin 3.0, or License Identifier plus Extracted Text in 2.3 (2.3 § 10.1, § 10.2; model SimpleLicensing). - 2.3 documents are self-identifying.
SPDXVersion: SPDX-2.3,DataLicense: CC0-1.0,SPDXID: SPDXRef-DOCUMENT, a document name, a unique absolute namespace URI without#that changes with every new version, at least one Creator, andCreatedinYYYY-MM-DDThh:mm:ssZ(2.3 § 6.1 to § 6.9).
Workflow
- Pick the version. Use SPDX 3.0 (3.0.1) unless a named consumer only reads 2.3. Pin the License List version too.
->
references/versions.md✓ The target line and License List version are recorded; nothing targets 3.1 or 2.2. - Choose identifiers and licenses. Build each license expression from License List identifiers, exceptions with
WITH, andLicenseRef-orAdditionRef-for anything unlisted. Prefer-onlyand-or-laterGNU identifiers over the deprecated bare ones. ->references/license-expressions.md✓ Every expression parses against the ABNF, and every custom reference has its text. - Tag source files (when asked). Put
SPDX-License-Identifier: <expression>on its own line in a comment at or near the top of each file, and keep the full license text in the project. ->references/license-expressions.md✓ Each tag is one line and uses a valid expression. - Build an SPDX 3.0 document. Write the
@context, one CreationInfo blank node, the Agents, one SpdxDocument withprofileConformanceandrootElement, asoftware_Sbom, the Packages and Files, and Relationships (contains,dependsOn,hasDeclaredLicense,hasConcludedLicense). ->references/spdx3-model.md✓ The document validates against the 3.0.1 JSON Schema and the SHACL shapes, and every reference resolves in the graph or throughimport. - Or build an SPDX 2.3 document (supported consumers only). Fill the creation information, one section per package with its files after it, other licensing information for each
LicenseRef-, and aDESCRIBESrelationship fromSPDXRef-DOCUMENT. ->references/spdx23-documents.md✓ All required fields are present, and the JSON form validates against the 2.3 schema. - Cover the minimum elements when the SBOM must meet them. Map each NTIA 2021 or CISA 2026 element to its SPDX field or property, and fill it or record why it is
NOASSERTION. ->references/sbom-minimum-elements.md✓ Each required element maps to a populated field; the author signature is supplied outside the document. - Consume and validate. Detect the version from
@contextandspecVersion(3.0) orSPDXVersion(2.x); apply case-insensitive identifier matching; treat an omitted optional 2.3 field asNOASSERTION. ->references/versions.md✓ Legacy and preview inputs are flagged, not silently treated as 3.0.1. - Upgrade (only when asked). Follow the 2.3 to 3.0 checklist: creators to Agents, relationships to standalone elements with swapped directions, external document references to
importandnamespaceMap,purltopackageUrl, checksums toverifiedUsing. ->references/versions.md✓ The 3.0 document validates and carries the same packages, licenses and relationships as the 2.3 input.
Verify before done
- 3.0:
@contextishttps://spdx.org/rdf/3.0.1/spdx-context.jsonld,specVersionis3.0.1, and the document passes the JSON Schema and SHACL validation (Serializations, JSON-LD validation). - 3.0: exactly one SpdxDocument; every Element has
type,spdxIdandcreationInfo;profileConformanceincludescoreand every profile whose classes are used. - 3.0: every Package has a
name; Lite-profile Packages also havepackageVersion,suppliedBy,copyrightText, adownloadLocationorpackageUrl, and exactly onehasConcludedLicenseand onehasDeclaredLicenserelationship (Annex SPDX Lite). - 2.3: the seven creation-information fields are present, every Package has name,
SPDXRef-identifier and download location, every File has name, identifier and a SHA1 checksum (§ 6, § 7, § 8). - Every license expression parses; no deprecated License List identifier is newly written; every
LicenseRef-has its text. -
NONEversusNOASSERTION(or their 3.0 individuals) reflects what was actually determined. - Nothing claims SPDX 3.1, and no 2.2 or older document is newly authored.
Reference index
references/versions.md: every SPDX line and the License List family, which to use, what changed, the 2.3 to 3.0 translation tables, and the 3.1 preview. Load for steps 1, 7 and 8.references/spdx3-model.md: profiles, Element, CreationInfo, SpdxDocument, Sbom, Package, File, Snippet, Relationship types, licensing in 3.0, JSON-LD shape and a complete example. Load for step 4.references/spdx23-documents.md: the 2.3 sections and fields with cardinalities, formats, relationship types, and the 2.3.1 corrections. Load for step 5.references/license-expressions.md: the ABNF, operators and precedence, case rules,LicenseRef-,AdditionRef-,DocumentRef-, the License List and deprecated identifiers, andSPDX-License-Identifiertags. Load for steps 2 and 3.references/sbom-minimum-elements.md: SPDX's mappings of the NTIA 2021 and CISA 2026 minimum elements, and the SPDX Lite mandatory set. Load for step 6.
Related skills
cyclonedxfor the other common SBOM format:npx skills add ScaleDockHQ/scaledock-skills --skill cyclonedx.purlfor the Package URL strings used inpackageUrlandPACKAGE-MANAGER purlreferences:npx skills add ScaleDockHQ/scaledock-skills --skill purl.eu-crafor the EU Cyber Resilience Act SBOM obligations:npx skills add ScaleDockHQ/scaledock-skills --skill eu-cra.slsafor build provenance alongside the SPDX Build profile:npx skills add ScaleDockHQ/scaledock-skills --skill slsa.
Sources
Status uses the publishing body's own maturity term. Checked is the date the source was last read.
- SPDX Specification 3.0.1: Released, 3.0.1 (2024-12-17), checked 2026-10-05.
- SPDX 3 model releases: Released 3.0.1 (2024-12-10); pre-release 3.1-rc1 (2026-01-24), checked 2026-10-05.
- SPDX 3.0.1 JSON-LD context: Released, 3.0.1, checked 2026-10-05.
- SPDX Specification 2.3: Released, 2.3 (2022-11-03); the URL now redirects to 2.3.1, checked 2026-10-05.
- SPDX Specification 2.3.1: maintenance release text published, tag v2.3.1, changelog dated 2026-10-30, no GitHub release yet, checked 2026-10-05.
- SPDX specifications index: publisher index, lists 3.0 as current, checked 2026-10-05.
- spdx/spdx-spec releases: release index, 3.0.1 latest, v3.1-RC1 pre-release, checked 2026-10-05.
- SPDX Specification 3.1-RC1: Release candidate, 3.1-RC1 (2026-01-24), checked 2026-10-05.
- Differences from previous editions: Informative, main branch, checked 2026-10-05.
- Getting started writing SPDX 3: Informative, main branch, checked 2026-10-05.
- SPDX License List: Released, 3.29.0 (2026-09-16), checked 2026-10-05.
- spdx/license-list-data releases: Released, v3.29.0 (2026-09-16), checked 2026-10-05.