← Back to list
Node.js

nodejs-package-json
by shaowei-g
Save personal codex skills
⭐ 0🍴 0📅 Jan 19, 2026
SKILL.md
name: nodejs-package-json description: Patch a Node.js project's package.json for standard build automation. Use when asked to add/standardize package.json scripts like prebuild/postbuild for TypeScript builds (rimraf dist + tsc-alias), adjust prebuild for Next.js (rimraf dist .next), or ensure an existing package.json pkg config includes required scripts/assets/targets/outputPath.
Node.js package.json
Goal
Quickly and safely update package.json to include:
scripts.prebuild:rimraf dist(orrimraf dist .nextfor Next.js)scripts.postbuild:tsc-alias- If
pkgconfig exists: ensurescripts/assets/targets/outputPathcontain required entries
Workflow
-
Run the patcher (auto-detects Next.js):
python3 "${CODEX_HOME:-$HOME/.codex}/skills/nodejs-package-json/scripts/patch_package_json.py" --path package.json
-
If Next.js auto-detection is wrong, force it:
- Force Next.js:
--nextjs true - Force non-Next.js:
--nextjs false
- Force Next.js:
-
If
prebuildorpostbuildalready exist with different values:- Re-run with
--forceto overwrite to the recommended defaults.
- Re-run with
Notes
- This skill edits
package.jsononly; it does not install dependencies. Ensurerimrafandtsc-aliasare available (typically asdevDependencies). - The patcher only edits
pkgsettings if a top-levelpkgobject already exists (it does not add one).
Score
Total Score
40/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon