nodejs-fastify

nodejs-fastify is a skill for Claude Code, Codex from j4flmao/agent-skills. It costs 68 tokens per session (3,976 once invoked), scanned A, original, MIT.

Development guidance for building Fastify applications, which are Node.js web servers, with request schemas, plugins, serializers, and lifecycle hooks. Schemas describe and validate the data an API accepts and returns.

In plain words
What is it for?
Use it when creating or changing Fastify servers, routes, validation, serialization, hooks, plugins, or Swagger/OpenAPI documentation.
Why use it?
It sets consistent rules for validating requests, organizing plugins, formatting responses, and connecting actions to the server request lifecycle.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { userModule } from '../modules/users';.

Good fit Use it when creating or changing Fastify servers, routes, validation, serialization, hooks…

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/j4flmao/agent-skills
agentmods
npx agentmods add skills/j4flmao/agent-skills/fastify

Made for: Claude Code, Codex.

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 nodejs-fastify

README.md
[![agentmods](https://agentmods.dev/badge/skills/j4flmao/agent-skills/fastify.svg)](https://agentmods.dev/skills/j4flmao/agent-skills/fastify)
Your own site
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/fastify"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/fastify.svg" alt="Measured on agentmods" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,976 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.00068 $0.03976
Opus 5 $0.00034 $0.01988
Sonnet 5 $0.00014 $0.00795
Haiku 4.5 $0.00007 $0.00398

Measured 7d ago against content hash 608a709be6f9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 7d 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.

skills/backend/nodejs/fastify/SKILL.md · 526 lines

How it starts

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

Node.js Fastify

Purpose

Build Fastify applications with schema-first validation, plugin encapsulation, request/response serialization, and lifecycle hooks.

Agent Protocol

Trigger

User request includes: fastify, fastify server, fastify plugin, fastify schema, fastify hooks, fastify validation, fastify serializer, TypeBox, @fastify/swagger.

Input Context

  • Fastify version (4.x, 5.x)
  • Validation approach (JSON Schema, TypeBox, Zod)
  • Plugin set (swagger, cors, jwt, rate-limit)
  • Database (TypeORM, Prisma, Knex)

Output Artifact

Server setup, plugin registration, schema definitions, hook pipeline, route patterns.

Response Format

Produce artifact directly. No preamble, no postamble, no explanations.

Completion Criteria

  • Server created with logger and schema validator
  • Plugins registered with encapsulation
  • Routes defined with JSON Schema validation
  • Hooks attached at correct lifecycle points
  • Swagger/OpenAPI documentation configured

Max Response Length

4096 tokens

Architecture Decision Trees

Validation: JSON Schema vs TypeBox vs Zod

Criterion JSON Schema TypeBox Zod
Type inference Manual Static<typeof schema> z.infer<typeof schema>
Code-first No Yes Yes
Composition $ref Type.Union, Type.Intersect z.union, z.intersection
Performance Fast native compilation Fastest (TypeCode compiler) Good
Ecosystem Standard, swagger compatible Fastify-native Widely used

Decision: Need OpenAPI/Swagger docs → JSON Schema or TypeBox. Want maximum type safety → TypeBox. Already using Zod in codebase → Zod.

Plugin vs Register Scope

Scope Encapsulation Use Case
Root Global cors, rate-limiter, jwt, formbody
Plugin-level Encapsulated within plugin Feature modules, route groups
Child Nested encapsulation Sub-plugins within feature

Decision: Infrastructure cross-cutting → Root. Feature-specific → Plugin. Shared helpers → fastify-plugin (bypass encapsulation).

Read the full file on GitHub · 526 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 7d ago First seen · 526 lines · 68 tokens per session scan A 608a709be6f9

Subscribe to this mod's changes

nodejs-fastify is a skill published in the GitHub repository j4flmao/agent-skills (21 stars, last pushed yesterday), licensed MIT. It adds 68 tokens to every session and 3,976 once invoked, about $0.0003 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-30.