Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Package Publishing?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/thaithienvanid-package-publishing)
---
name: package-publishing
description: "In an aidd repository, use when code touches npm publish, PyPI, crates.io, RubyGems, NuGet, Maven Central, or Homebrew."
---
<!-- generated by `aidd gen-docs` from schemas/packs.json; edit the registry, not this file -->
# Package publishing
## Scope
Applies when the change touches a package or formula published to a public registry. Not when the package is only consumed, which `aidd-team:dependency-upgrade` covers, or stays in a private registry. Neighbours: `aidd-team:ci-pipeline`, `aidd-team:release-rollout`, `aidd-domains:apis-and-services`, `aidd-team:dependency-upgrade`.
## Standards
| # | Standard | Edition | Checked | Source |
| --- | --- | --- | --- | --- |
| S1 | Trusted publishing: OIDC from CI to the package registry, no long-lived token | OpenSSF Securing Software Repositories WG, May 2025 | 2026-10-16 | <https://repos.openssf.org/trusted-publishers-for-all-package-repositories> |
| S2 | SLSA | v1.2, 2025 | 2026-11-10 | <https://slsa.dev/> |
| S3 | Semantic Versioning | 2.0.0 | 2026-10-16 | <https://semver.org/> |
| S4 | Maven Central publishing requirements | — | 2026-10-16 | <https://central.sonatype.org/publish/requirements/> |
| S5 | Homebrew Acceptable Formulae (homebrew/core) | — | 2026-10-16 | <https://docs.brew.sh/Acceptable-Formulae> |
| S6 | OpenSSF Open Source Project Security Baseline (emerging) | v2026.08.28 | 2026-10-16 | <https://baseline.openssf.org/versions/2026-08-28> |
| S7 | OpenSSF Scorecard | v5.6.0 | 2026-11-13 | <https://github.com/ossf/scorecard> |
| S8 | Developer Certificate of Origin (DCO): a contributor's sign-off on each commit | 1.1 | 2026-10-22 | <https://developercertificate.org/> |
| S9 | EU Cyber Resilience Act: open-source software stewards (Art. 24) | Regulation (EU) 2024/2847 | 2026-10-22 | <https://digital-strategy.ec.europa.eu/en/policies/cra-open-source> |
| S10 | EU Cyber Resilience Act for products with digital elements | Regulation (EU) 2024/2847 | 2026-10-22 | <https://digital-strategy.ec.europa.eu/en/policies/cyber-resilience-act> |
## Dated obligations
| From | Obligation | Standard |
| --- | --- | --- |
| 2026-09-11 | CRA reporting applies to a manufacturer (Art. 14), for a package placed on the market earlier too (`aidd-team:incident-response`). | S10 |
| 2026-12-09 | Beside the CRA, the EU Product Liability Directive (EU) 2024/2853: software placed on the market after this date is a product, and a missing update can make it defective. | S10 |
| 2027-12-11 | The CRA's main obligations apply. A steward keeps a documented cybersecurity policy, and reports actively exploited vulnerabilities and severe incidents (Art. 24). | S9 |
## Checklist by loop step
| Step | Item | Standard |
| --- | --- | --- |
| Before the first edit (`aidd risk --paths`) | The release workflow is in the `ci` area, and `release.publish` asks. A first publish names the package, the namespace, and the owner accounts in the Spec, and every owner account has phishing-resistant 2FA. | S1, S6 |
| Specify | The version bump follows the public API diff, not the commit messages alone; a major bump names its migration note. | S3 |
| Specify | The registry's own rules are Acceptance: Maven Central's sources and javadoc jars, `.asc` signatures, and POM metadata; Homebrew's stable tagged release built from source. | S4, S5 |
| Implement | Publish only from CI by trusted publishing (OIDC). The publish job alone gets the OIDC token, as `id-token: write` on GitHub Actions or `id_tokens:` on GitLab CI, and no registry token sits in secrets. Disable token publishing where the registry allows it. | S1 |
| Implement | Provenance goes out with the artifact: npm provenance, PyPI attestations (PEP 740), or a GitHub artifact attestation, built from a public repository. | S2 |
| Implement | A LICENSE matching the manifest's SPDX identifier, a SECURITY.md with contacts, and a contribution guide (OSPS Baseline level 1). Under the CRA, SECURITY.md is the steward's or the manufacturer's vulnerability policy. | S6, S9, S10 |
| Implement | Governance: GOVERNANCE.md names the maintainers, their roles, and how decisions and releases are made; CODEOWNERS asks an owner to review release and security paths; each commit carries a DCO sign-off where the project takes outside contributions. | S6, S8 |
| Review | The dry run's file list holds no secret, fixture, or build leftover, and the API report's diff matches the bump. | S3, S6 |
| Review | Scorecard shows no drop since the last release in Token-Permissions, Pinned-Dependencies, Signed-Releases, Branch-Protection, or Security-Policy. | S7 |
| Roll out | Publish from the tag, with an SBOM (CycloneDX or SPDX) beside the artifact. Verify the published artifact's provenance from the registry, and keep the previous version installable. A bad release is deprecated or yanked, never overwritten. | S1, S2, S10 |
| Roll out | Turn on immutable releases and staged publishing where the release host and the registry offer them. A product sold under the CRA states its support period. | S1, S10 |
## Test commands
| Command | Proves | How | Standard |
| --- | --- | --- | --- |
| Publish dry run | the package builds, carries its license, and holds no secret or stray file | `npm publish --dry-run`; `uv build` then `uvx twine==7.0.0 check --strict dist/*`; `cargo publish --dry-run`; `gem build`; `dotnet pack`. The two `publish` commands match the publish rule, so each asks first, even as a dry run | S6 |
| Public API diff | the version bump matches the change to the public API | the team's api-diff-tool: `cargo semver-checks` at the pin of `rust/cargo-semver-checks`; `npx @microsoft/api-extractor@7.59.3 run` against the committed report; japicmp-maven-plugin 0.23.1 breaking the build on a binary-incompatible change | S3 |
| Publish without a stored token | the publish job signs in by OIDC and no registry token exists | a check of the release workflow. The OIDC token is on the publish job only (`id-token: write` on GitHub Actions). No `NPM_TOKEN`, `PYPI_API_TOKEN`, `CARGO_REGISTRY_TOKEN`, `NUGET_API_KEY`, or `GEM_HOST_API_KEY` exists, and the CI's secret list (`gh secret list` on GitHub) shows none | S1 |
| Provenance verification | the released artifact verifies against this repository and workflow | npm's signature and provenance check on a fresh install (references/registries.md); `uvx pypi-attestations==0.0.30 verify pypi --repository <repo-url> pypi:<file>`; `gh attestation verify <file> --repo <owner>/<repo>` | S2 |
| Maven Central bundle check | each jar has its sources and javadoc jars, `.asc`, and checksums, and the POM has name, description, url, licenses, developers, and scm | a script over the staged bundle before upload | S4 |
| Homebrew audit | the formula meets homebrew/core's rules and its test passes | `brew audit --strict --new --online <formula>`, `brew install --build-from-source <formula>`, `brew test <formula>` | S5 |
| Scorecard run | the repository's supply-chain checks hold at release | `scorecard --repo=<repo>` (v5.5.0) or the SHA-pinned scorecard action, failing on a drop in a check the Review row names | S7 |
| Project policy files check | LICENSE, SECURITY.md with a contact, and a contribution guide exist, and the manifest's SPDX license matches LICENSE; GOVERNANCE.md and CODEOWNERS exist, and each commit is signed off where the project uses the DCO | a script over the repository and the manifest (`license` in package.json, pyproject.toml, Cargo.toml, or the POM) | S6, S9, S8 |
## Owned elsewhere
- How CI builds and signs the artifact (the SLSA build track), and the release pipeline's permissions: `aidd-team:ci-pipeline`.
- The notification clocks for a reported vulnerability, the CRA's among them: `aidd-team:incident-response`.
- Vetting the packages a project consumes: `aidd-team:dependency-upgrade`.
## References
- [references/registries.md](references/registries.md): each registry's trusted-publishing providers, provenance, token controls, dry run, and required files, each with its source and date. The registries: npm, PyPI, crates.io, RubyGems, NuGet, Maven Central, and Homebrew.
- [references/open-choices.md](references/open-choices.md): its open choices, with aidd's defaults.
## Keep it current
Each entry is due after its `review_every_days` (else emerging 90 days, established 365) or by its `review_due`. An emerging one applies only when the change needs it, said in the Spec. One `aidd eval standards` lists as due is looked up in Specify, and a missing one is proposed to aidd's `schemas/industry-standards.json`.