Install
openclaw skills install opensource-releaseConvert a private repository to public open-source. Use when making a repo public, sanitizing personal info from code/docs/git history, or preparing a project for open-source release. Triggers on "open source", "make public", "public release", "sanitize repo".
openclaw skills install opensource-releaseSafely convert a private repo to public by sanitizing personal data and cleaning history.
Scan source code — search for:
C:\Users\, home directory references.env, hardcoded secretsCheck cached artifacts — ensure .gitignore covers:
.pkl, .db, checksums.json)__pycache__/, node_modules/, .env, *.egg-info/# Find hardcoded paths and usernames
Get-ChildItem -Recurse -Include "*.py","*.ps1","*.js","*.ts" |
Select-String -Pattern "C:\\Users|/home/|your-username" -SimpleMatch |
Where-Object { $_.Path -notmatch "__pycache__|node_modules|\.git" }
Fix: replace with environment variables (os.environ.get / process.env) and add a .env.example.
Get-ChildItem -Recurse -Include "*.md","*.txt","*.yaml","*.yml" |
Select-String -Pattern "C:\\Users|/home/|your-username" -SimpleMatch |
Where-Object { $_.Path -notmatch "node_modules|\.git" }
Replace personal paths with generic placeholders ($VAULT_PATH, ~/vault, etc.).
git log --all -p | Select-String -Pattern "SENSITIVE_TERM" | Select-Object -First 50
git log --all --diff-filter=A -- "cache/*"
Choose a strategy:
git checkout --orphan clean-main
git add -A
git commit -m "feat: initial public release"
git remote set-url origin https://github.com/{owner}/{repo}.git # verify no token in URL!
git branch -M main
git push origin main --force
git push origin --delete {old-branch}
gh repo edit {owner}/{repo} --visibility public --accept-visibility-change-consequences --description "Short description"
# Final scan for sensitive strings
Get-ChildItem -Recurse -Include "*.py","*.md","*.yaml","*.js","*.ts" |
Select-String -Pattern "SENSITIVE_TERM" -SimpleMatch |
Where-Object { $_.Path -notmatch "__pycache__|node_modules|\.git" }
# Confirm remote URL has no token
git remote -v
# Confirm visibility
gh repo view {owner}/{repo} --json visibility
.gitignore may already be in history — check carefully.env files — add to .gitignore if not already there