🔧 chore: release skill とリリース記録のレビュー指摘を反映#277
Conversation
## SKILL.md
- **タグ作成手順を SHA 明示型に修正** (Codex P1)
- 旧: `git tag vX.Y.Z`(HEAD に打つ。main が進むと誤タグ)
- 新: `git log --oneline | grep release` でリリースコミット SHA を特定し
`git tag vX.Y.Z $RELEASE_SHA` で明示。tag ref で publish workflow を回す
- **npm publish のトラブルシューティングを実体験で拡充**
- `npm error code E404` は認証失敗を 404 で隠す npm 仕様(NPM_TOKEN 期限切れ等)
- `npm error code EOTP` はトークン種別が 2FA バイパス非対応
- Classic → Automation 型 or Granular → 「Bypass 2FA when publishing」
- **pnpm.overrides の記述を本リポジトリの実態に合わせる** (Copilot)
- 旧: pnpm 10+ では pnpm-workspace.yaml に書く必要があると断定
- 新: 本リポジトリは package.json の pnpm.overrides 運用。ローカル/CI の
pnpm バージョン差で lockfile が書き換わる場合があると注意喚起
- **worktree 規約を緩和** (CodeRabbit)
- `.claude/worktrees/<name>` は CLAUDE.md に記載されない既存運用の慣例。
skill 側で「worktree なしでも可」と明示
## CHANGELOG.md
- v1.0.3 の参照を `(#263)` `(#268)` → `(#272, closes #263, #268)` に修正 (Copilot)
- #263 / #268 は issue 番号、実 PR は #272 だった
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Walkthroughリリース手順ドキュメント( Changesリリース手順ドキュメント整備
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.claude/skills/release-sparkle-design/SKILL.md:
- Line 116: The sentence that asserts "workflow fails with npm error code E404
... is due to NPM_TOKEN expiration" must be changed to avoid definitive
attribution; update the text in SKILL.md so it advises to first check NPM_TOKEN
while also verifying package name and registry configuration (e.g., replace the
line mentioning "NPM_TOKEN の期限切れ(auth 失敗が 404 …)" with guidance like "まず
NPM_TOKEN を確認しつつ、name/registry の設定も確認してください" and remove the absolute claim that
E404 equals token expiry). Keep the mention of the npm registry behavior as a
possible cause but not the sole cause.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c02be0c2-8a53-4f0e-9a52-dcbe0b1c7629
📒 Files selected for processing (2)
.claude/skills/release-sparkle-design/SKILL.mdCHANGELOG.md
| ```bash | ||
| gh workflow run "Publish to npm" --ref vX.Y.Z | ||
| ``` | ||
| - workflow が `npm error code E404 'pkg@X.Y.Z' is not in this registry` で失敗する場合は **NPM_TOKEN の期限切れ**(auth 失敗が 404 として返る npm registry 仕様) |
There was a problem hiding this comment.
E404 の原因を期限切れに断定しないでください。
npm error code E404 は認証失敗以外(レジストリ設定・パッケージ名不整合など)でも発生するため、期限切れ断定は誤誘導になり得ます。まず NPM_TOKEN を確認しつつ、name/registry も確認 の表現にしてください。
修正案
- - workflow が `npm error code E404 'pkg@X.Y.Z' is not in this registry` で失敗する場合は **NPM_TOKEN の期限切れ**(auth 失敗が 404 として返る npm registry 仕様)
+ - workflow が `npm error code E404 'pkg@X.Y.Z' is not in this registry` で失敗する場合は、まず **NPM_TOKEN の期限切れ/権限不足** を確認(auth 失敗が 404 として返ることがある)。あわせて package 名・registry 設定も確認する📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - workflow が `npm error code E404 'pkg@X.Y.Z' is not in this registry` で失敗する場合は **NPM_TOKEN の期限切れ**(auth 失敗が 404 として返る npm registry 仕様) | |
| - workflow が `npm error code E404 'pkg@X.Y.Z' is not in this registry` で失敗する場合は、まず **NPM_TOKEN の期限切れ/権限不足** を確認(auth 失敗が 404 として返ることがある)。あわせて package 名・registry 設定も確認する |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.claude/skills/release-sparkle-design/SKILL.md at line 116, The sentence
that asserts "workflow fails with npm error code E404 ... is due to NPM_TOKEN
expiration" must be changed to avoid definitive attribution; update the text in
SKILL.md so it advises to first check NPM_TOKEN while also verifying package
name and registry configuration (e.g., replace the line mentioning "NPM_TOKEN
の期限切れ(auth 失敗が 404 …)" with guidance like "まず NPM_TOKEN を確認しつつ、name/registry
の設定も確認してください" and remove the absolute claim that E404 equals token expiry). Keep
the mention of the npm registry behavior as a possible cause but not the sole
cause.
There was a problem hiding this comment.
Pull request overview
PR #275 / #276 で受けたレビュー指摘を反映し、リリース手順スキル(release-sparkle-design)の手順精度向上と、実際に遭遇した npm publish トラブル(NPM_TOKEN / 2FA 関連)のトラブルシューティング統合、ならびに CHANGELOG の参照番号修正を行う変更です。
Changes:
- CHANGELOG の v1.0.3 Added セクションで、issue 番号参照を PR 番号(#272)+ closes issue に修正
- リリーススキルで「タグを打つ SHA を明示する」手順へ更新し、GitHub Release notes 生成手順を調整
- npm publish 失敗時(E404/EOTP)に関するトラブルシュートをチェックリスト化
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| CHANGELOG.md | v1.0.3 の Added 記載を PR #272 + closes issue 形式に修正 |
| .claude/skills/release-sparkle-design/SKILL.md | タグ作成手順の改善、Release notes 作成例の更新、npm publish トラブルシュート追記 |
| - [ ] **リリースコミットの SHA を `git log --oneline | grep release | head -1` で必ず特定** | ||
| - [ ] **タグはリリースコミットの SHA を明示して打つ**(HEAD に打つと main が進んだ場合に誤タグ → publish 漏れ・誤 publish の温床): | ||
| ```bash |
| - [ ] **GitHub Release 作成**: | ||
| CHANGELOG.md のセクションを `--notes` で直接渡すのが確実: | ||
| ```bash | ||
| gh release create vX.Y.Z --title "vX.Y.Z" --notes "$(awk '/^## \[X\.Y\.Z\]/,/^## \[/' CHANGELOG.md | sed '$d')" | ||
| awk '/^## \[X\.Y\.Z\]/{flag=1;next} /^## \[/{flag=0} flag' CHANGELOG.md > /tmp/notes.md | ||
| gh release create vX.Y.Z --title "vX.Y.Z" --notes-file /tmp/notes.md | ||
| ``` |
| - `pnpm-lock.yaml` の整合性が崩れていないか確認(`pnpm install --frozen-lockfile` を試す) | ||
| - `pnpm.overrides` を package.json に書いていると pnpm 10+ では読まれない場合がある。`pnpm-workspace.yaml` 側の `overrides:` フィールドへの移行を検討 | ||
| - `NPM_TOKEN` の有効期限切れも疑う(リポジトリ Secrets を確認) | ||
| - `pnpm.overrides` は本リポジトリでは `package.json` の `pnpm.overrides` に置く運用(CI が使う pnpm のバージョンで読まれることを確認済み)。ローカルの pnpm バージョンが大幅に違うと挙動差で lockfile が書き換わることがあるので、ローカルで pnpm install するときは lockfile の差分(特に `overrides:` セクション)を確認すること |
Summary
PR #275 / PR #276 で受けたレビュー指摘を反映し、リリースで実際に起きたトラブル(NPM_TOKEN 関連)を skill のトラブルシューティングに統合します。
レビュー指摘への対応
Codex (P1) — タグ作成手順を SHA 明示型に修正
旧:
git tag vX.Y.Z(HEAD にタグを打つ)新:
```bash
RELEASE_SHA=$(git log --oneline | grep "release vX.Y.Z" | head -1 | awk '{print $1}')
git tag vX.Y.Z "$RELEASE_SHA"
git push origin vX.Y.Z
```
PR マージと tag 作成の間に main が進んだ場合、HEAD にタグを打つと無関係なコミットを含むタグになり、
gh workflow run ... --ref vX.Y.Zで誤った内容が publish される危険がありました。Copilot — CHANGELOG の PR/issue 番号
v1.0.3 の Added セクションで
(#263)(#268)を参照していたが、これらは issue 番号で、実際の PR は #272。(#272, closes #263)/(#272, closes #268)に修正。Copilot — pnpm.overrides の記述を実態に合わせる
skill の旧記述は「pnpm 10+ では
pnpm.overridesをpnpm-workspace.yamlに書く必要がある」と断定していたが、本リポジトリは pnpm 10.x でpackage.jsonのpnpm.overrides運用で動いている。実態に合わせて「本リポジトリは package.json 運用」と明記し、ローカル/CI の pnpm バージョン差で lockfile が書き換わる場合の注意に修正。CodeRabbit — worktree 規約
.claude/worktrees/<name>は CLAUDE.md に記載されていない既存運用の慣例。skill 側で「worktree なしでchore/release-X.Y.Zブランチを直接切る運用でも可」と緩和し、必須ではないことを明示。リリース時に実体験した内容を追記
npm error code E404('pkg@X.Y.Z' is not in this registry) は 認証失敗を 404 として隠す npm registry の仕様。NPM_TOKEN の期限切れや権限不足を最初に疑うnpm error code EOTP(one-time password required) は トークン種別が 2FA バイパス非対応。実際 v1.0.4 publish で E404 → EOTP の順で遭遇したので、次回の作業者が同じ罠を踏まないようチェックリスト化。
Test plan
gh workflow run "Publish Skills"を実行してスキル側もリリース🤖 Generated with Claude Code