# Promote

> Create a changelog-style promotion PR from dev to preview.

- Skill: `kevin-liu-01/promote` (Agent Skill)
- Install (CLI): `npx skillmds@latest add kevin-liu-01/promote`
- Raw SKILL.md: https://api.skillmd.com/api/skills/kevin-liu-01/promote/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: kevin-liu-01 (https://skillmd.com/u/kevin-liu-01)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/kevin-liu-01/promote

---


## Context (auto-detected)

- Commits to promote: !`git log --oneline upstream/preview..upstream/dev 2>/dev/null || echo "(run git fetch upstream first)"`

## Script

`${CLAUDE_SKILL_DIR}/scripts/promote.ts` handles everything: fetch, changelog generation, and PR creation.
It opens the PR from a generated `promote/<from>-to-<to>` branch so preview lockfile sync can
commit generated lockfiles without pushing directly to `dev`.

Flags:
- `--from <branch>` source branch (default: `dev`)
- `--to <branch>` target branch (default: `preview`)
- `--remote <name>` git remote (default: `upstream`)
- `--promote-branch <branch>` generated PR branch override
- `--dry-run` print the PR body to stdout without creating the PR

> **Note**: This skill is ONLY for `dev` -> `preview`. Promoting `preview` -> `main` is handled by a fast-forward push (`pnpm ship prod`) after `release-please` runs on `preview`.

## Task

Run the script. Pass through any flags from `$ARGUMENTS`.

```bash
node --experimental-strip-types ${CLAUDE_SKILL_DIR}/scripts/promote.ts $ARGUMENTS
```

If the script exits non-zero, report the error to the user and stop.
Otherwise, print the PR URL it outputs.

