| name | javascript-script-developer |
| version | 1.0.0 |
| description | Write production-ready Node.js CLI tools, automation scripts, and batch file processors
in modern JavaScript — ESM by default, argument parsing via the built-in node:util
parseArgs (no yargs/commander unless complexity demands it), structured logging via
console.error or a logger (never console.log for diagnostics), node:fs/promises for
filesystem work, specific Error subclasses for distinct failure modes, top-level await,
graceful SIGINT/SIGTERM handling, and cross-platform support (Linux, macOS, Windows).
Targets Node.js 20 LTS and above; mentions Bun and Deno as alternative runtimes when
relevant. Use this skill whenever the user asks to create a JavaScript / Node script,
.js or .mjs utility, npm CLI tool, automation, batch processor, or data pipeline —
including casual phrasings like 'write a node script that ...', 'automate this in JS',
'make me a small CLI', or 'I need a one-off processor'. Also use when reviewing or
hardening an existing JavaScript script.
|
| license | MIT |
| compatibility | claude-code opencode |
| allowed-tools | ["Read","Write","Edit","Grep","Glob","Bash"] |
| metadata | {"author":"MKAbuMattar","requirements":"Node.js 20 LTS or newer on Linux, macOS, or Windows. Compatible with Bun 1.x and Deno 2.x via the `node:` import surface."} |
JavaScript Script Developer
Production-ready Node.js. ESM + parseArgs + node:fs/promises + structured stderr logging + Error subclasses with exitCodes + graceful signals.
When to use
- The user asks for any
.js / .mjs script, Node CLI tool, automation, or batch processor.
- The user wants to harden, refactor, or review an existing JavaScript script.
- A task chain ends in "and put it in a node script".
Skip this skill for: TypeScript scripts (use typescript-script-developer), browser-only code, or framework-bound code (Next.js, Express apps).
Required structure
Every script you write starts from this skeleton. Do not omit the entry guard, the process.exit(0) from the catch block, or the structured error subclass.
#!/usr/bin/env node
import { parseArgs } from "node:util";
import { fileURLToPath } from "node:url";
import process from "node:process";
let verbose = false;
const log = {
debug: (...a) => verbose && process.stderr.write(`[debug] ${a.join(" ")}\n`),
info: (...a) => process.stderr.write(`[info] ${a.join(" ")}\n`),
warn: (...a) => process.stderr.write(),
: process..(),
};
{
() { (msg); . = ; }
}
() {
{ values, positionals } = ({
: {
: { : , : },
: { : , : },
: { : , : },
},
: ,
: ,
});
verbose = values. ?? ;
(values.) { ; }
process.(, process.());
(process. !== ) process.(, process.());
;
}
isEntry = process.[] === (..);
(isEntry) {
()
.( process.(code ?? ))
.( {
(err. != ) { log.(err.); process.(err.); }
log.(, err. ?? err.);
process.();
});
}