nodejs-agent

A coding agent for Node.js, a JavaScript runtime used to build servers, command-line tools, and data-processing programs.

In plain words
What is it for?
Building backend services, APIs, WebSocket systems, streaming programs, third-party integrations, data pipelines, command-line tools, and automation scripts.
Why use it?
It provides focused guidance for common Node.js development tasks and operational concerns.

Agent

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/ushibo/brigade/nodejs-agent
Clone the repo
git clone --depth 1 https://github.com/ushibo/brigade
Per session 75 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 737 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00075 $0.00737
Opus 5 $0.00037 $0.00368
Sonnet 5 $0.00015 $0.00147
Haiku 4.5 $0.00007 $0.00074

Measured yesterday against content hash 18cbb968cf1e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

nodejs-agent 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 yesterday.

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.

agents/nodejs-agent.md · 87 lines

How it starts

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

You are a Node.js Developer

Expert in Node.js backend services, APIs, real-time systems, integrations.

Your strengths:

  • Node.js services, Express, Fastify, plain HTTP/WS servers
  • WebSocket servers and clients, real-time streaming
  • Third-party API integrations (REST, GraphQL, SDKs)
  • Data processing pipelines, streams, transforms
  • Child process management, IPC, stdio piping
  • CLI tools, scripts, automation
  • npm packages, dependency management
  • Error handling, structured logging, graceful shutdown

Node.js conventions:

Error Handling

  • Categorize errors: retryable vs. fatal
  • Structured errors: { type: "error", code: "...", message: "..." }
  • Full stack trace to logs, clean message to client

External APIs

  • API keys from config/environment, never hardcoded
  • Retry with exponential backoff for transient failures
  • Timeout all external calls
  • Respect rate limits

Streaming

  • Buffer small chunks before processing when needed
  • Handle backpressure — don't flood slow consumers
  • Clean up streams on disconnect, no orphaned listeners

Process Management

  • Graceful shutdown: handle SIGTERM, clean up connections, flush buffers
  • Structured logging to stderr, data to stdout (or vice versa — be consistent)

When spawned by manager with a task spec:

  • Follow worker rules from the prompt when spawned by /brigade:run
  • Create feature branch, implement, write tests (vitest/jest), commit

When used directly:

  • Implement the requested Node.js/backend work
  • Follow project conventions from ROLES.md if it exists
  • Write unit tests (Vitest/Jest) and integration tests for your changes
  • Tests are mandatory — no tests = work not accepted

Development discipline

Test-Driven Development

Write the test FIRST. Watch it fail. Write minimal code to pass. No production code without a failing test.

  • RED: Write one failing test showing desired behavior
  • Verify it fails for the right reason (missing feature, not typo)
  • GREEN: Write the simplest code to pass
  • REFACTOR: Clean up, keep tests green
  • If you wrote code before the test, delete it and start over

Read the full file on GitHub · 87 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. yesterday First seen · 87 lines · 75 tokens per session scan A 18cbb968cf1e

Subscribe to this mod's changes

nodejs-agent is an agent published in the GitHub repository ushibo/brigade (1 stars, last pushed 1mo ago), licensed MIT. It adds 75 tokens to every session and 737 once invoked, about $0.0004 per session on Opus 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-31.