用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/getsentry/action-release --skill verify-dist命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | verify-dist |
| description | Regenerate and commit dist/index.js when source files or runtime deps change |
| argument-hint | ["--check | --fix"] |
action-release ships a bundle in dist/ built by ncc. The verify-dist CI workflow (.github/workflows/verify-dist.yml) fails any PR where the committed bundle does not match the source. This skill keeps them in sync locally.
dist/ is a directory, not a single file. Alongside dist/index.js, ncc emits code-split chunks (dist/319.index.js and friends) for every dynamic import() in a dependency. @opentelemetry/resources loads its per-platform getMachineId that way, so the chunks arrive with @sentry/node. index.js loads them at runtime with a relative require, so they must sit next to it and must all be committed.
src/.package.json (anything under dependencies, not devDependencies).--check (default)Report whether dist/ is in sync with the current source tree. Do not modify anything.
yarn install --frozen-lockfile
yarn build
git diff --ignore-space-at-eol --stat dist/
git ls-files --others --exclude-standard dist/ # new chunks show up here, not in git diff
dist/ is in sync. Done.--fix.--fixRebuild and stage dist/.
yarn install
yarn build
git add dist/
git status --short dist/
Do not commit automatically — let the user review the bundle diff first. A reasonable follow-up commit message:
build: regenerate dist/index.js
Or, if tied to a source change:
<type>(<scope>): <summary>
Regenerates dist/index.js.
Whoever runs the follow-up commit needs the repo's pre-commit hooks installed. Verify with ls .git/hooks/pre-commit; if missing, run make (installs yarn deps + pre-commit install) or pre-commit install.
The set-docker-tag-from-branch hook will rewrite action.yml on the first commit of a branch and fail the commit. Recover by staging action.yml and committing again (never --amend — the hook-failed commit never landed):
git add action.yml
git commit -m "<same message>"
CI does not run pre-commit. CI's prepare-docker job rejects PRs where action.yml's Docker tag still matches a semver like 3.6.0, so keeping the tag in sync via the local hook is what prevents the CI failure.
git diff --ignore-space-at-eol dist/ — whitespace-only diffs pass, anything else fails. Match that locally.dist/ via git ls-files --others --exclude-standard dist/. git diff alone never reports a brand-new chunk, so a missing chunk would otherwise pass CI and only break at runtime on whichever platform needs it.yarn build shells out to ncc build src/main.ts -e @sentry/cli. @sentry/cli is deliberately excluded from the bundle because it ships its own native binaries at runtime.dist/index.js or any chunk. Always regenerate..github/workflows/verify-dist.yml — the CI check this skill satisfies.package.json → scripts.build — the canonical build command.src/main.ts — the ncc entry point.