trailofbits/open-sourcing
This skill should be used when the user asks to "open source this project", "prepare this repository for public release", "make this repo public", "check open-source readiness", "choose a license for this project", or "set up release automation" ahead of a public launch. Provides a release-readiness workflow covering secrets hygiene, licensing, documentation, CI, and language-specific packaging.
npx skills add https://github.com/trailofbits/skills --skill open-sourcing
Prepare a repository for public release so that an outsider with no prior
context can build, use, and contribute to it — and so that nothing sensitive
ships with it. Work through the steps in order; the secrets audit comes first
because its outcome (keeping vs. recreating the repository) affects
everything after it.
official")
launch
release-management steps apply; skip the rest
bash {baseDir}/scripts/detect_org.sh
The script inspects git remotes and recent committer emails, and prints a
profile name. If it prints trailofbits, read
references/trailofbits.md now and apply its
license policy, publishing accounts, and process notes throughout the
remaining steps. If it prints generic, proceed with the generic guidance
alone. If the user says the detection is wrong, trust the user.
A repository that has ever contained secrets (API keys, credentials,
client data) should not be flipped public. History rewriting is error-prone
and does not reach forks, caches, or CI artifacts. The reliable fix is a
fresh repository: copy the current tree over, commit, and archive the old
repository privately.
material. For a security consultancy's tooling, also ask whether test
fixtures or example data came from client engagements.
gitleaks git . or trufflehog git file://. — rather than eyeballing.
releases, issue and PR history, and the repository wiki all become public
with the repository.
the repository settings.
Reject these rationalizations — this is the one step that cannot be fixed
after publication:
leak infrastructure names, internal URLs, and patterns attackers use for
targeting.
clones, caches, and CI artifacts; the fresh-repository approach does not.
production systems are confidential regardless of how they are labeled.
bash {baseDir}/scripts/check_readiness.sh
The script prints a checklist of presence indicators (README, LICENSE,
CONTRIBUTING, SECURITY.md, CI, tests, semver tags, ...) and warns about
tracked files that commonly contain secrets. Treat unchecked items as
discussion prompts, not hard failures — a research prototype does not need
everything a flagship library needs. Walk through the gaps with the user and
fix the ones that matter for this project.
The README is the project's front door. Confirm it explains:
source; a fresh-clone build must work using only what is in the repository
CONTRIBUTING.mdAlso add:
SECURITY.md with vulnerability-reporting instructions (a contactaddress or GitHub private vulnerability reporting). For security tooling
this is table stakes.
route), linked from the README and the repository website field. See the
language references below for per-ecosystem doc tooling.
No license means not open source, regardless of visibility. Read
references/licensing.md for selection criteria and
mechanics. The short version:
modification by competitors is a real concern, Creative Commons for
non-code artifacts.
LICENSE file, set SPDX identifiers in package metadata, statethe license in the README, and verify all three agree.
failing default branch signals abandonment.
language-version and platform matrix.
references below), so style debates never reach review.
or type checker as part of open-sourcing. If it lags the current
generation (the language references name the current tools), warn the
maintainer and let them decide; only when a category is missing entirely —
no type checker, no formatter — add the current default.
github-actions so pins stay current.
permissions: blocks (start from permissions: {}).zizmor .github/workflows/ and lint with actionlint.required. Prefer rulesets for new repositories; classic branch protection
remains supported.
failing tests.
updates to cut PR noise, and set a cooldown window (e.g., 7 days) so
freshly published — and occasionally hijacked — versions age before
adoption.
.editorconfig so contributors' editors agree on whitespace basics.prefixes for facets scale well (C: component, P: platform). See
blight's labels for a
worked example.
vX.Y.Z, following semver; use-rc.N / -pre.N suffixes for release candidates and prereleases.
triggers build, packaging, and upload with no manual steps. A release
should be git tag vX.Y.Z && git push origin vX.Y.Z.
and use trusted publishing (OIDC) instead of long-lived tokens wherever
the index supports it.
Identify the project's languages from its marker files and read the matching
reference for packaging, publishing, and quality tooling:
| Marker file | Reference |
|-------------|-----------|
| pyproject.toml, setup.py | references/python.md — defers to the modern-python skill for tooling |
| CMakeLists.txt, Makefile (C/C++) | references/c-cpp.md |
| Cargo.toml | references/rust.md |
| go.mod | references/go.md |
| package.json | references/javascript.md |
| Gemfile, *.gemspec | references/ruby.md |
For other ecosystems, apply the cross-cutting principles: reproducible
builds from a fresh clone, CI-driven releases, trusted publishing or
organization-owned accounts, and license metadata in the package manifest.
Before the visibility switch is flipped, verify from an outsider's
perspective:
verbatim — do they work with no tribal knowledge?
{baseDir}/scripts/check_readiness.sh and confirm the remaininggaps are deliberate choices, stated to the user.
that cannot be fixed after publication.
Making the repository public is then a repository-settings change. Pair the
release with an announcement where the organization has a process for one.
criteria, SPDX metadata, forks and relicensing
policy overlay (loaded only when detected in Step 1)
references/c-cpp.md,
references/rust.md,
references/go.md,
references/javascript.md,
references/ruby.md — per-language packaging,
publishing, and quality tooling
scripts/detect_org.sh — prints the organization profile(trailofbits or generic) from git remotes and committer emails
scripts/check_readiness.sh — prints presence indicators forrelease-readiness files and flags tracked files that commonly hold secrets
Take trailofbits/open-sourcing from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.