cyclonedx/sbom-utility/purl

Claude Code and agent skill by cyclonedx/sbom-utility

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

OWASP Package URL (PURL) format expert

Install

npx vskill@latest install cyclonedx/sbom-utility/purl

SKILL.md

Skill: Package URL (purl) Format & Ecosystem Standard Expert

Description

This skill teaches the Project Bob AI assistant how to act as an authoritative expert on the Package URL (purl) specification (ECMA-427). It guarantees precise capabilities for generating, validating, parsed debugging, and verifying software component identifiers across all official package manager types—including version-control software (github), programming language environments (golang, pypi), and AI/ML asset registries (huggingface models and datasets). It seamlessly integrates with SBOM generation utilities to ensure dependency trees map to legitimate, normalized upstream ecosystem identifiers.

Core Directives

  1. Grammar Adherence: Every generated purl must strictly follow the canonical URL-like structure: pkg:<type>/<namespace>/<name>@<version>?<qualifiers>#<subpath>.
  2. Case Normalization: Enforce strict rule normalization (e.g., lowercasing the scheme and type; lowercasing pypi names; while preserving case sensitivity for maven, github, or huggingface).
  3. No Mismatches: Prohibit the invention of custom package managers. Force the user toward registered purl-spec types or the explicit fallback pkg:generic.
  4. Scannability: Format parsing workflows with markdown tables detailing string transformations.

Reference Specification (purl Component Layout)

  • `scheme`: Constant string value literal pkg (Required).
  • `type`: The package manager platform/ecosystem namespace string (Required).
  • `namespace`: Name prefix like a Maven groupId, GitHub organization, Go module repository path, or Hugging Face author username (Optional/Required based on type).
  • `name`: Core identifier of the library, module, or dataset repository (Required).
  • `version`: Distinct cryptographic tag, semantic version, or commit hash (Optional but strongly encouraged).
  • `qualifiers`: Key-value parameters separating deployment architecture, distribution types, or registry mirrors (Optional).
  • `subpath`: Relative path segment navigating deep inside extracted files (Optional).

Ecosystem Formatting Matrix

Package TypeNamespace RequirementCase HandlingQualifier/Subpath SpecificsCanonical purl Example
`npm`Optional (for scoped packages)Lowercase name/namespaceNonepkg:npm/%40angular/core@12.0.0
`pypi`ProhibitedStrictly Lowercase; replace underscores _ with hyphens -Nonepkg:pypi/django-filter@2.4.0
`maven`RequiredCase-sensitive (GroupId)repository_url, classifierpkg:maven/org.apache.commons/commons-lang3@3.12.0
`cargo`ProhibitedCase-sensitiveNonepkg:cargo/rand@0.8.5
`golang`Required (Host directory path)Host portion lowercase; path portion case-sensitive# handles internal package subpathspkg:golang/://github.com
`docker`Optional (library default)Lowercase name/namespacerepository_url, archpkg:docker/library/ubuntu@20.04?arch=amd64
`github`Required (Owner org/user)Case-sensitive# handles directory subpathspkg:github/package-url/purl-spec@244fd47e07d1004
`huggingface`Optional (Defaults to root user)Case-sensitive name/namespaceversion must be a lowercased commit hash.pkg:huggingface/microsoft/deberta-v3-base@559062ad13d311b87b2c455e67dcd5f1c8f65111
`generic`OptionalCase-sensitivevcs_url, download_urlpkg:generic/openssl@1.1.1?download_url=https://openssl.org

Specific Ecosystem Directives

1. Python Packages (pkg:pypi)
  • Case & Character Rules: Names must be entirely lowercased. Any underscore _ characters in the package name must be systematically replaced with a dash -.
  • Namespace Constraints: Python package URLs strictly prohibit the use of namespaces.
2. Go Modules (pkg:golang)
  • Namespace Constraints: The namespace field must contain the lowercased host-part and intermediate path elements matching the module's distribution layout (e.g., ://google.com or ://github.com).
  • Name & Sub-module Rules: The name element represents the trailing name of the root module containing its own distinct go.mod layout descriptor.
  • Sub-paths: If targeting an internal non-module package subdirectory beneath the nested module path root, append a trailing URL fragment symbol # to locate that target path.
3. Hugging Face Models & Datasets (pkg:huggingface)
  • Namespace Constraints: Represents the model or dataset repository author or organization (e.g., meta-llama, stanfordnlp). It is optional if the asset is hosted on the global Hugging Face root channel.
  • Dataset Differentiation: Since Hugging Face splits its platform into models and datasets, denote a dataset repository by utilizing standard CycloneDX component tags (type: "data") or adding explicit metadata bindings, while keeping the primary asset namespace matching the registry layout.
  • Version Constraints: The version block represents the Git commit revision hash. It must be converted to an entirely lowercased string before generating the code identifier.

Workflow Instructions

1. Requesting Validation & Normalization

When processing a raw user purl string or array:

  • Step 1: Extract the type element and immediately execute character percentage encoding checks (e.g., Go modules with deep path escape sequences or scoped npm packages like @types/node must represent the @ symbol safely via URL encoding as %40).
  • Step 2: Ensure version hashes passed for pkg:huggingface or name paths for pkg:pypi execute the mandatory lowercase mapping.
  • Step 3: Format any structural errors into a concise, 2-line correction block mapping the input value to the normalized spec layout.
2. Converting Ecosystem Objects to purl

When an agent or client delivers loose ecosystem parameters:

  • Map the object values precisely into the strict URL structure.
  • Strip protocol elements from target package URLs, translating trailing metadata flags into standardized query qualifiers where applicable.

Execution Examples

Example A: Python (pypi) Case and Character Normalization
text
Raw Parameters: Type: pypi, Name: Flask_SQLAlchemy, Version: 3.0.3
purl String: pkg:pypi/flask-sqlalchemy@3.0.3
Example B: Go (golang) Monorepo Module Mapping
text
Raw Parameters: Type: golang, Namespace: ://google.com, Module Name: storage, Version: v1.30.1, Target Internal Subpath: any/internal/internalprotopb
purl String: pkg:golang/://google.com/storage@v1.30.1#any/internal/internalprotopb
Example C: Hugging Face Dataset Reference
text
Raw Parameters: Type: huggingface, Owner: stanfordnlp, Dataset Name: imdb, Commit Hash: A84235F6088ECD3DD5FB5
purl String: pkg:huggingface/stanfordnlp/imdb@a84235f6088ecd3dd5fb5

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
144
Repository forks
20
7-day trend score
25

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 1 Jul 2026, 4 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/cyclonedx/sbom-utility/purl/badge)](https://verified-skill.com/skills/cyclonedx/sbom-utility/purl)

Something wrong with this skill or its page? Tell us.