# Github Release

Prepare and publish GitHub releases.

- Repository: https://github.com/jezweb/claude-skills (1094 stars)
- Category: Git and review
- License: MIT
- Last updated: 2026-10-09
- Runs scripts: no, instructions only

## Install

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

## Description

Prepare and publish GitHub releases. Sanitizes code for public release (secrets scan, personal artifacts, LICENSE/README validation), creates version tags, and publishes via gh CLI. Trigger with 'release', 'publish', 'open source', 'prepare for release', 'create release', or 'github release'.

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

# GitHub Release

Sanitize and release projects to GitHub. Two-phase workflow: safety checks first, then tag and publish.

## Prerequisites

- `gh` CLI installed and authenticated (`gh auth status`)
- `gitleaks` installed for secrets scanning (`brew install gitleaks` or download from GitHub)
- Git repository with a remote configured

## Workflow

### Phase 1: Sanitize

Run these checks before any public release. Stop on blockers.

#### 1. Scan for Secrets (BLOCKER)

```bash
gitleaks detect --no-git --source=. --verbose
```

If secrets found: **STOP**. Remove secrets, move to environment variables. Check git history with `git log -S "secret_value"`, if in history, use BFG Repo-Cleaner.

If gitleaks not installed, do manual checks:

```bash
# Check for .env files
find . -name ".env*" -not -path "*/node_modules/*"

# Check config files for hardcoded secrets
grep -ri "api_key\|token\|secret\|password" wrangler.toml wrangler.jsonc .dev.vars 2>/dev/null
```

#### 2. Remove Personal Artifacts

Check for and remove session/planning files that shouldn't be published:

- `SESSION.md`, session state
- `planning/`, `screenshots/`, working directories
- `test-*.ts`, `test-*.js`, local test files

Either delete them or add to `.gitignore`.

#### 3. Validate LICENSE

```bash
ls LICENSE LICENSE.md LICENSE.txt 2>/dev/null
```

If missing: create one. Check the repo visibility (`gh repo view --json visibility -q '.visibility'`). Use MIT for public repos. For private repos, consider a proprietary license instead.

#### 4. Validate README

Check README exists and has basic sections:

```bash
grep -i "## Install\|## Usage\|## License" README.md
```

If missing sections, add them before release.

#### 5. Check .gitignore

Verify essential patterns are present:

```bash
grep -E "node_modules|\.env|dist/|\.dev\.vars" .gitignore
```

#### 6. Build Test (non-blocking)

```bash
npm run build 2>&1
```

#### 7. Dependency Audit (non-blocking)

```bash
npm audit --audit-level=high
```

The rest: https://github.com/jezweb/claude-skills/blob/HEAD/plugins/dev-tools/skills/github-release/SKILL.md
