fastify-expert

fastify-expert is a skill for Claude Code from Aarvion-AI/stackwise-skills. It costs 140 tokens per session (2,105 once invoked), scanned A, original, MIT.

A guide for building and debugging Fastify services, which are Node.js web backends that handle API requests.

In plain words
What is it for?
It helps create Fastify 5 services, organize plugins, define TypeScript request and response schemas, add JWT login protection, connect databases, handle errors, and test routes without opening a network port.
Why use it?
It helps avoid mixing patterns from other web frameworks into Fastify and helps keep routes, plugins, validation, authentication, and tests consistent.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the stackwise plugin — 15 skills shipped together

Good fit It helps create Fastify 5 services, organize plugins, define TypeScript request and response schemas, add JWT login protection, connect databases, handle errors, and test routes without opening a network port.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aarvion-ai/stackwise-skills/fastify-expert
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.

Any agent
npx skills add Aarvion-AI/stackwise-skills --skill fastify-expert
Clone the repo
git clone --depth 1 https://github.com/Aarvion-AI/stackwise-skills

Made for: Claude Code.

Or install stackwise, the plugin that ships this one along with the rest of its 15 skills.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/aarvion-ai/stackwise-skills/fastify-expert.svg)](https://agentmods.dev/skills/aarvion-ai/stackwise-skills/fastify-expert)
Your own site
<a href="https://agentmods.dev/skills/aarvion-ai/stackwise-skills/fastify-expert"><img src="https://agentmods.dev/badge/skills/aarvion-ai/stackwise-skills/fastify-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 140 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,105 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00140 $0.02105
Opus 5 $0.00070 $0.01052
Sonnet 5 $0.00028 $0.00421
Haiku 4.5 $0.00014 $0.00211

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

Security

Grade A, and why

fastify-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 8d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

5. **Prove it works** - start the app (`npm run dev` or `node --run dev`), hit the changed routes with `curl`, including one invalid payload to confirm the 400 validation shape and one unauthorized request to confirm the
skills/fastify-expert/SKILL.md · 111 lines

How it starts

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

Fastify Expert

Turns Claude into a senior Node.js backend engineer who ships Fastify 5 services on Node 22 with schema-first TypeScript, correct plugin encapsulation, and inject-based tests - and who never smuggles Express idioms into a Fastify codebase.

When to Use This Skill

  • Scaffold a Fastify 5 service or add route plugins to an existing one
  • Structure plugins and decide where fastify-plugin is (and is not) needed
  • Define request/response schemas with the TypeBox type provider so handler types are inferred, not hand-written
  • Add JWT authentication (@fastify/jwt) and per-route authorization via hooks
  • Wire Prisma, Drizzle, or pg behind a decorated, lifecycle-managed plugin
  • Centralize error handling with setErrorHandler and @fastify/sensible
  • Write tests with app.inject() (no port binding) and fix failing ones
  • Fix Express-isms: app.use middleware, res.send, monkey-patched request objects

Core Workflow

  1. Analyze - read package.json (confirm fastify is 5.x and which @fastify/* plugins exist), the app factory (buildApp/app.ts), how plugins are registered (manual vs @fastify/autoload), the type provider in use, and tsconfig.json. Match the existing plugin layout and naming before writing anything. Note which decorators already exist and where their declare module 'fastify' merges live.
  2. Implement - write features as plugins: FastifyPluginAsyncTypebox for encapsulated route plugins, fastify-plugin only for cross-cutting infrastructure (db, auth, config). Define every route's schema (body, querystring, params, response) with TypeBox and let the type provider infer handler types. Async handlers return the payload; never mix reply.send() with a returned value.
  3. Verify types/lint - run npx tsc --noEmit, then the project's linter (npx eslint . or npm run lint); fix all reported issues and re-run until clean before proceeding. Do not paper over type errors with as any on request/reply - fix the schema or the declaration merge instead.
  4. Test - write or update tests using the app factory + app.inject() (see references/testing.md); run the project's test command (npx vitest run or node --test); fix every failure and re-run until all tests pass.
  5. Prove it works - start the app (npm run dev or node --run dev), hit the changed routes with curl, including one invalid payload to confirm the 400 validation shape and one unauthorized request to confirm the 401. Check the response actually contains the fields you expect - the response schema silently drops unlisted fields. Fix and re-verify until live behavior matches the spec.

Read the full file on GitHub · 111 lines

Files

What ships with it

5 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. 8d ago First seen · 111 lines · 140 tokens per session scan A cee31d928f4a

Subscribe to this mod's changes

fastify-expert is a skill published in the GitHub repository Aarvion-AI/stackwise-skills (5 stars, last pushed 5d ago), licensed MIT. It adds 140 tokens to every session and 2,105 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.