changesets-authoring
ALWAYS invoke before answering any question about changesets in any JS/TS repo, whether or not it has `.changeset/config.json` or `@changesets/cli` (the skill decides if the convention applies): what to add for release notes, a version bump or a changelog entry, which bump type, or whether a change (even a docs-only or typo fix, even a one-word YES/NO answer) needs a changeset. How to write a Changesets (`.changeset/*.md`) entry when working in a repo managed by the changesets/changesets tool. Covers detecting whether a repo actually uses Changesets (`.changeset/config.json` + `@changesets/cli` in `package.json`), when a change needs one, the real `.changeset/*.md` file format (YAML frontmatter naming affected packages + bump type, followed by a changelog-facing summary), how to pick patch/minor/major, why hand-writing the file beats trying to drive the interactive `changeset add` CLI as an agent, and where the changeset commit belongs relative to the code change. Use whenever a fix, feature, or dependency bump lands in a repo with a `.changeset/` directory — before opening the PR, not after — or when asked to "add a changeset", "bump the package version", "will this show up in the changelog", or whether a change (including a docs-only one) needs a changeset. Applies even when the repo's files are only described in the conversation and nothing can be run.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- changesets-authoring
- license
- MIT
- metadata
- { "version": "1.0.0" }
- description
- ALWAYS invoke before answering any question about changesets in any JS/TS repo, whether or not it has `.changeset/config.json` or `@changesets/cli` (the skill decides if the convention applies): what to add for release notes, a version bump or a changelog entry, which bump type, or whether a change (even a docs-only or typo fix, even a one-word YES/NO answer) needs a changeset. How to write a Changesets (`.changeset/*.md`) entry when working in a repo managed by the changesets/changesets tool. Covers detecting whether a repo actually uses Changesets (`.changeset/config.json` + `@changesets/cli` in `package.json`), when a change needs one, the real `.changeset/*.md` file format (YAML frontmatter naming affected packages + bump type, followed by a changelog-facing summary), how to pick patch/minor/major, why hand-writing the file beats trying to drive the interactive `changeset add` CLI as an agent, and where the changeset commit belongs relative to the code change. Use whenever a fix, feature, or dependency bump lands in a repo with a `.changeset/` directory — before opening the PR, not after — or when asked to "add a changeset", "bump the package version", "will this show up in the changelog", or whether a change (including a docs-only one) needs a changeset. Applies even when the repo's files are only described in the conversation and nothing can be run.
02 资源文件 5
- 参考文档.claude-plugin/plugin.json511 B
- 参考文档evals/changesets-authoring-asks-on-half-migrated-setup/case.yaml2.3 KB
- 参考文档evals/changesets-authoring-does-not-introduce-changesets/case.yaml1.9 KB
- 参考文档evals/changesets-authoring-stays-quiet-on-keep-a-changelog/case.yaml1.8 KB
- 参考文档evals/changesets-authoring-writes-changeset-when-configured/case.yaml2.2 KB
03 SKILL.md 正文
Writing a Changesets entry
Changesets is a CLI + file
format for capturing "intent to release" at the moment a change is made,
instead of trying to reconstruct it later at release time. A repo that has
adopted it expects every PR that changes published package behavior to
carry a .changeset/*.md file alongside the code change — without one, that
repo's version-bump and changelog generation silently has nothing to
consume, and the fix or feature never gets released with a changelog entry.
This skill is the mechanics; it does not tell you a given repo uses Changesets — check first (Step 1).
Step 1 — detect whether this convention even applies
Don't assume. Most repos don't use Changesets (this repo, agent-config,
doesn't; neither does dfadler.com, which deliberately adopted
semver-adopt-neither — plain git history and no versioned-package
changelog at all — as its own considered choice, not an oversight). Check
both signals before treating any of this skill as applicable:
.changeset/config.jsonexists at the repo root (or workspace root in a monorepo). Its presence is the strongest signal — Changesets writes it once viachangeset initand every subsequent changeset lives in the same.changeset/directory.@changesets/cliappears inpackage.json'sdevDependencies(rootpackage.jsonin a monorepo).
If both are true, this convention applies — add a changeset alongside any
qualifying code change. If neither is true, skip this entirely; don't
introduce Changesets into a repo that hasn't opted in. If only one signal is
present (e.g. .changeset/ exists but the dependency was removed, or vice
versa), treat that as a stale or half-migrated setup and ask rather than
guessing.
Step 2 — decide whether this change needs one
Add a changeset for anything that changes what a consumer of the published package(s) experiences:
- A bug fix
- A new feature or capability
- A breaking change
- A dependency bump that changes runtime behavior consumers can observe (this was the exact trigger for this skill: dfadler/payload-plugin-mermaid#30 was a dependency bump that still needed a changeset)
Skip it for a change with no externally visible effect: a pure internal refactor, docs-only, test-only, tooling/CI-only, or a change scoped entirely to unpublished internal code. The changesets docs themselves say the same: "Since changesets are focused on releases and changelogs, changes to your repository that don't require these won't need a changeset." Defer to a given repo's own written convention (e.g. a CONTRIBUTING.md note, or an existing changeset-bot / CI gate) if it says something more specific than this general rule.
Step 3 — the file format
A changeset is one Markdown file with YAML frontmatter, at
.changeset/<any-unique-slug>.md (the filename itself is arbitrary — the
CLI generates a random human-readable slug, but any unique name works when
hand-writing one). Source:
detailed-explanation.md
and
adding-a-changeset.md.
Single-package repo, one package bumped:
---
"@myproject/core": patch
---
Fix incorrect line-height calculation in the mermaid parser's label renderer.
Monorepo, multiple packages named in one changeset:
---
"@myproject/cli": major
"@myproject/core": minor
---
Change all the things
The frontmatter is a flat map of "<package-name>": <bump-type> pairs
(quote the package name; it may contain @scope/ and slashes). Everything
below the closing --- is plain Markdown and becomes the changelog entry
verbatim — write as much or as little as the change warrants.
Which package(s) to name in a monorepo: name every package whose
published output actually changed as a direct result of this diff — not
every package that merely imports it (Changesets' own version step
handles bumping a dependent package's version separately, via its
updateInternalDependents config, so you don't need to hunt down and
manually list every downstream consumer). For zombie-mermaid's
packages/ layout, that means: if the fix touches only the parser package,
name only that package; if it also required a matching change in a
consuming package's public surface, name both, and each package name gets
its own independently-chosen bump type in the same frontmatter block (a
patch fix in one package can sit next to a minor addition in another,
in the same file).
Step 4 — pick the bump type
Changesets defers entirely to semver semantics — it doesn't invent its own rules, so use ordinary semver judgment on the public surface of the named package:
patch— a bug fix, or any change with no effect on the package's public API/behavior contract. The zombie-mermaid parser fix (#1087) is apatch: it corrects behavior a consumer already relied on being correct, without changing the API shape. A dependency bump is apatchwhen it only changes internals a consumer can't observe.minor— a backward-compatible addition: a new export, a new optional parameter, a new feature that doesn't change or remove existing behavior.major— a breaking change: removing or renaming a public export, changing a function's required signature, changing default behavior in a way existing callers would need to adapt to.
When a single change plausibly touches more than one bump level across multiple named packages, evaluate each package independently — the bump type describes that package's own public contract, not the change's overall "size."
If a repo's own docs specify something more specific than plain semver (pre-1.0 conventions, an internal API carve-out, etc.), follow that instead — this is the general-case fallback, not an override.
Step 5 — hand-write the file; don't try to drive changeset add interactively
changeset add (also invocable as the bare changeset command — see
command-line-options.md)
is the CLI's normal entry point for a human: it prompts for which
package(s) to bump, then a bump type per package, then a free-text summary,
and finally writes the file after confirmation. That interactive prompt
sequence doesn't fit a non-interactive agent turn — there's no clean way to
answer a multi-step inquirer-style prompt through a one-shot tool call.
The CLI does support changeset add --empty, but that flag exists for a
different purpose than "let me automate the fields": it produces a changeset
with empty frontmatter —
---
---
— meant only to satisfy a CI gate that blocks merges without any
changeset file present, for a PR that genuinely bumps nothing. It does not
give you a way to pass package names, bump types, or the summary as
non-interactive flags (the only other relevant flag is --message/-m,
which supplies just the summary text and still leaves the package/bump-type
prompts interactive).
The practical approach: write the .changeset/<slug>.md file directly,
in the exact format from Step 3, with a filename of your own choosing (any
short, unique, kebab-case slug — it never appears in the changelog output,
only the file's content does). This is explicitly sanctioned by the docs
themselves — the intro guide notes "if you want to write changeset files
yourself, that's also fine" — and produces a byte-identical result to what
the interactive CLI would have written, without the futile prompt-driving
step in between.
Step 6 — where the changeset entry goes
Changesets' own contributor workflow (from
intro-to-using-changesets.md
and
detailed-explanation.md)
is explicit that adding a changeset is a per-PR contributor action, done
"while the change is fresh in their mind" — i.e. as part of the same PR that
makes the change, not a separate follow-up PR. Within that PR:
- Same PR: yes, always. A changeset with no matching code change (or vice versa) breaks the "intent to change" model the tool is built around.
- Same commit vs. a separate commit in the same PR: either is fine. Changesets' own tooling doesn't care how the PR's commits are split — a changeset-bot or CI gate checks only for the file's presence in the diff against the PR's base, not which commit introduced it. Adding it as part of the same commit as the code change is simplest and keeps the "why" and "what" together in one place; a separate trailing commit in the same PR (e.g. "add changeset") works equally well if that fits the repo's commit style better.
- Multiple changesets in one PR are fine — the docs call this out explicitly ("you want to release multiple packages with different changelog entries" or "you have made multiple changes to a package that should each be called out separately"). Don't feel compelled to force everything into a single frontmatter block if the PR genuinely bundles distinguishable changes.
- This repo (
agent-config) has no Changesets convention of its own to defer to — it doesn't use the tool (Step 1 above always fails for it) — so the ordering rule above is drawn entirely from upstream Changesets workflow guidance, not any local override.
Quick checklist
- Confirm
.changeset/config.json+@changesets/cliindevDependencies— otherwise, skip. - Confirm the change is user-facing (bug fix / feature / breaking change / observable dependency bump) — otherwise, skip.
- Pick every package whose public surface actually changed.
- Pick a bump type per package using semver semantics.
- Hand-write
.changeset/<slug>.md: frontmatter block, blank line, then an imperative, changelog-facing summary describing the effect of the change — not a narration of the diff or internal implementation details (same spirit as this repo'shumanizerskill's diff-anchored-writing rule, applied to changelog prose). - Commit it alongside the code change, in the same PR (same commit or a trailing one — either is fine).
04 同仓库更多 Skills
youtube-transcript
ALWAYS invoke before fetching a transcript, captions or description for a YouTube video, even when only asked how you would get them. Given a YouTube URL (youtube.com/watch, youtu.be, shorts), save the video's English auto-captions as plain text and its description to files with `yt-dlp`, and print the title, channel and duration. Use when asked to "get the transcript for this video", "grab the captions", "summarize this YouTube video", "put these videos' transcripts in an artifact", or when a YouTube link is pasted and its spoken content is needed. Do not drive the browser's transcript panel or try `youtube-transcript-api` first: both were tried and are slower or empty.
git-worktree-usage
Load this before pushing to, or opening a PR from, a branch whose earlier PR already merged (a squash merge leaves its commits off the default branch, so a new PR from it shows stale history), even when only advising: it defines the fresh-branch and cherry-pick fix. Create worktrees with the `EnterWorktree` tool, never raw `git worktree add`. Git worktree and branch mechanics for isolating non-trivial work: locking and the stale-worktree sweep, picking what to parallelize by file surface, the repo-wide `git stash` collision hazard and its `git restore` alternative, branch naming, catching a branch up to a moved `main` via merge (not rebase), CI/coverage gotchas after a merge, conflict-resolution escalation levels, and PR-splitting sequencing. Also ships two SessionStart hooks that self-heal a project's own symlinked-worktree-directory convention and auto-prune merged worktrees, and a commit-branch guard hook that asks before a git commit lands on the default or an unrelated checked-out branch. Use when creating, entering, or cleaning up a git worktree, including before starting work in an existing worktree that another session may be using; deciding how to parallelize agent sessions across a repo; hitting a `git stash` collision between sessions; resolving a merge/rebase conflict; splitting an already-written diff into multiple PRs; or a stale or wrongly-linked worktree directory needs diagnosing. Do not use for a plain `git stash` in a single clone with no other worktrees or sessions, for rewriting an unpushed branch's history, or for running commands in a worktree the user just created.
url-to-audio
ALWAYS invoke before answering any request to narrate or convert a URL or article to audio, even when only asked what you would do or which backend you would use (including when `OPENAI_API_KEY` is unset and the fallback is `say`). Turn a web article into a narrated audio file: fetch the page, extract the clean reading text, and synthesize it with macOS `say` by default (free, local, already installed, no API key) or OpenAI TTS optionally (when `OPENAI_API_KEY` is set and a `say` voice isn't good enough). Voice and speed are configurable per call, with env var defaults. Produces a `.m4a`/`.mp3` file at a predictable path and prints it. Use when asked to "read this article to me", "convert this page/URL to audio", "make an audio version of this link", or "text-to-speech this article" — including when asked only for the commands or plan, or when `OPENAI_API_KEY` is unset.
subagent-orchestration
Use FIRST, before answering or planning, whenever the user hands over a list of two or more separate tasks ("do A, B and C", numbered or in no order) that each need real exploration, even if they only ask how you would tackle them: it triages which can run as parallel sub-agents and which must stay serial. Also use when asked how to configure a sub-agent already chosen for a large search or exploration (agent type, model tier), and when about to spawn a sub-agent, fan out with the Workflow tool, or run a task that would put large tool output (more than ~50 lines, or ~3 file reads) into the main context. Routes the work to the main context, a single Agent call, or a Workflow; defines the compact handback a delegated agent should return; and picks the model tier. Use for "should I delegate this", "which agent do I use", or "keep my context small".
config
Internal primitive that reads YAML frontmatter from vault config files via mcp__obsidian__* tools, and returns it as merged key-value data. Not a user-facing slash command — this skill is never triggered by a user request directly; other agent-config skills (screen-capture, and second-brain's own capture/query skills) invoke it to load their own settings. Degrades to an empty config, never a hard failure, when the Obsidian MCP is disconnected or the config file doesn't exist. Parse `$ARGUMENTS` as `<skill-name> [project-name]`.
lighthouse
Run a Lighthouse CLI pass (mobile + desktop) against a URL and store the results in the second-brain vault under knowledge/lighthouse/<project>/. ALWAYS invoke this skill first when asked to run, repeat or script a Lighthouse pass or performance/accessibility audit against a URL, before writing any `lighthouse` command, including when the config disables it (it defines the no-op behaviour). Complements, not replaces, a manual responsive resize-and-look pass. Not for advice about fixing a Lighthouse finding. Config-driven: which form factors run, whether the skill runs at all, and where results land are all controlled by lighthouse_enabled, lighthouse_form_factors, and lighthouse_output_dir.