skills/use-js/SKILL.md
Use when: 'install packages', 'run scripts', 'npm tasks'.
npx skillsauth add kenoxa/spine use-jsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use ni for all package operations — never hardcode npm, pnpm, yarn, or bun commands.
ni)ni auto-detects the package manager from lockfile. One command set for all JS projects.
| Task | Command | Example |
|------|---------|---------|
| Install deps | ni | ni |
| Frozen install (CI) | ni --frozen | ni --frozen |
| Add dependency | ni <pkg> | ni vite |
| Add dev dependency | ni <pkg> -D | ni @types/node -D |
| Clean install | nci | nci |
| Run script | nr <script> | nr dev --port=3000 |
| Execute binary | nlx <cmd> | nlx vitest |
| PM passthrough | na <cmd> | na audit |
| Upgrade deps | nup | nup |
| Uninstall | nun <pkg> | nun lodash |
| Flag | Purpose | Example |
|------|---------|---------|
| ? | Print resolved command (debug) | ni vite ? |
| -C <dir> | Change directory first | nr -C packages/foo dev |
| -D | Dev dependency | ni vitest -D |
| -g | Global install | ni -g @antfu/ni |
| --frozen | Fail if lockfile changes needed | ni --frozen |
ni auto-detects from lockfile. Override for CI/automation:
~/.nirc: defaultAgent=npm (fallback when no lockfile)NI_DEFAULT_AGENT=npm (higher priority than file)Run tests via ni commands — never hardcode the test runner binary.
nr testnlx vitestnlx vitest run --reporter=verbosenr test -- --watch or nlx vitest --watchnlx vitest run --coveragenpm install, pnpm add, yarn add, bun add — use ni <pkg>npx or bunx directly for normal JS/TS tooling — use nlx <cmd>npm audit or pnpm audit — use na auditni handles itni is universaltools
Use when: 'create a worktree', 'git worktree', 'parallel branch'.
tools
Use when: 'session state', 'resume work', 'worktree session'.
development
Use when: 'goal prompt'.
testing
Thinking-lens stress-test on a recommendation.