Ensure pnpm is used exclusively for package management, blocking npm/yarn commands. Use when running package scripts, installing dependencies, or when the user mentions package manager/dependencies/packages.
プロジェクトでpnpmを統一的に使用するための強制スキル。
このプロジェクトは packageManager: pnpm@xx.x.x を前提として構成されている。
すべてのスクリプトは pnpm <script> 形式で実行:
pnpm run lint
pnpm test
pnpm build
pnpx ではなく pnpm dlx を使用:
# ❌ 間違い
pnpx create-react-app my-app
# ✅ 正しい
pnpm dlx create-react-app my-app
package.json で npm や yarn を呼び出さない:
{
"scripts": {
"build": "pnpm run compile" // ✅
}
}
以下のコマンドを検知したら警告し、pnpmに置き換えて再実行:
npm install → pnpm install
npm run build → pnpm run build
npm test → pnpm test
npx xxx → pnpm dlx xxx
yarn → pnpm install
yarn add xxx → pnpm add xxx
yarn build → pnpm run build
GitHub Actions などの CI でも pnpm を使用:
- uses: pnpm/action-setup@v2
with:
version: 8
- run: pnpm install --frozen-lockfile
- run: pnpm test
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm' # ✅ pnpm-store をキャッシュ
README・各種ドキュメントに掲載するコマンド例も全て pnpm 表記へ統一:
# ❌ 間違い
npm install
npm run dev
# ✅ 正しい
pnpm install
pnpm run dev
Claude Code が npm コマンドを誤って実行しようとした場合:
例:
検出: npm install
↓
警告: このプロジェクトではpnpmを使用します
↓
自動変換: pnpm install
↓
実行
以下の場合のみ警告をスキップ:
npm install -g pnpm
# または
corepack enable
corepack prepare pnpm@latest --activate
rm -rf node_modules pnpm-lock.yaml
pnpm install
pnpm 形式かpnpm を使用しているかpnpm 表記になっているかpackage.json の scripts が pnpm を呼び出しているかSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer