Agent skill
nodejs-package-json
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.
Install this agent skill to your Project
npx add-skill https://github.com/shaowei-g/codex-skills/tree/main/skills/nodejs-package-json
SKILL.md
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).
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
ekoen-frontend-code-review
Production-grade code review for the eKoEN frontend codebase. Use when asked to review, audit, inspect, or harden eKoEN React/Next.js frontend code, pages, components, hooks, API clients, or state layers for bugs, performance bottlenecks, TypeScript safety issues, request inefficiency, state-management risks, memory leaks, rendering regressions, error-handling gaps, duplication, or maintainability problems, especially when a structured severity-ranked report with code locations, root causes, suggested fixes, and example refactors is required.
ekoen-backend.doc.route-error
Add HttpErrorRes responses to eKoEN backend routes when controllers can throw errors from app/util/errors/index.ts
conventional-commit-helper
Generate and validate Conventional Commit messages for semantic-release workflows. Use when a user asks to write a commit message, asks to commit changes, asks for commit type/scope selection, or asks to enforce Conventional Commits consistency.
codex-cli-subagent-transport
Use only when native subagent execution is unavailable and the caller needs one deterministic Codex CLI run with repo-local artifacts and a manifest-based result contract.
skill-usage-logger
All skill MUST use this logger to record usage events in NDJSON format.Log Codex skill usage events to NDJSON with safe concurrent appends.
Didn't find tool you were looking for?