setup について
bitwize-music の setup スキルは、Python 環境を検出し、プラグインのコンポーネントを確認して依存関係のインストールを案内します。統一された仮想環境を使い、導入後の検証手順も示します。
主な機能
- 01Python 環境の検出
- 02仮想環境内のコンポーネント確認
- 03依存関係のインストールコマンド提示
- 04導入後の検証案内
活用シーン
- 01bitwize-music の依存関係を初めて導入
- 02プラグインの準備状況を確認
- 03チェック結果に応じた再導入や検証
MCP 対応
導入後、MCP サーバーが Claude Code の `/plugin` ステータスで稼働中と表示されることを確認するよう案内します。
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ bitwize-music-studio/ claude-ai-music-skills --skill setupインストール後、Claude Code で/setupを入力して読み込まれたか確認します。
詳細
このスキルのベースディレクトリ:${CLAUDE_PLUGIN_BASE_DIR}
タスク
Python 環境と希望するコンポーネントに基づいて、bitwize-music プラグインの依存関係のインストールをユーザーに案内します。
セットアップアシスタント
プラグインの依存関係のインストールと確認を支援します。
ステップ 1:環境を検出する
以下の確認を並行して実行します:
# Python version
python3 --version
# Check if externally managed
python3 -c "import sysconfig; print(sysconfig.get_path('purelib'))" 2>&1 | grep -q "/usr" && echo "EXTERNALLY_MANAGED" || echo "USER_MANAGED"
# Check for pipx
command -v pipx >/dev/null 2>&1 && echo "pipx: installed" || echo "pipx: not installed"
# Check for venv support
python3 -m venv --help >/dev/null 2>&1 && echo "venv: supported" || echo "venv: not supported"
# Platform
uname -s
ステップ 2:コンポーネントの状態を確認する
重要: 以下の確認は並行ではなく、順番に実行します。確認に失敗した場合も、残りの確認を続けて全体の状態を表示します。
最重要: システムの Python ではなく、必ず venv を確認してください!
# Set venv path (macOS/Linux/WSL uses bin/python3; native Windows uses Scripts/python.exe)
VENV_PYTHON=~/.bitwize-music/venv/bin/python3
[ -f "$VENV_PYTHON" ] || VENV_PYTHON=~/.bitwize-music/venv/Scripts/python.exe
# Check if venv exists
if [ -f "$VENV_PYTHON" ]; then
echo "✅ Venv exists at ~/.bitwize-music/venv"
# Check each component in the venv
# 2.x serves MCPServer from mcp.server.mcpserver, 1.x serves FastMCP from
# mcp.server.fastmcp; the server takes either, so probe both (#537).
$VENV_PYTHON -c "import mcp.server.mcpserver" 2>/dev/null || $VENV_PYTHON -c "import mcp.server.fastmcp" 2>/dev/null && echo "✅ mcp installed" || echo "❌ mcp not installed (need mcp[cli]>=1.28.1,<3)"
$VENV_PYTHON -c "import matchering; print('✅ matchering installed')" 2>&1 || echo "❌ matchering not installed"
$VENV_PYTHON -c "import boto3; print('✅ boto3 installed')" 2>&1 || echo "❌ boto3 not installed"
$VENV_PYTHON -c "from playwright.sync_api import sync_playwright; print('✅ playwright installed')" 2>&1 || echo "❌ playwright not installed"
# Check for version drift against requirements.txt
$VENV_PYTHON -c "
import importlib.metadata, pathlib
reqs = pathlib.Path('${CLAUDE_PLUGIN_ROOT}/requirements.txt').read_text()
stale = []
for line in reqs.splitlines():
line = line.split('#')[0].strip()
if not line or '==' not in line:
continue
name, _, ver = line.partition('==')
name = name.split('[')[0].strip()
try:
installed = importlib.metadata.version(name)
if installed != ver:
stale.append(f' {name}: {installed} → {ver}')
except importlib.metadata.PackageNotFoundError:
stale.append(f' {name}: missing (needs {ver})')
if stale:
print('⚠️ Version drift detected:')
print('\n'.join(stale))
else:
print('✅ All package versions match requirements.txt')
" 2>&1
else
echo "❌ Venv not found at ~/.bitwize-music/venv"
echo " Run: python3 -m venv ~/.bitwize-music/venv # macOS/Linux/WSL"
echo " Or: py -3 -m venv ~/.bitwize-music/venv # Windows"
fi
すべてのコンポーネントは、requirements.txt を使って venv にまとめてインストールされます。
ステップ 3:インストールコマンドを表示する
必ず統一された venv の方法を使用してください。すべてのプラットフォームで動作し、プラグインによって自動検出されます。
# Create unified venv (if it doesn't exist)
python3 -m venv ~/.bitwize-music/venv # macOS/Linux/WSL
py -3 -m venv ~/.bitwize-music/venv # Windows (native)
# Install ALL plugin dependencies
~/.bitwize-music/venv/bin/pip install -r ${CLAUDE_PLUGIN_ROOT}/requirements.txt # macOS/Linux/WSL
~/.bitwize-music/venv/Scripts/python.exe -m pip install -r ${CLAUDE_PLUGIN_ROOT}/requirements.txt # Windows (native)
# Set up document hunter browser
~/.bitwize-music/venv/bin/playwright install chromium # macOS/Linux/WSL
~/.bitwize-music/venv/Scripts/playwright.exe install chromium # Windows (native)
以上です! プラグインがプラットフォームの venv(macOS/Linux/WSL では ~/.bitwize-music/venv、ネイティブ Windows では %USERPROFILE%\.bitwize-music\venv)を自動検出して使用します。設定は不要です。
対応環境:
- ✅ Linux(外部管理の Python)
- ✅ macOS
- ✅ Windows(ネイティブ — Core ティア、ベストエフォート。オーディオツールには WSL2 が必要です)
- ✅ Windows(WSL)
- ✅ その他すべてのシステム
ステップ 4:インストールガイド
明確で簡潔なインストールガイドを提示します:
- 検出された環境:[Python のバージョン、プラットフォーム]
- 不足しているコンポーネント:[インストールが必要なものの一覧]
- インストールコマンド:
python3 -m venv ~/.bitwize-music/venv # macOS/Linux/WSL ~/.bitwize-music/venv/bin/pip install -r ${CLAUDE_PLUGIN_ROOT}/requirements.txt # macOS/Linux/WSL ~/.bitwize-music/venv/bin/playwright install chromium # macOS/Linux/WSL py -3 -m venv ~/.bitwize-music/venv # Windows (native) ~/.bitwize-music/venv/Scripts/python.exe -m pip install -r ${CLAUDE_PLUGIN_ROOT}/requirements.txt # Windows (native) ~/.bitwize-music/venv/Scripts/playwright.exe install chromium # Windows (native) - インストール後:
- プラグインを再読み込みするために Claude Code を再起動する
/pluginのステータスで MCP サーバーが実行中と表示されることを確認する/bitwize-music:setupをもう一度実行して確認する
ステップ 5:インストールを確認する(要求された場合)
ユーザーがインストールしたと報告した後、ステップ 2 の確認を再実行して、以下を確認します:
✅ MCP サーバー:準備完了 ✅ オーディオマスタリング:準備完了 ✅ クラウドへのアップロード:準備完了 ✅ ドキュメントハンター:準備完了
次のステップ:/bitwize-music:configure を実行して、ワークスペースのパスを設定します。
出力形式
ステータスをチェックボックス付きの明確なセクションに分けて表示します:
## bitwize-music Setup
### Environment
- Python: 3.12.3
- System: Linux
### Component Status
- [❌] MCP server
- [❌] Audio mastering
- [❌] Cloud uploads
- [❌] Document hunter
### Installation
Run these commands to install all plugin dependencies (macOS/Linux/WSL shown; see Step 3 for the Windows native `py -3` / `Scripts\` equivalents):
```bash
# Create unified venv
python3 -m venv ~/.bitwize-music/venv
# Install ALL dependencies
~/.bitwize-music/venv/bin/pip install -r ${CLAUDE_PLUGIN_ROOT}/requirements.txt
# Set up browser
~/.bitwize-music/venv/bin/playwright install chromium
インストール後:
- Claude Code を再起動します
- すべてのコンポーネントが自動的に動作します
/bitwize-music:setupを実行して確認します
プラグインが ~/.bitwize-music/venv を自動検出します。すべてそのまま動作します!
---
## Remember
- **Be specific** - show exact commands for their environment
- **Prioritize user install** for externally-managed Python
- **Explain what each component does** so they can decide what to install
- **Test commands work** before suggesting them
- **Clear next steps** after installation