windows-npm-run-script-shell

windows-npm-run-script-shell is a skill for Claude Code, Codex from JinNing6/Noosphere. It costs 70 tokens per session (710 once invoked), scanned A, original, Apache-2.0.

Troubleshooting guidance for Windows npm scripts, such as npm test, npm run build, and npm run-script. It focuses on failures caused by missing or broken shell settings rather than by the project code.

In plain words
What is it for?
Use it when Windows npm commands fail before running their scripts, show ERR_INVALID_ARG_TYPE, lose command-line flags, produce no output, or report cache and log permission errors.
Why use it?
It helps distinguish an npm or Windows shell problem from a real TypeScript, Vite, Vitest, or Playwright failure. It provides checks for shell configuration, logs, cache permissions, and direct command execution.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when Windows npm commands fail before running their scripts, show ERR_INVALID_ARG_TYPE, lose command-line flags, produce no output, or report cache and log permission errors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jinning6/noosphere/windows-npm-run-script-shell
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add JinNing6/Noosphere --skill windows-npm-run-script-shell
Clone the repo
git clone --depth 1 https://github.com/JinNing6/Noosphere

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for windows-npm-run-script-shell

README.md
[![agentmods](https://agentmods.dev/badge/skills/jinning6/noosphere/windows-npm-run-script-shell/github.svg)](https://agentmods.dev/skills/jinning6/noosphere/windows-npm-run-script-shell)
Your own site
<a href="https://agentmods.dev/skills/jinning6/noosphere/windows-npm-run-script-shell"><img src="https://agentmods.dev/badge/skills/jinning6/noosphere/windows-npm-run-script-shell/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for windows-npm-run-script-shell

Your own site · 80×15
<a href="https://agentmods.dev/skills/jinning6/noosphere/windows-npm-run-script-shell"><img src="https://agentmods.dev/badge/skills/jinning6/noosphere/windows-npm-run-script-shell.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 710 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 35
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium MCP Rug Pull · line 16
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 16
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 16
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00070 $0.00710
Opus 5.5 $0.00028 $0.00284
Sonnet 5.5 $0.00014 $0.00142
Haiku 4.5 $0.00007 $0.00071

Measured 1mo ago against content hash 7af3dc0b48d2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

windows-npm-run-script-shell scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

shared_skills/active/windows-npm-run-script-shell/SKILL.md · 75 lines

How it starts

The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Windows Npm Run Script Shell

Overview

Windows npm scripts need a shell. If ComSpec is missing or npm cannot infer a script shell, npm run ... can fail inside npm before tsc, Vite, Vitest, or Playwright actually runs.

Triage

Use this flow before changing app code:

  1. Run the target tool directly with npx, for example npx tsc -b --pretty false, npx vite build, or npx vitest run.
  2. Run npm run <script> --loglevel verbose.
  3. Open the npm debug log if output is empty.
  4. Check shell config:
npm config get script-shell
npm config get cache
npm config get update-notifier
Write-Host "ComSpec=[$env:ComSpec]"
Write-Host "SHELL=[$env:SHELL]"

If direct npx commands pass but npm run fails with ERR_INVALID_ARG_TYPE: The "file" argument must be of type string. Received undefined, treat it as npm shell configuration, not a project build failure.

If direct node <script> succeeds but npm test/npm run exits silently in a sandbox, rerun with --loglevel verbose. When npm reports EPERM creating %LocalAppData%\npm-cache\_logs or attempts registry access only for update checks, treat it as npm runtime side effects, not a test failure.

Fix

Prefer a project-local .npmrc so the fix travels with the repo:

script-shell=C:\Windows\System32\cmd.exe

For sandboxed Windows workspaces where npm cannot write the user cache/log directory, keep npm side effects inside the repo and disable network-prone notices:

cache=.npm-cache
update-notifier=false
fund=false
audit=false
script-shell=cmd.exe

Then rerun:

npm run build
npm test -- --run

If the project requires PowerShell syntax in scripts, set script-shell to PowerShell and avoid && in package scripts, because Windows PowerShell 5 does not support &&.

Common Mistakes

  • Do not rewrite TypeScript, Vite, Vitest, or React code when npx <tool> succeeds and only npm run fails.
  • Do not treat silent npm output as proof that the build tool produced no diagnostics; inspect the npm debug log.
  • Do not ignore npm cache/log EPERM in sandboxed workspaces; set a project-local cache before escalating.
  • Do not set a global npm config unless the user asked for machine-wide changes.
  • Do not assume SHELL replaces ComSpec for npm on Windows.

Read the full file on GitHub · 75 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 75 lines · 70 tokens per session scan A 7af3dc0b48d2

Subscribe to this mod's changes

windows-npm-run-script-shell is a skill published in the GitHub repository JinNing6/Noosphere (18 stars, last pushed 4d ago), licensed Apache-2.0. It adds 70 tokens to every session and 710 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

error-recovery

A guide to detecting and recovering from failures in long-running AI agents. It covers API outages, bad tool calls, broken conversation state, stalled streams, repeated loops, retries, fallback models, and circuit breakers that stop repeated failure.

bojieli/ai-agent-book · 111 tokens

pre-action-interceptors

Use when a tool error begins with "INTERCEPTOR:", a sent message was silently hedged or rewritten, or the user asks about active guards or blocked actions. Not for ordinary tool errors.

Bitterbot-AI/bitterbot-desktop · 44 tokens

observability

Periodic health sweep of the running system via the debug pipeline (cloud logs / k8s / daemon / DB slices). On a real anomaly, open a bug task (--kind workitem) carrying the evidence refs so it re-enters the bugfix loop. A healthy sweep opens NO task — never fabricate a bug.

Prismer-AI/PrismerCloud · 67 tokens

prismer-python-debugpy

Debug Python: pdb REPL + debugpy remote (DAP).

Prismer-AI/PrismerCloud · 19 tokens

impact-trace

For a change point (function / type / endpoint / SQL column), enumerate its real blast radius across six dimensions with a grep citation per row, then derive the regression test scope. Every impact-table row must trace to a real search hit — never a self-asserted claim.

Prismer-AI/PrismerCloud · 60 tokens

webapp-qa

Perform scoped exploratory QA of a web application, reproduce defects, collect screenshots and console evidence, and deliver a prioritized report.

Prismer-AI/PrismerCloud · 29 tokens