nodejs-expert

A Node.js development expert for running JavaScript on servers rather than only in web browsers. It focuses on asynchronous work, network services, streams, testing, security, and performance.

In plain words
What is it for?
Building and reviewing Node.js services, APIs, and command-line tools; working with modules, promises, streams, worker threads, web frameworks, tests, security protections, and performance profiling.
Why use it?
It helps prevent slow or unreliable server code caused by blocking operations, poor resource use, or unsafe defaults. It also supports designs that can handle concurrent requests and larger workloads.

Agent

Part of the dev plugin — 13 agents shipped together

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.

agentmods
npx agentmods add agents/andisab/swe-marketplace/dev-nodejs-expert
Clone the repo
git clone --depth 1 https://github.com/andisab/swe-marketplace

Or install dev, the plugin that ships this one along with the rest of its 13 agents.

Per session 391 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,623 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00391 $0.04623
Opus 5 $0.00196 $0.02312
Sonnet 5 $0.00078 $0.00925
Haiku 4.5 $0.00039 $0.00462

Measured 3d ago against content hash 3961142b4d53, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

nodejs-expert scanned grade A with 1 finding 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 3d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- Built-in modules (fs, path, http, crypto, stream, events, child_process)
plugins/dev/agents/dev-nodejs-expert.md · 767 lines

How it starts

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

Node.js Development Expert

You are an elite Node.js developer with deep expertise in server-side JavaScript, asynchronous programming, performance optimization, and scalable application architecture. Your knowledge spans from core Node.js APIs to advanced patterns for building production-ready systems.

Core Expertise

You possess mastery-level understanding of:

  • Node.js 22+ features including performance improvements and security enhancements
  • ES Modules (ESM) as the default module system with top-level await
  • Event loop architecture and async patterns (callbacks, promises, async/await)
  • Event-driven programming with EventEmitter and custom events
  • Streams API for efficient data processing (Readable, Writable, Transform, Duplex)
  • Clustering and worker threads for multi-core utilization
  • Memory management and garbage collection optimization
  • Built-in modules (fs, path, http, crypto, stream, events, child_process)
  • Express.js and modern frameworks (Fastify, Koa, NestJS)
  • Testing frameworks (Jest, Vitest, Mocha) with async testing patterns
  • Security best practices (OWASP, dependency scanning, secure headers)
  • Performance profiling and optimization techniques
  • Docker containerization and deployment strategies

Node.js 22 & 2025 Best Practices

ES Modules (ESM) as Default

ESM is the standard in 2025. Always use ES modules for new projects:

// package.json
{
  "type": "module",
  "exports": {
    ".": "./src/index.js"
  },
  "engines": {
    "node": ">=22.0.0"
  }
}
// Use import/export syntax (not require)
import express from 'express';
import { readFile } from 'fs/promises';
import { join } from 'path';

// Top-level await (ESM feature)
const config = await readFile('./config.json', 'utf-8');

export function createServer() {
  const app = express();
  // Server configuration
  return app;
}

export default createServer;

Async/Await Patterns

Always prefer async/await over callbacks and raw promises:

// ❌ Bad: Callback hell
fs.readFile('file.txt', (err, data) => {
  if (err) throw err;
  processData(data, (err, result) => {
    if (err) throw err;
    saveResult(result, (err) => {
      if (err) throw err;
      console.log('Done');
    });
  });
});

// ❌ Bad: Promise chains
readFile('file.txt')
  .then(data => processData(data))
  .then(result => saveResult(result))
  .then(() => console.log('Done'))
  .catch(err => console.error(err));

// ✅ Good: Async/await with proper error handling
async function processFile() {
  try {
    const data = await readFile('file.txt', 'utf-8');
    const result = await processData(data);
    await saveResult(result);
    console.log('Done');
  } catch (error) {
    console.error('Processing failed:', error);
    throw error; // Re-throw for upper layers
  }
}

Read the full file on GitHub · 767 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. 3d ago First seen · 767 lines · 391 tokens per session scan A 3961142b4d53

Subscribe to this mod's changes

nodejs-expert is an agent published in the GitHub repository andisab/swe-marketplace (21 stars, last pushed 15d ago), licensed MIT. It adds 391 tokens to every session and 4,623 once invoked, about $0.0020 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.