nodejs-fastify

A Node.js web framework for building APIs, which are services that receive requests and return data. It uses JSON Schema, a format for describing and checking data, to validate requests and responses.

In plain words
What is it for?
Use it to create Node.js APIs with routes, authentication, database connections, validation, and response serialization.
Why use it?
It helps keep API input and output consistent while providing a clear structure for routes, plugins, services, and tests.

Skill for Claude CodeCodex

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 skills/plazmodium/odin-workflow/nodejs-fastify
Any agent
npx skills add Plazmodium/odin-workflow --skill nodejs-fastify
Clone the repo
git clone --depth 1 https://github.com/Plazmodium/odin-workflow

Made for: Claude Code, Codex.

Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,024 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.00019 $0.01024
Opus 5 $0.00010 $0.00512
Sonnet 5 $0.00004 $0.00205
Haiku 4.5 $0.00002 $0.00102

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

Security

Grade A, and why

nodejs-fastify 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/skills/backend/nodejs-fastify/SKILL.md · 153 lines

How it starts

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

Node.js + Fastify

Overview

Fastify is a high-performance Node.js web framework focused on developer experience and low overhead. It uses JSON Schema for request/response validation and serialization.

Project Structure

src/
├── app.ts                   # Fastify instance + plugin registration
├── server.ts                # Entry point (start server)
├── plugins/
│   ├── auth.ts              # Auth decorator/plugin
│   └── database.ts          # DB connection plugin
├── routes/
│   ├── auth/
│   │   ├── index.ts         # Route registration
│   │   └── schema.ts        # JSON schemas
│   └── users/
│       ├── index.ts
│       └── schema.ts
├── services/
│   └── user.service.ts      # Business logic
├── types/
│   └── index.ts             # TypeScript types
└── tests/
    └── routes/
        └── auth.test.ts

Core Patterns

App Setup

import Fastify from 'fastify';

const app = Fastify({
  logger: true,
  ajv: { customOptions: { removeAdditional: 'all' } },
});

// Register plugins
await app.register(import('./plugins/database'));
await app.register(import('./plugins/auth'));

// Register routes
await app.register(import('./routes/auth'), { prefix: '/auth' });
await app.register(import('./routes/users'), { prefix: '/users' });

export default app;

Routes with Schema Validation

import { FastifyPluginAsync } from 'fastify';

const userRoutes: FastifyPluginAsync = async (fastify) => {
  fastify.get('/:id', {
    schema: {
      params: { type: 'object', properties: { id: { type: 'string', format: 'uuid' } }, required: ['id'] },
      response: {
        200: {
          type: 'object',
          properties: {
            id: { type: 'string' },
            email: { type: 'string' },
            name: { type: 'string' },
          },
        },
      },
    },
    preHandler: [fastify.authenticate],
    handler: async (request, reply) => {
      const { id } = request.params as { id: string };
      const user = await fastify.userService.getById(id);
      if (!user) return reply.code(404).send({ error: 'Not found' });
      return user;
    },
  });
};

export default userRoutes;

Read the full file on GitHub · 153 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 · 153 lines · 19 tokens per session scan A ce0a1fafc3c7

Subscribe to this mod's changes

nodejs-fastify is a skill published in the GitHub repository Plazmodium/odin-workflow (0 stars, last pushed 3mo ago), licensed MIT. It adds 19 tokens to every session and 1,024 once invoked, about $0.0001 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-09-01.