Agent skill

Changeset Generator

by cjinhuo in cjinhuo/blazwitcher

在创建或更新 PR 前,根据当前 pnpm workspace、公开包发布影响、Changesets 历史格式和 changesets-toolkit 提交钩子,生成并校验 Changesets 3 变更记录。用户要求添加或生成 changeset、创建 changeset、准备 PR、判断分支是否需要版本说明,或选择 major、minor、patch 版本类型时使用。

Apache-2.0Auto-check passedDevelopment

Install Changeset Generator

skills CLI
$ npx skills add cjinhuo/blazwitcher --skill changeset-generator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cjinhuo/blazwitcher changeset-generator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cjinhuo/blazwitcher.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/changeset-generator .claude/skills/changeset-generator && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
changeset-generator
GitHub stars
101
Token cost
~942 tokens
SKILL.md length
268 words
Files
2
Skills in repo
4
Repo updated
First seen
Licence
Apache-2.0

At a glance

在创建或更新 PR 前,根据当前 pnpm workspace、公开包发布影响、Changesets 历史格式和 changesets-toolkit 提交钩子,生成并校验 Changesets 3 变更记录。用户要求添加或生成 changeset、创建 changeset、准备 PR、判断分支是否需要版本说明,或选择 major、minor、patch 版本类型时使用。

  • Works in 7 steps: 同时检查三类改动 → 读取根 workspace 配置及其匹配的 package.json。只有具备… → 将改动映射到最近的 workspace… → …
  • Tasks that involve Monorepo tooling
  • SKILL.md covers 安全检查, 判断是否需要发布, 选择版本类型 and 编写中英文摘要, plus 2 more sections
  • Calls git, pnpm and changeset

What it does

Changeset Generator is an agent skill from cjinhuo/blazwitcher. 在创建或更新 PR 前,根据当前 pnpm workspace、公开包发布影响、Changesets 历史格式和 changesets-toolkit 提交钩子,生成并校验 Changesets 3 变更记录。用户要求添加或生成 changeset、创建 changeset、准备 PR、判断分支是否需要版本说明,或选择 major、minor、patch 版本类型时使用。

Its SKILL.md is about 940 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Development, covering Monorepo tooling. It works with pnpm and Git. The repository describes itself as: A Chrome Extension to blaze through your tabs, bookmarks, and history — with powerful fuzzy Pinyin search and grouping tags by AI. 一款可以全局搜索标签、书签和历史记录的 Chrome 浏览器扩展,支持拼音模糊搜索和 AI…. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Monorepo tooling

