pr-to-main

Creates Changesets-aware pull requests to main in a pnpm monorepo.

5.4k|571|Updated Nov 1, 2025
One-click install
npx skills add https://github.com/breaking-brake/cc-wf-studio --skill pr-to-main
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pr-to-main
Source: https://github.com/breaking-brake/cc-wf-studio/tree/main/.claude/skills/pr-to-main
Command: npx skills add https://github.com/breaking-brake/cc-wf-studio --skill pr-to-main

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) components.

What problem does it solve?

In a pnpm + Changesets monorepo, a PR that lands without the right changeset merges but never gets released. This Skill ensures every PR to main identifies the affected packages, includes a proper changeset, passes build checks, and follows the repo's squash-merge commit conventions.

Core Features & Use Cases

  • Monorepo-aware scoping: Maps changed paths to packages (packages/core, packages/mcp, packages/cli, packages/vscode) to determine changeset targets and commit scopes.
  • Changeset enforcement: Creates a changeset with pnpm changeset when missing, or records an explicit empty changeset for no-release changes like CI or docs.
  • Conventional PR titles: Generates squash-merge-ready titles like fix(vscode): parse Changesets-format CHANGELOG and fills type-specific PR templates (fix, feat, improvement).
  • Use Case: You finished a bug fix in the VSCode extension package. Ask for a PR, and the Skill verifies the build with pnpm check && pnpm build, adds a patch changeset for cc-wf-studio, and opens a templated PR against main via gh pr create.

Quick Start

Ask the assistant to create a PR to main for the current branch, making sure a changeset exists for the affected packages.

Frequently Asked Questions about pr-to-main

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a PR to main in a pnpm monorepo with Changesets?

Identify which packages changed, ensure a .changeset/*.md file exists for them (run pnpm changeset if missing), verify the build with pnpm check && pnpm build, then open the PR with gh pr create --base main using a conventional commit title.

Why is a changeset required before merging a PR?

Releases in this repo are driven by Changesets, not commit messages. A PR merged without a changeset never gets released, and leftover pending changesets can later block promotion to production.

What PR title format should I use for squash merges?

Use the conventional commit format <type>(<scope>): <description>, such as fix(vscode): parse Changesets-format CHANGELOG. Since main merges via squash, the PR title becomes the commit subject, so keep it imperative and under about 50 characters.

Do I need a changeset for docs or CI-only changes?

Changes outside packages/ like root config, .github/, or docs usually need no release. Record that intent explicitly with pnpm changeset add --empty so the release pipeline is not left guessing.

Does bumping @cc-wf-studio/core require changesets for dependent packages?

No. Bumping @cc-wf-studio/core automatically bumps its dependents like cli and mcp, so you only author a changeset for core itself rather than separate ones for each dependent package.