Prepare for Open-Source Release
Announce: "I'm using git-repo-prep:prepare to walk through open-source preparation."
Setup
Create a TodoWrite checklist for all 9 phases:
- Discovery
- Secrets & Personal Info Audit
- License
- Documentation
- Gitignore Refinement
- Project Hardening
- Repository Metadata
- Backlog & Honesty
- Final Review
Phase Pattern
Every phase follows this loop:
- Mark this phase's task in_progress
- Scan/audit current state for this phase
- Present findings to user
- Propose specific changes
- AskUserQuestion — skip / approve / modify
- Implement approved changes
- Commit with descriptive message (e.g.,
docs: add CONTRIBUTING.md)
- Mark phase task complete, move to next
Rules
- DO NOT prescribe choices — always ask via AskUserQuestion (license, CI provider, test framework, etc.)
- DO NOT drift into code quality review — stay focused on what matters for making the repo public. Ignore code style, error handling, architecture, performance.
- DO NOT over-engineer — don't add dotenv, validation, startup checks, or error handling beyond what the user asks for. The goal is open-source readiness, not refactoring.
- DO NOT dump everything at once — work one phase at a time, wait for user approval before moving on.
- DO treat personal info as a separate concern from secrets — emails, usernames, and real names in config or metadata are privacy issues even if they aren't credentials.
- DO check license consistency across LICENSE file, package metadata, and README.
- DO mention ecosystem-specific items when a known stack is detected.
Phase 1: Discovery
Detect the ecosystem and scan project structure.
Detect ecosystem by looking for:
| File |
Ecosystem |
package.json |
Node.js |
pyproject.toml / setup.py / setup.cfg |
Python |
Cargo.toml |
Rust |
go.mod |
Go |
*.csproj / *.sln |
.NET |
Gemfile |
Ruby |
pom.xml / build.gradle |
Java/Kotlin |
Report what exists (present/missing):
- README
- LICENSE
- .gitignore
- CI/CD config (.github/workflows/, .gitlab-ci.yml, etc.)
- Tests directory
- CONTRIBUTING.md
- SECURITY.md
- CHANGELOG
Present findings to user before proceeding.
Phase 2: Secrets & Personal Info
Two separate scans. Both matter for making a repo public.
Secrets scan
- Hardcoded API keys, passwords, tokens, connection strings in source files
.env files or config files containing real credentials
- AWS keys, GitHub tokens, database URLs with passwords, SMTP credentials
- Private keys (
.pem, .key files)
Personal info scan
- Email addresses in package metadata (package.json
author, pyproject.toml authors, Cargo.toml authors)
- Email addresses in source code comments or config
- Real names or usernames hardcoded in source (e.g.,
DEFAULT_AUTHOR = "jsmith")
- Usernames in URLs or paths
If secrets or personal info found:
- Warn that git history also contains these values
- Recommend key rotation/revocation for any real credentials
- Suggest
git filter-repo or BFG Repo Cleaner for history rewriting if needed
- Propose replacing secrets with environment variables and creating
.env.example
- Propose replacing personal info with generic values or removing it
Do not add dotenv packages, validation, or startup checks unless the user asks.
Phase 3: License
Ask the user which license they want. Present common options:
- MIT — permissive, simple
- Apache-2.0 — permissive, patent grant
- GPL-3.0 — copyleft
- Other — ask user to specify
Then:
- Create or update
LICENSE file
- Update package metadata license field:
package.json → "license": "MIT"
pyproject.toml → license field
Cargo.toml → license field
- Add license section to README (or update if present)
- Check for mismatches — if LICENSE file says MIT but metadata says ISC, flag it
Phase 4: Documentation
README
Check for these sections (present or missing):
- What the project does and why
- Installation / getting started
- Usage with examples
- Configuration (if applicable)
- License section
- Limitations / known issues
Don't write the full docs without asking. Propose the structure, ask user for approval, then help draft.
CONTRIBUTING.md
Propose including:
- How to report bugs
- How to submit changes (PR workflow)
- Code style / conventions
- Testing expectations
- Any CLA or DCO requirements
SECURITY.md
Propose a vulnerability reporting process. At minimum: an email or instructions for responsible disclosure.
CLAUDE.md (optional)
If the project already uses AI tools or has complex setup, suggest a CLAUDE.md with build/test/lint commands and architectural notes. Ask first — don't create by default.
Phase 5: Gitignore Refinement
Check current .gitignore against ecosystem best practices:
| Ecosystem |
Must ignore |
| Node.js |
node_modules/, .env, dist/, coverage/ |
| Python |
__pycache__/, *.pyc, .env, *.egg-info/, dist/, .venv/ |
| Rust |
target/, .env |
| Go |
vendor/ (if not vendoring), .env |
| General |
.env, .env.*, *.log, .DS_Store, *.pem, *.key |
Always check:
.env and .env.* patterns excluded
- Credentials directories excluded
- Build artifacts excluded
- IDE/OS files excluded (
.idea/, .vscode/, .DS_Store, Thumbs.db)
If sensitive files are already tracked:
- Flag them: "These files are tracked by git and need
git rm --cached"
- Propose the commands, get approval before running
Phase 6: Project Hardening
Ask the user what level of hardening they want before proposing anything. Options:
- Minimal — just CI basics
- Standard — CI + dependency updates
- Full — CI + dependency updates + hooks + coverage
CI/CD
Ask which provider (GitHub Actions is most common). Propose a workflow that:
- Runs tests
- Runs linter (if project has one)
- Runs on push and PR
Dependency management
Suggest Dependabot (GitHub) or Renovate. Brief config.
Pre-commit hooks
Suggest only if project doesn't already have them. Keep it simple — lint + format.
Coverage enforcement
Suggest only if tests already exist. Don't add test frameworks — that's beyond open-source prep scope.
Phase 7: Repository Metadata
Ecosystem-specific metadata that helps with discoverability and distribution:
| Ecosystem |
Check for |
| Node.js |
repository URL, engines field, files field (or .npmignore), keywords, description |
| Python |
[project.urls], classifiers, requires-python, keywords, description |
| Rust |
repository, keywords, categories, rust-version, description |
| Go |
module path matches repo URL, godoc comment on package |
Flag anything missing. Propose additions. Don't prescribe values — ask the user for descriptions, keywords, etc.
Phase 8: Backlog & Honesty
Building trust with contributors by being upfront about the project's state.
- BACKLOG.md — Suggest creating one if the project has known gaps, unfinished features, or planned work. Ask user what to include.
- Limitations section in README — If not already present, suggest adding known limitations, unsupported use cases, or stability caveats.
These are optional. Ask before creating.
Phase 9: Final Review
Invoke git-repo-prep:review as a final validation pass.
This catches anything missed during the prepare phases and gives the user a clean summary of the repo's openness state.
Use the Skill tool: skill: "git-repo-prep:review"
1---2name: prepare3description: Use when preparing a codebase for first-time public/open-source release. Full lifecycle from audit through documentation, hardening, and final review.4---56# Prepare for Open-Source Release78Announce: "I'm using git-repo-prep:prepare to walk through open-source preparation."910## Setup1112Create a TodoWrite checklist for all 9 phases:13141. Discovery152. Secrets & Personal Info Audit163. License174. Documentation185. Gitignore Refinement196. Project Hardening207. Repository Metadata218. Backlog & Honesty229. Final Review2324## Phase Pattern2526Every phase follows this loop:27280. Mark this phase's task **in_progress**291. Scan/audit current state for this phase302. Present findings to user313. Propose specific changes324. **AskUserQuestion** — skip / approve / modify335. Implement approved changes346. Commit with descriptive message (e.g., `docs: add CONTRIBUTING.md`)357. Mark phase task complete, move to next3637## Rules3839- **DO NOT prescribe choices** — always ask via AskUserQuestion (license, CI provider, test framework, etc.)40- **DO NOT drift into code quality review** — stay focused on what matters for making the repo public. Ignore code style, error handling, architecture, performance.41- **DO NOT over-engineer** — don't add dotenv, validation, startup checks, or error handling beyond what the user asks for. The goal is open-source readiness, not refactoring.42- **DO NOT dump everything at once** — work one phase at a time, wait for user approval before moving on.43- **DO treat personal info as a separate concern from secrets** — emails, usernames, and real names in config or metadata are privacy issues even if they aren't credentials.44- **DO check license consistency** across LICENSE file, package metadata, and README.45- **DO mention ecosystem-specific items** when a known stack is detected.4647---4849## Phase 1: Discovery5051Detect the ecosystem and scan project structure.5253**Detect ecosystem by looking for:**5455| File | Ecosystem |56|------|-----------|57| `package.json` | Node.js |58| `pyproject.toml` / `setup.py` / `setup.cfg` | Python |59| `Cargo.toml` | Rust |60| `go.mod` | Go |61| `*.csproj` / `*.sln` | .NET |62| `Gemfile` | Ruby |63| `pom.xml` / `build.gradle` | Java/Kotlin |6465**Report what exists (present/missing):**66- README67- LICENSE68- .gitignore69- CI/CD config (.github/workflows/, .gitlab-ci.yml, etc.)70- Tests directory71- CONTRIBUTING.md72- SECURITY.md73- CHANGELOG7475Present findings to user before proceeding.7677---7879## Phase 2: Secrets & Personal Info8081Two separate scans. Both matter for making a repo public.8283### Secrets scan8485- Hardcoded API keys, passwords, tokens, connection strings in source files86- `.env` files or config files containing real credentials87- AWS keys, GitHub tokens, database URLs with passwords, SMTP credentials88- Private keys (`.pem`, `.key` files)8990### Personal info scan9192- Email addresses in package metadata (package.json `author`, pyproject.toml `authors`, Cargo.toml `authors`)93- Email addresses in source code comments or config94- Real names or usernames hardcoded in source (e.g., `DEFAULT_AUTHOR = "jsmith"`)95- Usernames in URLs or paths9697### If secrets or personal info found:9899- Warn that git history also contains these values100- Recommend key rotation/revocation for any real credentials101- Suggest `git filter-repo` or BFG Repo Cleaner for history rewriting if needed102- Propose replacing secrets with environment variables and creating `.env.example`103- Propose replacing personal info with generic values or removing it104105**Do not add dotenv packages, validation, or startup checks unless the user asks.**106107---108109## Phase 3: License110111**Ask the user** which license they want. Present common options:112113- **MIT** — permissive, simple114- **Apache-2.0** — permissive, patent grant115- **GPL-3.0** — copyleft116- Other — ask user to specify117118Then:1191201. Create or update `LICENSE` file1212. Update package metadata license field:122 - `package.json` → `"license": "MIT"`123 - `pyproject.toml` → `license` field124 - `Cargo.toml` → `license` field1253. Add license section to README (or update if present)1264. **Check for mismatches** — if LICENSE file says MIT but metadata says ISC, flag it127128---129130## Phase 4: Documentation131132### README133134Check for these sections (present or missing):135136- What the project does and why137- Installation / getting started138- Usage with examples139- Configuration (if applicable)140- License section141- Limitations / known issues142143**Don't write the full docs without asking.** Propose the structure, ask user for approval, then help draft.144145### CONTRIBUTING.md146147Propose including:148- How to report bugs149- How to submit changes (PR workflow)150- Code style / conventions151- Testing expectations152- Any CLA or DCO requirements153154### SECURITY.md155156Propose a vulnerability reporting process. At minimum: an email or instructions for responsible disclosure.157158### CLAUDE.md (optional)159160If the project already uses AI tools or has complex setup, suggest a CLAUDE.md with build/test/lint commands and architectural notes. Ask first — don't create by default.161162---163164## Phase 5: Gitignore Refinement165166Check current `.gitignore` against ecosystem best practices:167168| Ecosystem | Must ignore |169|-----------|------------|170| Node.js | `node_modules/`, `.env`, `dist/`, `coverage/` |171| Python | `__pycache__/`, `*.pyc`, `.env`, `*.egg-info/`, `dist/`, `.venv/` |172| Rust | `target/`, `.env` |173| Go | `vendor/` (if not vendoring), `.env` |174| General | `.env`, `.env.*`, `*.log`, `.DS_Store`, `*.pem`, `*.key` |175176**Always check:**177- `.env` and `.env.*` patterns excluded178- Credentials directories excluded179- Build artifacts excluded180- IDE/OS files excluded (`.idea/`, `.vscode/`, `.DS_Store`, `Thumbs.db`)181182**If sensitive files are already tracked:**183- Flag them: "These files are tracked by git and need `git rm --cached`"184- Propose the commands, get approval before running185186---187188## Phase 6: Project Hardening189190**Ask the user what level of hardening they want** before proposing anything. Options:191192- **Minimal** — just CI basics193- **Standard** — CI + dependency updates194- **Full** — CI + dependency updates + hooks + coverage195196### CI/CD197198Ask which provider (GitHub Actions is most common). Propose a workflow that:199- Runs tests200- Runs linter (if project has one)201- Runs on push and PR202203### Dependency management204205Suggest Dependabot (GitHub) or Renovate. Brief config.206207### Pre-commit hooks208209Suggest only if project doesn't already have them. Keep it simple — lint + format.210211### Coverage enforcement212213Suggest only if tests already exist. Don't add test frameworks — that's beyond open-source prep scope.214215---216217## Phase 7: Repository Metadata218219Ecosystem-specific metadata that helps with discoverability and distribution:220221| Ecosystem | Check for |222|-----------|-----------|223| Node.js | `repository` URL, `engines` field, `files` field (or `.npmignore`), `keywords`, `description` |224| Python | `[project.urls]`, `classifiers`, `requires-python`, `keywords`, `description` |225| Rust | `repository`, `keywords`, `categories`, `rust-version`, `description` |226| Go | module path matches repo URL, godoc comment on package |227228Flag anything missing. Propose additions. Don't prescribe values — ask the user for descriptions, keywords, etc.229230---231232## Phase 8: Backlog & Honesty233234Building trust with contributors by being upfront about the project's state.235236- **BACKLOG.md** — Suggest creating one if the project has known gaps, unfinished features, or planned work. Ask user what to include.237- **Limitations section in README** — If not already present, suggest adding known limitations, unsupported use cases, or stability caveats.238239These are optional. Ask before creating.240241---242243## Phase 9: Final Review244245Invoke `git-repo-prep:review` as a final validation pass.246247This catches anything missed during the prepare phases and gives the user a clean summary of the repo's openness state.248249Use the Skill tool: `skill: "git-repo-prep:review"`