# Open Sourcing

Should be used when the user asks to "open source this project", "prepare this...

- Repository: https://github.com/trailofbits/skills (7935 stars)
- Category: Writing
- License: CC-BY-SA-4.0
- Last updated: 2026-10-28
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add trailofbits/skills --skill open-sourcing -g -a claude-code -y`
Codex: `npx skills add trailofbits/skills --skill open-sourcing -g -a codex -y`
Cursor: `npx skills add trailofbits/skills --skill open-sourcing -g -a cursor -y`
Gemini CLI: `npx skills add trailofbits/skills --skill open-sourcing -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add trailofbits/skills`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Open-Sourcing a Repository

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.

## When to Use

- Making a private repository public
- Auditing an existing public repository for release quality ("make it
  official")
- Choosing a license for a project
- Setting up packaging, versioning, or release automation ahead of a public
  launch

## When NOT to Use

- Routine development on an already-released project (no release event)
- Auditing third-party code for vulnerabilities (use a security-review skill)
- Publishing a package from a repository that will stay private, only the
  release-management steps apply; skip the rest

## Workflow

### Step 1: Detect the organization profile

```sh
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](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.

### Step 2: Audit for secrets, before anything else

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.

The rest: https://github.com/trailofbits/skills/blob/HEAD/plugins/open-sourcing/skills/open-sourcing/SKILL.md
