ワンクリックで
changesets
How to create, update, and manage Changesets for release preparation in this repository
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
How to create, update, and manage Changesets for release preparation in this repository
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Guidance for using correct energy and power metrics in Home Assistant energy features
High-level Home Assistant integration best practices, quality scale cues, and testing/CI expectations for custom components
Patterns for Home Assistant config flows, discovery handlers, options flows, and reauth for custom components
Project-specific patterns for the Marstek integration (config flow, coordinator, scanner, entities, translations)
Practical test/CI playbook for Home Assistant custom components (config flow, coordinator, entities, diagnostics)
Repo-specific guidance for maintaining the Marstek integration (UDP Open API, polling, discovery/scanner) in a Home Assistant-friendly way
| name | changesets |
| description | How to create, update, and manage Changesets for release preparation in this repository |
This skill covers how the repository uses Changesets to track releasable changes, generate changelogs, and keep version numbers in sync across package.json, custom_components/marstek/manifest.json, and pyproject.toml.
Use this skill whenever you add, modify, or remove code, configuration, documentation, or any other file that should be noted in the next release. A changeset is the mechanism that records what changed and how it affects the version.
| Command | Purpose |
|---|---|
npm run changeset | Interactively create a new changeset |
npm run changeset:version | Consume pending changesets, bump versions, update changelog |
npm run changeset:pre:enter | Enter RC prerelease mode (-rc.N suffixes) |
npm run changeset:pre:exit | Mark prerelease mode for exit on the next version run |
npm run release:tag | Create and push the v* git tag (used by CI) |
A changeset is a Markdown file in .changeset/ with YAML frontmatter declaring the bump type and a human-readable summary that becomes the changelog entry.
---
"ha-marstek-release-tools": minor
---
Add PV channel 3 and 4 sensors for Venus D devices.
The package name is always "ha-marstek-release-tools" (the name in package.json).
| Type | When to Use | Example |
|---|---|---|
patch | Bug fixes, internal refactors, documentation, maintenance | Fix battery status showing wrong state |
minor | New features, new entities, new services (backward-compatible) | Add PV sensors for Venus A |
major | Breaking changes (config migration, removed entities, API changes) | Remove deprecated YAML config support |
When multiple changesets accumulate before a release, Changesets picks the highest bump among them.
npm run changeset
Follow the prompts: select the package, choose the bump type, write a summary.
Create a file in .changeset/ with any kebab-case-name.md:
---
"ha-marstek-release-tools": patch
---
Fix passive mode timer not expiring after configured duration.
Commit the file alongside the code change.
| Good | Bad |
|---|---|
| Add CT connection binary sensor | Added new file binary_sensor.py |
| Fix grid power reading on 3-phase setups | Bugfix |
Remove deprecated marstek.force_refresh service | Cleanup |
.changeset/*.md files with their PRs.main, the Changesets GitHub Action opens or updates a Release PR.npm run changeset:version, which:
package.json version.scripts/sync-release-version.mjs to sync the version into custom_components/marstek/manifest.json and pyproject.toml.CHANGELOG.md.scripts/create-release-tag.mjs creates and pushes the v* tag.release.yaml workflow picks up the tag and creates the GitHub Release.For release-candidate trains, enter prerelease mode before merging the next batch:
npm run changeset:pre:enter # creates .changeset/pre.json
While active, changeset version produces versions like 1.1.0-rc.0, 1.1.0-rc.1, etc.
When ready to cut the stable release:
npm run changeset:pre:exit # marks intent to leave pre mode
# Then run changeset:version or let the Release PR do it
Commit pre.json changes. See the official prerelease docs for edge cases.
| File | Role |
|---|---|
.changeset/config.json | Changesets configuration (base branch, changelog format) |
.changeset/*.md | Pending changeset files (consumed on version) |
.changeset/pre.json | Prerelease state (only present in RC mode) |
package.json | Source of truth for the current version |
scripts/sync-release-version.mjs | Syncs version to manifest.json and pyproject.toml |
scripts/create-release-tag.mjs | Creates and pushes the git tag after release merge |
.github/workflows/changesets.yaml | Opens/updates the Release PR on main |
.github/workflows/changeset-check.yaml | Warns on PRs missing a changeset |
.github/workflows/release.yaml | Creates GitHub Release from pushed tags |