사용 방법
- 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
- 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
- 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/TerminalSkills/skills --skill changesets시작 전 확인
- 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
- 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.
Changesets
Overview
Changesets is a versioning and changelog management tool for JavaScript/TypeScript monorepos. Developers add changeset files describing their changes, then CI consumes them to bump package versions, generate changelogs, and publish to npm with coordinated releases across interdependent packages.
Instructions
- Install and initialize:
npm install -D @changesets/cli, thennpx changeset init(interactive; it asks whether to use the GitHub changelog integration) which creates.changeset/config.json. Set"access": "public"for public npm packages,"baseBranch"to your default branch, and for GitHub links in changelogs install@changesets/changelog-githuband set"changelog": ["@changesets/changelog-github", { "repo": "acme-corp/design-system" }]. - Add a change:
npx changeset(pick packages, bump type, summary) writes a file such as.changeset/swift-things-double.md; commit it with the PR. Non-interactive form for scripts and agents:npx changeset -m "Add retry option to the core client" --minor @acme/core(also--major/--patch, comma-separated package lists,--emptyfor PRs that need no release). - Version:
npx changeset versionconsumes pending changesets, bumpspackage.jsonversions, rewrites changelogs, and patch-bumps internal dependents. Since v3 it exits with code 1 when there are no changesets, so a pipeline step fails instead of silently doing nothing. - Publish:
npx changeset publishpublishes packages whose version is not on the registry yet and creates git tags (--no-git-tagto skip them,--tag betafor a dist-tag). Since v3 you can also split it:changeset pack --out-dir ./tarballswrites tarballs andchangeset publish --from-pack-dir ./tarballspublishes them.changeset status --since=mainlists what would be released and fails in CI when required changesets are missing. - Automation:
changesets/action@v2(the line compatible with CLI v3) opens or updates a "Version Packages" pull request and publishes when it is merged. Inputs arepublish-script(the command that builds and publishes),version-script,commit-messageandgithub-token; the job needscontents: writeandpull-requests: write(plusid-token: writefor npm trusted publishing), and the repository setting "Allow GitHub Actions to create and approve pull requests" must be on. - Keeping packages in step:
fixedgroups always get the same version and are bumped together whenever one of them changes;linkedgroups share a version number only for the packages released together in a given release. - Snapshots and pre-releases:
npx changeset version --snapshot previewsets versions to0.0.0-preview-<timestamp>; publish them withchangeset publish --tag previewsolatestis untouched. For-next.Nreleases usenpx changeset pre enter next, run version/publish as usual, and finish withnpx changeset pre exit.
Examples
Example 1: Set up automated releases for a monorepo
User request: "Configure Changesets for automated versioning and publishing in my Turborepo monorepo"
npm install -D @changesets/cli @changesets/changelog-github
npx changeset init# .github/workflows/release.yml
name: Release
on:
push:
branches: [main]
permissions:
contents: write
pull-requests: write
id-token: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 24 }
- run: npm ci
- uses: changesets/action@v2
with:
publish-script: npm run release # "release": "turbo build && changeset publish"Result: every merge to main with pending changesets updates a "Version Packages" PR; merging that PR publishes the packages to npm and tags them.
Example 2: Coordinate a breaking change across packages
User request: "Release a major version of @acme/core and make sure dependents are updated"
$ npx changeset -m "Rename client options" --major @acme/core
$ npx changeset version
$ grep version packages/*/package.json
packages/cli/package.json:{"name":"@acme/cli","version":"1.0.1","dependencies":{"@acme/core":"^2.0.0"}}
packages/core/package.json:{"name":"@acme/core","version":"2.0.0"}Result: core goes to 2.0.0, @acme/cli is patch-bumped to 1.0.1 with its dependency range moved to ^2.0.0, and both changelogs list the change. If @acme/cli should also change its public API, add its own changeset with the right bump type.
Guidelines
- Require a changeset on every PR that changes a published package; enforce it with
changeset status --since=mainin CI. - Write summaries for users of the package ("Fixed button hover state"), not for maintainers ("Refactored CSS modules").
- A CI job that runs
changeset versionfails when nothing is pending (v3); guard it withchangeset statusor letchangesets/actiondecide. - Never publish a snapshot without
--tag, or it can land onlatest. - Private packages are neither versioned nor tagged by default; set
privatePackagestotruein the config to opt in. .changeset/config.jsonlives in the repo root and is committed; theformatoption ("auto"by default,falseto disable) controls how changesets and changelogs are formatted.