Example prompts

  • “/changeset-generator”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. 同时检查三类改动
  2. 读取根 workspace 配置及其匹配的 package.json。只有具备 name、version 且 private 不为 true 的包才是公开发布单元。
  3. 将改动映射到最近的 workspace 包。若改动位于共享或私有包,继续追踪其代码、资源、构建产物或运行时行为是否会被公开包打包或消费。
  4. 检查相对基础分支新增的 changeset,以及未跟踪的 .changeset/*.md,确认相同包和相同行为是否已经有发布说明。
  5. 公开 API、运行时行为、发布资源、兼容性、缺陷修复或性能变化会影响消费者时,生成 changeset。
  6. 纯文档、纯测试、纯 CI、纯格式化、纯私有工具改动且不改变公开产物时,说明判断依据并结束;禁止使用 --empty。
  7. 已有 changeset 完整覆盖本次变化时,不重复生成。除非用户明确要求,否则不修改已有 changeset。

What it can do on your machine

Read from SKILL.md and the folder at commit 4b062db. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • pnpm
    • changeset

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and pnpm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Changeset Generator loads about 942 tokens when it runs. Until then it costs about 52 tokens; SKILL.md has 268 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~52
When it runs · the whole SKILL.md, loaded when a task matches
~942

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from cjinhuo/blazwitcher at commit 4b062db, republished under its Apache-2.0 licence (© cjinhuo). 268 words, ~942 tokens.

Download SKILL.mdSave it as .claude/skills/changeset-generator/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
changeset-generator
description
在创建或更新 PR 前,根据当前 pnpm workspace、公开包发布影响、Changesets 历史格式和 changesets-toolkit 提交钩子,生成并校验 Changesets 3 变更记录。用户要求添加或生成 changeset、创建 changeset、准备 PR、判断分支是否需要版本说明,或选择 major、minor、patch 版本类型时使用。

生成 PR Changeset

只有分支改动会影响公开包的消费者时才创建 changeset。始终从当前仓库读取配置,不写死仓库名、包名、目录或基础分支。

安全检查

  • 使用 git rev-parse --show-toplevel 定位仓库根目录,并在根目录执行后续命令。
  • 必须存在 pnpm workspace 和 .changeset/config.json;缺少任一项时停止。
  • 从 .changeset/config.json 读取 baseBranch,仅在字段缺失时默认使用 master,比较基准为 origin/<baseBranch>。
  • 当前分支不能是基础分支。执行 git fetch origin <baseBranch> 刷新基准;无法获取或解析基准时停止,不使用不明确的旧引用继续操作。
  • 执行 git diff --cached --quiet --,要求暂存区为空。若已有暂存文件,列出文件并停止,因为 toolkit 钩子最终会执行 git commit。
  • 记录执行前的 git status --porcelain=v1,生成后用它确认原有未暂存和未跟踪文件未被夹带或丢失。
  • 执行 pnpm exec changeset --version,要求实际主版本为 3;同时确认 pnpm exec changeset add --help 包含 --since、--message、--major、--minor、--patch。
  • 读取 Changesets 的 commit 配置,要求提交钩子解析到 changesets-toolkit。钩子未启用或指向其他模块时停止,不假设命令会自动提交。
  • 不在本 skill 中安装或升级依赖、重写锁文件、放宽包管理器安全策略,也不输出 npm token 等凭据。

判断是否需要发布

  1. 同时检查三类改动:
    • 已提交分支差异:git diff --name-status origin/<baseBranch>...HEAD
    • 未暂存差异:git diff --name-status
    • 未跟踪文件:git ls-files --others --exclude-standard
  2. 读取根 workspace 配置及其匹配的 package.json。只有具备 name、version 且 private 不为 true 的包才是公开发布单元。
  3. 将改动映射到最近的 workspace 包。若改动位于共享或私有包,继续追踪其代码、资源、构建产物或运行时行为是否会被公开包打包或消费。
  4. 检查相对基础分支新增的 changeset,以及未跟踪的 .changeset/*.md,确认相同包和相同行为是否已经有发布说明。
  5. 公开 API、运行时行为、发布资源、兼容性、缺陷修复或性能变化会影响消费者时,生成 changeset。
  6. 纯文档、纯测试、纯 CI、纯格式化、纯私有工具改动且不改变公开产物时,说明判断依据并结束;禁止使用 --empty。
  7. 已有 changeset 完整覆盖本次变化时,不重复生成。除非用户明确要求,否则不修改已有 changeset。

选择版本类型

  • major:不兼容的公开 API 或行为变化,需要消费者迁移;摘要必须说明破坏点和迁移方式。
  • minor:向后兼容的新功能、新导出、新选项或有意义的新能力。
  • patch:缺陷修复、性能优化、兼容性修正或改变发布行为的非破坏性重构。
  • 每个公开包选择所需的最高 bump。只有证据无法排除 major 与 minor 的实质歧义时才询问用户。
  • 一个逻辑变化跨多个公开包时使用一个 changeset;Changesets 3 要求同一 bump 下的多个包名使用逗号连接。

编写中英文摘要

将 --message 写成类似 Conventional Commit 的双语 changeset 正文。它不是 Git 提交标题;实际 Git 提交标题由 toolkit 生成,例如 chore(changeset): 🦋 package:old->new。

每个变化必须严格按英文在前、中文在后的顺序写两行:

text
fix: handle non-string values without throwing
fix: 修复处理非字符串值时抛错的问题
  • 两行必须使用相同的 type,并表达相同语义。
  • type 只能从当前仓库 commitlint.config.* 读取;这三个仓库允许 feat、fix、docs、style、refactor、perf、test、build、ci、chore、revert。
  • 默认使用 type: subject,因为 changeset frontmatter 已标明包名。确需 scope 时使用 type(scope): subject,并确保 scope 存在于当前 commitlint 的 scope-enum;中英文两行的 scope 必须一致。
  • major 破坏性变化在 type 或 scope 后加 !,例如 feat!: remove the legacy API。
  • 英文 subject 使用简短祈使语气,中文 subject 使用对应的简洁说明;不要以句号结尾,不添加与历史不一致的 emoji。
  • 每行最多 120 个字符;若当前 commitlint 启用了更严格的 header-max-length,使用更严格的值。
  • type 描述变化性质,bump 描述 SemVer 影响,两者分别判断。不要仅凭 feat、fix 字样机械决定 bump。
  • 一个 changeset 包含多个独立变化时,为每个变化写一组中英文行,并用空行分隔;不要把中英文拆成两个 changeset。

使用 Changesets 3 生成

只加入非空的 bump 参数,构造一条非交互命令:

sh
pnpm exec changeset add \
  --since "origin/$base_branch" \
  --major "pkg-a,pkg-b" \
  --minor "pkg-c" \
  --patch "pkg-d" \
  --message "$summary"

示例中的某组包为空时,必须省略对应整项参数。将完整中英文摘要作为一个经过安全引用的参数传入;禁止插入命令替换、反引号、凭据或不受信任的 shell 片段。不要使用 --empty 或 --open。

命令应输出 Changeset added and committed!。changesets-toolkit 会只暂存新 changeset 并创建提交,不要再手动创建第二个提交。

校验结果

  1. 要求命令成功退出,并从输出中取得新生成的 .changeset/*.md 路径。
  2. 检查文件 frontmatter、公开包名、bump、中英文顺序、type、scope、单行长度和语义一致性。
  3. 执行 git diff-tree --no-commit-id --name-status -r HEAD,要求最新提交只包含一个新增的 .changeset/*.md,不得包含其他路径。
  4. 执行 pnpm exec changeset status --since "origin/$base_branch",确认目标包和 bump 出现在发布计划中。
  5. 对照执行前状态,确认原有未暂存和未跟踪文件仍然存在,且暂存区为空。
  6. 报告生成或跳过结论、涉及包、bump、双语摘要、文件路径、提交哈希和校验结果。

生成、自动提交或校验任一步失败时,立即停止并原样报告错误,保留现场用于诊断。不要手写替代 changeset,也不要运行 changeset version、进入或退出 prerelease、publish、push 或触发发布 workflow。

© cjinhuo, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .agents/skills/changeset-generator of cjinhuo/blazwitcher.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 4b062db

Compare with similar skills

Changeset Generator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Changeset Generator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Changeset Generator this skillcjinhuo/blazwitcher101—~942Automated safety check: PassApache-2.0
Changesets Pull Request to Mainbreaking-brake/cc-wf-studio5.4k—~1.4kAutomated safety check: PassCustom licence
Migrate Internal Package into GhostTryGhost/Ghost55k—~3.8kAutomated safety check: PassMIT
React Router Release Notes Prepremix-run/react-router57k—~1.1kAutomated safety check: PassMIT
Link Workspace Packagesnomcopter/react-mosaic4.8k6 repos~760Automated safety check: PassCustom licence
Verdaccio Pull Request Workflowverdaccio/verdaccio18k—~1.9kAutomated safety check: PassMIT

Similar skills

  • Changesets Pull Request to Main

    breaking-brake/cc-wf-studio

    Opens a pull request to main in a pnpm and Changesets monorepo, after working out which packages changed and making sure a changeset file exists.

    5.4k GitHub stars~1.4k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Moves a package from another TryGhost repository into Ghost as an internal workspace package while keeping its Git history, with checkpoints for the steps that need an administrator.

    55k GitHub stars~3.8k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • React Router Release Notes Prep

    remix-run/react-router

    Polishes pending React Router change files before the versioning scripts run, and decides whether a long-form What's Changed section is warranted.

    57k GitHub stars~1.1k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Link Workspace Packages

    nomcopter/react-mosaic

    Link workspace packages in monorepos (npm, yarn, pnpm, bun).

    4.8k GitHub starsUsed in 6 repos~760 tokens
    DevelopmentAuto-check passed
  • Takes a change through a verdaccio pull request: branch, local checks, changeset, title and body, labels, CI and review rounds, and ports to other release lines.

    18k GitHub stars~1.9k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Pnpm Engine

    teambit/bit

    Work on the pnpm Rust engine (@pnpm/napi, the pacquet crates) that bit install runs through.

    18k GitHub stars~1.9k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from cjinhuo/blazwitcher

  • Release Publisher

    cjinhuo/blazwitcher

    Handles version bumping and release publishing for blazwitcher extension.

    101 GitHub stars~694 tokensUpdated 3 days ago
    Auto-check: notes
  • Text Search Engine

    cjinhuo/blazwitcher

    Guides users to integrate text-search-engine SDK for Chinese/English fuzzy search with Pinyin support.

    101 GitHub stars~1.4k tokensUpdated 3 days ago
    Auto-check passed
  • Git Auto Commit

    cjinhuo/blazwitcher

    Git 自动提交工具。当用户需要提交代码变更、commit 更改或者完成任务后需要提交时,必须调用此 skill 自动生成符合规范的 commit message 并执行提交,默认推送到远端。

    101 GitHub stars~355 tokensUpdated 3 days ago
    Auto-check passed

Works with

Categories

Questions about Changeset Generator

What does Changeset Generator do?

在创建或更新 PR 前,根据当前 pnpm workspace、公开包发布影响、Changesets 历史格式和 changesets-toolkit 提交钩子,生成并校验 Changesets 3 变更记录。用户要求添加或生成 changeset、创建 changeset、准备 PR、判断分支是否需要版本说明,或选择 major、minor、patch 版本类型时使用。. Changeset Generator is an agent skill from cjinhuo/blazwitcher.

When should I use Changeset Generator?

Changeset Generator fits situations like: tasks that involve Monorepo tooling.

How do I install Changeset Generator in Claude Code?

Run `npx skills add cjinhuo/blazwitcher --skill changeset-generator -a claude-code`. Or copy the skill folder (.agents/skills/changeset-generator in cjinhuo/blazwitcher) into .claude/skills/changeset-generator in your project. Claude Code loads it when a task matches its description.

How do I install Changeset Generator in Codex?

Run `npx skills add cjinhuo/blazwitcher --skill changeset-generator -a codex`. Or copy the skill folder (.agents/skills/changeset-generator in cjinhuo/blazwitcher) into .agents/skills/changeset-generator in your project. Codex loads it when a task matches its description.

Can I use Changeset Generator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cjinhuo/blazwitcher --skill changeset-generator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/changeset-generator, .gemini/skills/changeset-generator, .github/skills/changeset-generator and .opencode/skills/changeset-generator in your project.

What does Changeset Generator need to run?

Going by SKILL.md and its folder, Changeset Generator needs the command-line tools its instructions call (git, pnpm and changeset).

Does Changeset Generator access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Changeset Generator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Changeset Generator use?

Changeset Generator is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Changeset Generator use?

About 942 tokens (SKILL.md is roughly 3.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Changeset Generator?

Skills that share tags, products or a category with Changeset Generator: Changesets Pull Request to Main (breaking-brake/cc-wf-studio, 5.4k stars), Migrate Internal Package into Ghost (TryGhost/Ghost, 55k stars), React Router Release Notes Prep (remix-run/react-router, 57k stars) and Link Workspace Packages (nomcopter/react-mosaic, 4.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Changeset Generator?

cjinhuo (a GitHub user) maintains it in cjinhuo/blazwitcher, which has 101 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 5, 2026.

Source: cjinhuo/blazwitcher on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.