一键导入
node-project-setup
Configure a Node.js project with pnpm, TypeScript, latest versions, and parallel script patterns following modern best practices
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Configure a Node.js project with pnpm, TypeScript, latest versions, and parallel script patterns following modern best practices
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
サブエージェントを活用した並列実行・調査委譲・コンテキスト管理の戦略。複雑な問題への対処、調査・探索タスク、複数の選択肢の比較検討、大規模なリファクタリングなどでこのスキルを参照する。「調べて」「比較して」「並列で」「複数のアプローチを試して」といったリクエストや、メインのコンテキストが肥大化しそうな場面で使う。
This skill should be used when the user asks to "このIssueを実装して", "implement this issue", "fix this bug", "このタスクをやって", "Issue
This skill should be used when the user asks to "これらのIssueを全部実装して", "implement these issues autonomously", "Issue一覧を自動で片付けて", "これらのタスクを順番に実装してPRにして", or provides a list of GitHub Issue numbers/URLs for autonomous batch implementation. Fetches all specified Issues, resolves dependency order, then iterates through each — creating a worktree, implementing, and opening a PR — without user intervention.
This skill should be used when the user asks to "既存プロジェクトのタスクを整理して", "技術的負債をIssue化して", "このコードベースを改善するタスクを洗い出して", "GitHub Projectに健全化タスクを登録して", "break down what needs to be fixed in this project", "surface tech debt as issues", or "create a project board for cleanup work". Diagnoses pain points and codebase health of an existing project, then registers improvement tasks as GitHub Issues and a Project Board.
This skill should be used when the user asks to "最小再現環境を作って", "再現環境を構築して", "問題を切り分けたい", "パッケージの不具合か確認したい", "create a minimal reproduction", "isolate the issue", "build a repro environment", "reproduce this bug", "narrow down the cause", "is this a package bug or my code", "このPRの問題を再現して", "this commit broke something", or wants to determine whether a bug is caused by a package, the environment, or application code. Accepts PR URLs, commit hashes, or branch names as input.
This skill should be used when the user asks to "sandboxの互換性をチェックして", "sandbox設定を確認して", "このプロジェクトでsandboxが使えるか調べて", "sandboxでコマンドが失敗する", "check sandbox compatibility", "verify sandbox settings", "sandbox is blocking my commands", or wants to ensure their development workflow works within Claude Code's sandbox restrictions — either proactively before starting work or reactively after encountering sandbox-related failures.
基于 SOC 职业分类
| name | node-project-setup |
| description | Configure a Node.js project with pnpm, TypeScript, latest versions, and parallel script patterns following modern best practices |
| allowed-tools | Read, Write, Edit, Bash, Glob |
| argument-hint | [project-directory or .] |
Node.js プロジェクトを現代のベストプラクティスに従ってセットアップ・設定します。 既存プロジェクトへの適用も、新規プロジェクトの初期化も対象とします。
pnpm を基本パッケージマネージャーとして使用します。
最新版のインストール:
# 最新バージョンを確認してからインストール
npm install -g pnpm@latest
# または Corepack を使う場合
corepack enable && corepack prepare pnpm@latest --activate
package.json に packageManager フィールドを設定して pnpm バージョンを固定します:
{
"packageManager": "pnpm@X.Y.Z"
}
バージョンは pnpm --version で確認した実際のバージョンを記載します。
Node.js の最新バージョン確認:
# 最新の LTS バージョンを確認
node --version # 現在の環境
# 公式サイト https://nodejs.org で最新 LTS を確認
package.json の engines フィールドで Node.js と pnpm のバージョン制約を明示します:
{
"engines": {
"node": ">=X.Y.Z",
"pnpm": ">=X.Y.Z"
}
}
バージョンには node --version / pnpm --version で確認した現在の最新版を記載します。
package.json に "type": "module" を設定して ESM を標準とします:
{
"type": "module"
}
TypeScript を開発依存としてインストールします:
pnpm add -D typescript @types/node
tsconfig.json を作成します(strict + ESM 対応):
{
"compilerOptions": {
"target": "ESNext",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"strict": true,
"noUncheckedIndexedAccess": true,
"exactOptionalPropertyTypes": true,
"outDir": "dist",
"rootDir": "src",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"skipLibCheck": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}
Rust 製の高速ツールを採用します:
pnpm add -D oxlint @oxc-project/oxfmt
pnpm run --parallel "/^check:.*/" パターンを使って、check: プレフィックスを持つスクリプトをすべて並列実行します。
同様に fix: プレフィックスで自動修正系タスクをまとめます。
{
"scripts": {
"build": "tsc",
"check": "pnpm run --parallel \"/^check:.*/\"",
"check:types": "tsc --noEmit",
"check:lint": "oxlint",
"check:fmt": "oxfmt --check",
"fix": "pnpm run --parallel \"/^fix:.*/\"",
"fix:lint": "oxlint --fix",
"fix:fmt": "oxfmt"
}
}
パターンの原則:
check: プレフィックスを付けるfix: プレフィックスを付けるcheck / fix スクリプトは常に正規表現 + parallel で実行する(個別スクリプトを直接列挙しない)check:xxx / fix:xxx として追加するだけで自動的に含まれる同様のパターンを test: など他のカテゴリにも適用できます:
{
"test": "pnpm run --parallel \"/^test:.*/\""
}
pnpm のデフォルト挙動を守るために .npmrc を作成します:
shamefully-hoist=false
strict-peer-dependencies=false
以下を組み合わせた package.json の例:
{
"name": "my-project",
"version": "0.1.0",
"type": "module",
"packageManager": "pnpm@X.Y.Z",
"engines": {
"node": ">=X.Y.Z",
"pnpm": ">=X.Y.Z"
},
"scripts": {
"build": "tsc",
"check": "pnpm run --parallel \"/^check:.*/\"",
"check:types": "tsc --noEmit",
"check:lint": "oxlint",
"check:fmt": "oxfmt --check",
"fix": "pnpm run --parallel \"/^fix:.*/\"",
"fix:lint": "oxlint --fix",
"fix:fmt": "oxfmt"
},
"devDependencies": {
"@oxc-project/oxfmt": "latest",
"@types/node": "latest",
"oxlint": "latest",
"typescript": "latest"
}
}
セットアップ完了後に以下を実行して確認します:
pnpm install
pnpm check # 型チェック・lint・フォーマットをすべて並列実行
pnpm fix # lint・フォーマットの自動修正をすべて並列実行
pnpm build # TypeScript のビルド確認