npm-release
cc-devflow npmパッケージの新しいバージョンをnpmレジストリに公開する準備ができた際に、リリース作業をスムーズに進めるために活用するSkill。
📜 元の英語説明(参考)
Use when ready to publish a new version of cc-devflow npm package to npm registry
🇯🇵 日本人クリエイター向け解説
cc-devflow npmパッケージの新しいバージョンをnpmレジストリに公開する準備ができた際に、リリース作業をスムーズに進めるために活用するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o npm-release.zip https://jpskill.com/download/18696.zip && unzip -o npm-release.zip && rm npm-release.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/18696.zip -OutFile "$d\npm-release.zip"; Expand-Archive "$d\npm-release.zip" -DestinationPath $d -Force; ri "$d\npm-release.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
npm-release.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
npm-releaseフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
NPM リリースワークフロー
概要
cc-devflow npm パッケージの標準化されたリリースプロセスで、一貫性のあるバージョン管理、変更履歴の保守、安全な公開を保証します。
コア原則: アトミックなリリース - すべてのバージョンマーカー (package.json, CHANGELOG.md, git tag) は同期を保つ必要があります。
使用するタイミング
このスキルは、以下の場合に使用します。
- ✅ cc-devflow の新しいバージョンをリリースする準備ができた
- ✅ すべての変更がコミットされ、プッシュされた
- ✅ クリーンなワーキングディレクトリを持つ main ブランチ上にいる
- ✅ npm レジストリに公開する必要がある
以下の場合には使用しないでください。
- ❌ ワーキングディレクトリにコミットされていない変更がある
- ❌ main ブランチ上にいない
- ❌ プレリリース/ベータ版 (適応が必要)
リリースの種類
Semantic Versioning に従ってください。
| タイプ | バージョン変更 | タイミング |
|---|---|---|
| Patch | 2.4.3 → 2.4.4 | バグ修正、軽微な改善 |
| Minor | 2.4.4 → 2.5.0 | 新機能、後方互換性あり |
| Major | 2.5.0 → 3.0.0 | 破壊的な変更 |
完全なワークフロー
フェーズ 1: リリース前チェック
# 1. git のステータスを確認
git status
# 以下が表示される必要があります: "On branch main", "working tree clean"
# 2. 現在のバージョンを確認
cat package.json | grep version
# 例: "version": "2.4.3"
# 3. 最近の変更を確認
git log --oneline -10
以下の場合、STOP:
- main ブランチ上にいない
- コミットされていない変更が存在する
- プッシュされていないコミットが存在する
フェーズ 2: バージョン更新
ステップ 1: CHANGELOG.md を更新
新しいバージョンセクションを先頭 ( --- の後) に追加します。
## [X.Y.Z] - YYYY-MM-DD
### 🎯 リリースタイトル
主な変更点の簡単な説明。
#### 変更 / 追加 / 修正
- 箇条書き 1
- 箇条書き 2
#### メリット
- ✅ メリット 1
- ✅ メリット 2
ステップ 2: package.json を更新
# 手動で編集するか、npm version を使用
npm version patch --no-git-tag-version # パッチリリースの場合
npm version minor --no-git-tag-version # マイナーリリースの場合
npm version major --no-git-tag-version # メジャーリリースの場合
または直接編集:
{
"version": "X.Y.Z"
}
フェーズ 3: Git 操作
ステップ 1: リリースコミットを作成
git add CHANGELOG.md package.json
git commit -m "$(cat <<'EOF'
chore(release): bump version to X.Y.Z
Release X.Y.Z - [簡単なタイトル]
主要变更:
- 变更点 1
- 变更点 2
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
EOF
)"
ステップ 2: 注釈付きタグを作成
git tag -a vX.Y.Z -m "$(cat <<'EOF'
Release vX.Y.Z - [簡単なタイトル]
🎯 主な変更点:
- 変更点 1
- 変更点 2
メリット:
✅ メリット 1
✅ メリット 2
完全な変更履歴: https://github.com/Dimon94/cc-devflow/blob/main/CHANGELOG.md
EOF
)"
ステップ 3: 確認
# コミットを確認
git log --oneline -1
# タグを確認
git tag -l "v2.4.*" | tail -3
# タグの注釈を確認
git show vX.Y.Z
フェーズ 4: 公開
ステップ 1: GitHub にプッシュ
# コミットをプッシュ
git push origin main
# タグをプッシュ
git push origin vX.Y.Z
# またはすべてのタグをプッシュ: git push origin --tags
ステップ 2: GitHub リリースを作成 (オプション)
GitHub CLI 経由:
gh release create vX.Y.Z \
--title "vX.Y.Z - [タイトル]" \
--notes-file <(sed -n '/## \[X.Y.Z\]/,/## \[/p' CHANGELOG.md | head -n -1)
または手動で: https://github.com/Dimon94/cc-devflow/releases/new
ステップ 3: npm に公開
# まず公開をテスト (ドライラン)
npm publish --dry-run
# 実際の公開
npm publish
# 公開を確認
npm view cc-devflow version
クイックリファレンス
| ステップ | コマンド | 目的 |
|---|---|---|
| ステータスを確認 | git status |
クリーンな状態を確認 |
| バージョンを確認 | grep version package.json |
現在のバージョン |
| バージョンを上げる | package.json を編集 | バージョン番号を更新 |
| 変更履歴を更新 | CHANGELOG.md を編集 | 変更点を記録 |
| コミットを作成 | git commit -m "chore(release): ..." |
バージョン上げをコミット |
| タグを作成 | git tag -a vX.Y.Z -m "..." |
リリースにタグ付け |
| コミットをプッシュ | git push origin main |
GitHub にプッシュ |
| タグをプッシュ | git push origin vX.Y.Z |
GitHub にタグをプッシュ |
| npm を公開 | npm publish |
レジストリに公開 |
よくある間違い
❌ 間違い 1: CHANGELOG.md の更新を忘れる
問題: バージョンは上がったが、変更履歴のエントリがない
修正: コミットする前に必ず CHANGELOG.md を更新する
❌ 間違い 2: バージョン番号の不一致
問題: package.json には 2.4.4 と表示されているが、CHANGELOG.md には 2.4.3 と表示されている
修正: コミットする前に、すべてのバージョン番号が一致していることを再確認する
❌ 間違い 3: コミットの前にタグをプッシュする
問題: タグが間違ったコミットを指している
修正: 常に最初にコミットし、次にタグ付けし、次に両方をまとめてプッシュする
❌ 間違い 4: npm publish をテストしない
問題: 公開されたパッケージが壊れている
修正: 最初に npm publish --dry-run を実行して問題を検出する
❌ 間違い 5: プッシュ中のネットワークタイムアウト
問題: Failed to connect to github.com port 443
修正:
# オプション 1: ネットワークが安定した後、再試行
git push origin main
git push origin vX.Y.Z
# オプション 2: SSH に切り替える (HTTPS がブロックされている場合)
git remote set-url origin git@github.com:Dimon94/cc-devflow.git
git push origin main
ネットワークのトラブルシューティング
git push がタイムアウトで失敗する場合:
-
ネットワーク接続を確認:
curl -I https://github.com 2>&1 | head -5 -
HTTPS の代わりに SSH を試す:
git remote -v # 現在のリモート URL を確認 git remote set-url origin git@github.com:Dimon94/cc-devflow.git -
SSH が失敗する場合 (publickey エラー):
- SSH キーを確認:
ssh -T git@github.com - SSH キーを GitHub に追加: https://github.com/settings/keys
- または HTTPS を維持して後で再試行
- SSH キーを確認:
-
コミットとタグはローカルで安全:
- 失われることはありません
- ネットワークが利用可能なときにプッシュ
リリース後の検証
リリースが成功した後:
# 1. GitHub タグを確認
open https://github.com/Dimon94/cc-devflow/tags
# 2. npm パッケージを確認
npm view cc-devflow version
npm view cc-devflow time
# 3. インストールをテスト
npm install -g cc-devflow@latest
cc-devflow --version # 新しいバージョンが表示されるはずです
ロールバック (必要な場合)
公開されたバージョンに重大なバグがある場合:
# 1. npm から公開を取り消す (72 時間以内)
npm 📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
NPM Release Workflow
Overview
Standardized release process for cc-devflow npm package ensuring consistent versioning, changelog maintenance, and safe publishing.
Core Principle: Atomic release - all version markers (package.json, CHANGELOG.md, git tag) must stay in sync.
When to Use
Use this skill when:
- ✅ Ready to release a new version of cc-devflow
- ✅ All changes committed and pushed
- ✅ On main branch with clean working directory
- ✅ Need to publish to npm registry
Don't use when:
- ❌ Working directory has uncommitted changes
- ❌ Not on main branch
- ❌ Pre-release/beta versions (needs adaptation)
Release Types
Follow Semantic Versioning:
| Type | Version Change | When |
|---|---|---|
| Patch | 2.4.3 → 2.4.4 | Bug fixes, minor improvements |
| Minor | 2.4.4 → 2.5.0 | New features, backward compatible |
| Major | 2.5.0 → 3.0.0 | Breaking changes |
Complete Workflow
Phase 1: Pre-Release Checks
# 1. Verify git status
git status
# MUST show: "On branch main", "working tree clean"
# 2. Check current version
cat package.json | grep version
# e.g., "version": "2.4.3"
# 3. Review recent changes
git log --oneline -10
STOP if:
- Not on main branch
- Uncommitted changes exist
- Unpushed commits exist
Phase 2: Version Updates
Step 1: Update CHANGELOG.md
Add new version section at the top (after ---):
## [X.Y.Z] - YYYY-MM-DD
### 🎯 Release Title
Brief description of main changes.
#### Changed / Added / Fixed
- Bullet point 1
- Bullet point 2
#### Benefits
- ✅ Benefit 1
- ✅ Benefit 2
Step 2: Update package.json
# Manually edit or use npm version
npm version patch --no-git-tag-version # For patch release
npm version minor --no-git-tag-version # For minor release
npm version major --no-git-tag-version # For major release
Or edit directly:
{
"version": "X.Y.Z"
}
Phase 3: Git Operations
Step 1: Create Release Commit
git add CHANGELOG.md package.json
git commit -m "$(cat <<'EOF'
chore(release): bump version to X.Y.Z
Release X.Y.Z - [Brief title]
主要变更:
- 变更点 1
- 变更点 2
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
EOF
)"
Step 2: Create Annotated Tag
git tag -a vX.Y.Z -m "$(cat <<'EOF'
Release vX.Y.Z - [Brief title]
🎯 Main changes:
- Change 1
- Change 2
Benefits:
✅ Benefit 1
✅ Benefit 2
Full changelog: https://github.com/Dimon94/cc-devflow/blob/main/CHANGELOG.md
EOF
)"
Step 3: Verify
# Check commit
git log --oneline -1
# Check tag
git tag -l "v2.4.*" | tail -3
# Verify tag annotation
git show vX.Y.Z
Phase 4: Publish
Step 1: Push to GitHub
# Push commits
git push origin main
# Push tags
git push origin vX.Y.Z
# Or push all tags: git push origin --tags
Step 2: Create GitHub Release (Optional)
Via GitHub CLI:
gh release create vX.Y.Z \
--title "vX.Y.Z - [Title]" \
--notes-file <(sed -n '/## \[X.Y.Z\]/,/## \[/p' CHANGELOG.md | head -n -1)
Or manually at: https://github.com/Dimon94/cc-devflow/releases/new
Step 3: Publish to npm
# Test publish first (dry-run)
npm publish --dry-run
# Actual publish
npm publish
# Verify publication
npm view cc-devflow version
Quick Reference
| Step | Command | Purpose |
|---|---|---|
| Check status | git status |
Verify clean state |
| Check version | grep version package.json |
Current version |
| Bump version | Edit package.json | Update version number |
| Update changelog | Edit CHANGELOG.md | Document changes |
| Create commit | git commit -m "chore(release): ..." |
Commit version bump |
| Create tag | git tag -a vX.Y.Z -m "..." |
Tag release |
| Push commits | git push origin main |
Push to GitHub |
| Push tags | git push origin vX.Y.Z |
Push tag to GitHub |
| Publish npm | npm publish |
Publish to registry |
Common Mistakes
❌ Mistake 1: Forgetting to Update CHANGELOG.md
Problem: Version bumped but no changelog entry
Fix: Always update CHANGELOG.md BEFORE committing
❌ Mistake 2: Inconsistent Version Numbers
Problem: package.json shows 2.4.4 but CHANGELOG.md shows 2.4.3
Fix: Double-check all version numbers match before committing
❌ Mistake 3: Pushing Tag Before Commit
Problem: Tag points to wrong commit
Fix: Always commit first, then tag, then push both together
❌ Mistake 4: Not Testing npm publish
Problem: Published package is broken
Fix: Run npm publish --dry-run first to catch issues
❌ Mistake 5: Network Timeout During Push
Problem: Failed to connect to github.com port 443
Fix:
# Option 1: Retry after network stabilizes
git push origin main
git push origin vX.Y.Z
# Option 2: Switch to SSH (if HTTPS blocked)
git remote set-url origin git@github.com:Dimon94/cc-devflow.git
git push origin main
Network Troubleshooting
If git push fails with timeout:
-
Check network connectivity:
curl -I https://github.com 2>&1 | head -5 -
Try SSH instead of HTTPS:
git remote -v # Check current remote URL git remote set-url origin git@github.com:Dimon94/cc-devflow.git -
If SSH fails (publickey error):
- Check SSH key:
ssh -T git@github.com - Add SSH key to GitHub: https://github.com/settings/keys
- Or stay with HTTPS and retry later
- Check SSH key:
-
Commits and tags are safe locally:
- They won't be lost
- Push when network is available
Post-Release Verification
After successful release:
# 1. Verify GitHub tag
open https://github.com/Dimon94/cc-devflow/tags
# 2. Verify npm package
npm view cc-devflow version
npm view cc-devflow time
# 3. Test installation
npm install -g cc-devflow@latest
cc-devflow --version # Should show new version
Rollback (If Needed)
If published version has critical bugs:
# 1. Unpublish from npm (within 72 hours)
npm unpublish cc-devflow@X.Y.Z
# 2. Delete git tag locally and remotely
git tag -d vX.Y.Z
git push origin :refs/tags/vX.Y.Z
# 3. Revert commit
git revert HEAD
# 4. Fix bug and re-release with new patch version
Note: npm unpublish is only available within 72 hours of publication. After that, publish a new patch version instead.
Real-World Impact
Following this workflow ensures:
- ✅ Consistency: All version markers stay in sync
- ✅ Traceability: Clear changelog and git history
- ✅ Safety: Dry-run catches issues before publishing
- ✅ Recoverability: Can rollback if needed
- ✅ Automation-ready: Scriptable workflow for future CI/CD
[PROTOCOL]: 变更时更新此头部,然后检查 CLAUDE.md