node-microservice-builder

node-microservice-builder is a command for Claude Code, Cursor from vanessamarely/ai-playbook-reposito. It costs 0 tokens per session (752 once invoked), scanned A, original, MIT.

A guided workflow for creating or changing Node.js and TypeScript microservice HTTP endpoints. It follows the project’s conventions and adapts to Express.js, Nest.js, or Fastify when detected.

In plain words
What is it for?
Use it to build or modify an endpoint from a service name, target folder, HTTP specification, and business-logic description. It can produce handlers, request-validation schemas, unit and integration tests, and routing updates.
Why use it?
It reduces the manual work of building an endpoint consistently across routing, validation, error handling, and tests. It also helps keep generated code aligned with the existing service framework.

Command for Claude CodeCursor

Written for Cursor and Claude Code: installed under .cursor/, but also a Claude Code command (commands/*.md).

Good fit Use it to build or modify an endpoint from a service name, target folder, HTTP specification, and business-logic description. It can produce handlers, request-validation schemas, unit and integration tests, and routing updates.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/vanessamarely/ai-playbook-reposito/node-microservice-builder
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.

Clone the repo
git clone --depth 1 https://github.com/vanessamarely/ai-playbook-reposito

Made for: Claude Code, Cursor.

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 node-microservice-builder

README.md
[![agentmods](https://agentmods.dev/badge/commands/vanessamarely/ai-playbook-reposito/node-microservice-builder/github.svg)](https://agentmods.dev/commands/vanessamarely/ai-playbook-reposito/node-microservice-builder)
Your own site
<a href="https://agentmods.dev/commands/vanessamarely/ai-playbook-reposito/node-microservice-builder"><img src="https://agentmods.dev/badge/commands/vanessamarely/ai-playbook-reposito/node-microservice-builder/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 node-microservice-builder

Your own site · 80×15
<a href="https://agentmods.dev/commands/vanessamarely/ai-playbook-reposito/node-microservice-builder"><img src="https://agentmods.dev/badge/commands/vanessamarely/ai-playbook-reposito/node-microservice-builder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 752 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.
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.00000 $0.00752
Opus 5 $0.00000 $0.00376
Sonnet 5 $0.00000 $0.00150
Haiku 4.5 $0.00000 $0.00075

Measured 9d ago against content hash 9ee205d281d6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

node-microservice-builder 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 9d 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.

ai-playbook/.cursor/commands/node-microservice-builder.md · 54 lines

How it starts

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

Node Microservice Builder

Create or modify Node.js/TypeScript microservice endpoints following the conventions in the node-typescript-service and backend-policy rules — this is the guided end-to-end build workflow.

Inputs

  • serviceName: name of the service or module.
  • endpointSpec: HTTP method, path, request/response schemas, business logic description.
  • targetFolder: service directory within the project.

Outputs

  • Controller or route handler file.
  • Validation schemas/DTOs (Zod, Joi, or class-validator).
  • Test file with unit and integration tests.
  • Updated routing configuration if applicable.

Procedure

  1. Validate inputsserviceName follows project naming convention; targetFolder is a valid Node.js project (package.json present); check tsconfig.json for TypeScript.
  2. Detect the framework from package.json: express → Express.js, @nestjs/core → Nest.js, fastify → Fastify. Adjust patterns accordingly.
  3. Generate the endpoint handler — typed parameters, request validation via the project's validation library, error handling with correct HTTP status codes, consistent response structure.
    • Nest.js: controller class with decorators (@Controller, @Post, ...), constructor-injected dependencies, DTOs with validation decorators.
    • Express: route handler function, validation middleware, res.status().json() responses.
  4. Add the validation schema:
    • Nest.js (class-validator DTO):
      export class CreateUserDto {
        @IsString() @IsNotEmpty() @MaxLength(100) name!: string
        @IsEmail() email!: string
        @IsEnum(UserRole) role!: UserRole
      }
      
    • Express: Joi or Zod middleware.
    • No any in DTOs/schemas; use discriminated unions for variant request types; keep response DTOs separate from entities.
  5. Implement error handling:
    • Prefer a Result<T, E> type in the service layer where the project already uses that pattern:
      type Result<T, E = Error> = { success: true; data: T } | { success: false; error: E }
      
    • Custom typed error classes (e.g. ValidationError extends Error with a field/value).
    • Map errors to status codes: 400 validation, 401 auth, 403 forbidden, 404 not found, 409 conflict, 500 unexpected.
    • Structured error response shape: { statusCode, message, error, timestamp, path }.
    • Always handle promise rejections explicitly with try/catch.
  6. Generate tests adjacent to the handler — unit tests for business logic, integration tests for the HTTP endpoint (e.g. supertest), covering success, validation failures, and error conditions.
  7. Update routing — register the new endpoint in the project's centralized routing module if one exists; verify there's no route conflict.
  8. Report a summary: paths to the handler, validation/DTO files, and test file; TypeScript patterns used (Result types, custom errors, DTOs); error-handling approach; verification commands (npm run lint, npm test -- <serviceName>, npm run build, npm run type-check).

Read the full file on GitHub · 54 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. 9d ago First seen · 54 lines · 0 tokens per session scan A 9ee205d281d6

Subscribe to this mod's changes

node-microservice-builder is a command published in the GitHub repository vanessamarely/ai-playbook-reposito (2 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 752 tokens. 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.