ワンクリックで
general-pnpm-scripts
Use when running any PNPM custom script command to verify it exists first
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when running any PNPM custom script command to verify it exists first
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use when deploying Cloudflare Workers, managing R2 storage, or working with Cloudflare infrastructure
Use when working with ANTD components, theme tokens, icons, forms, or feedback components (message/notification/modal)
Use when adding, referencing, or serving static assets (images, fonts, videos, 3D models) through the R2 CDN pipeline with type-safe imports
Use when writing or reviewing JavaScript/TypeScript code for style patterns like concise arrows, inline handlers, expression formatting, or when tempted to use eslint-disable
Use when working with environment variables in frontend code
Use when creating or modifying keyboard shortcuts/hotkeys in frontend code
| name | general-pnpm-scripts |
| description | Use when running any PNPM custom script command to verify it exists first |
This skill ensures you ALWAYS verify custom PNPM scripts exist in package.json before running them. This prevents "command not found" errors and ensures you understand what each script does.
Use this skill BEFORE running ANY custom PNPM script. This includes:
Note: This skill applies to custom scripts only, not native PNPM commands like pnpm install, pnpm add, etc.
This is a PNPM monorepo:
D:\Coding\lightcraft\lightcraft\
├── package.json # Root workspace
├── spark/frontend/my-vite-app/package.json # Frontend workspace
└── spark/cloudflare/workers/file-delivery/package.json # Worker workspace
Workspace filters:
vite → spark/frontend/my-vite-appworker → spark/cloudflare/workers/file-deliveryALWAYS follow these steps before running ANY custom PNPM script:
package.jsonpnpm --filter vite [script]: Check frontend package.jsonpnpm --filter worker [script]: Check worker package.jsonpackage.jsonUse the Read tool to open the relevant package.json and find the "scripts" section.
Check if the exact script name exists in the "scripts" object.
Common mistake: Looking for sb:dev:reset in workspace package.json when it's only in root.
Read the script definition to understand:
Example:
"sb:dev:reset": "cd spark/frontend/my-vite-app && pnpm sb:dev:reset"
This root script changes directory to frontend workspace and runs the frontend's sb:dev:reset script.
Use the correct command from the correct location.
| Pattern | Purpose | Location |
|---|---|---|
dev, build, check | Main commands | Root (delegates to workspaces) |
dev:fe, build:fe, check:fe | Frontend-specific | Root (uses --filter vite) |
dev:w, w:deploy:* | Worker-specific | Root |
sb:* | Supabase commands | Both root and frontend |
| Bare commands | Direct execution | Workspace package.json |
Root Scripts (Delegation Pattern):
// Root package.json
{
"scripts": {
"sb:dev:start": "cd spark/frontend/my-vite-app && pnpm sb:dev:start",
"dev:f": "pnpm --filter vite dev"
}
}
These scripts change directory or use --filter to run workspace scripts.
Workspace Scripts (Direct Execution):
// Frontend package.json
{
"scripts": {
"sb:dev:start": "supabase start",
"dev": "vite"
}
}
These scripts execute actual commands, not delegation.
pnpm --filterWhen using pnpm --filter, you're running scripts from a workspace's package.json:
# This runs the "dev" script from frontend package.json
pnpm --filter vite dev
# NOT from root package.json
User asks: "Run the Supabase reset command"
Your process:
sb:dev:reset"sb:dev:reset": "cd spark/frontend/my-vite-app && pnpm sb:dev:reset""sb:dev:reset": "supabase db reset --local"pnpm sb:dev:reset from root (or the appropriate location)Key: You verified the script exists in BOTH locations (root and frontend) before running.
For detailed examples: .claude/skills/general-pnpm-scripts/examples.md