# PR To Main

Create a PR to the main branch for feature/fix changes in this pnpm + Changesets monorepo.

- Repository: https://github.com/breaking-brake/cc-wf-studio (5444 stars)
- Category: Git and review
- License: see repository
- Last updated: 2026-10-07
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add breaking-brake/cc-wf-studio --skill pr-to-main -g -a claude-code -y`
Codex: `npx skills add breaking-brake/cc-wf-studio --skill pr-to-main -g -a codex -y`
Cursor: `npx skills add breaking-brake/cc-wf-studio --skill pr-to-main -g -a cursor -y`
Gemini CLI: `npx skills add breaking-brake/cc-wf-studio --skill pr-to-main -g -a gemini-cli -y`

## Description

Create a PR to the main branch for feature/fix changes in this pnpm + Changesets monorepo. Use when the user says "PRを作成", "mainにPR", or wants to submit changes for review. Always run this in the monorepo-aware way, identify the affected package(s) and make sure a changeset exists, because the release pipeline is Changesets-driven.

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

# PR to Main Branch

Create a PR for a feature/fix branch targeting `main` in the cc-wf-studio monorepo.

This is a **pnpm monorepo with four packages** (`packages/core`, `packages/mcp`, `packages/cli`, `packages/vscode`) and versioning is driven by **Changesets**, not commit messages. Two monorepo facts shape this workflow:

- A release-worthy change must ship with a `.changeset/*.md` file in the same PR. Without it, the change merges but **never gets released**, and pending changesets later block promotion to production.
- Knowing *which package(s)* changed drives the changeset target, the PR scope, and the commit scope (e.g. `fix(vscode):`).

So the job here is not just "open a PR", it's "open a PR that the release pipeline can actually act on."

## Workflow

1. **Gather context** (run in parallel):
   - `git status` (no `-uall`)
   - `git diff` (staged + unstaged) and `git diff origin/main...HEAD` for the full branch delta
   - `git log origin/main..HEAD --oneline` for every commit on the branch
   - Check whether the branch tracks a remote and needs pushing
   - `ls .changeset/*.md` to see whether a changeset already exists

2. **Identify scope and type**:
   - **Affected package(s)**: map changed paths to packages, `packages/core` → `@cc-wf-studio/core`, `packages/mcp` → `@cc-wf-studio/mcp`, `packages/cli` → `@cc-wf-studio/cli`, `packages/vscode` → `cc-wf-studio` (the VSCode extension). Changes outside `packages/` (root config, `.github/`, docs) usually need no release.
   - **Type**: read the commit prefix, allowing an optional scope, `fix:` / `fix(vscode):` → fix, `feat:` / `feat(core):` → feat, `improvement:` → improvement. Review **all** commits on the branch, not just the latest.

The rest: https://github.com/breaking-brake/cc-wf-studio/blob/HEAD/.claude/skills/pr-to-main/SKILL.md
