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.
npx skills add RadOrigin-LLC/RAD-Claude-Skills --skill fastify-hooks-lifecyclegit clone --depth 1 https://github.com/RadOrigin-LLC/RAD-Claude-SkillsWrote 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.
[](https://agentmods.dev/skills/radorigin-llc/rad-claude-skills/fastify-hooks-lifecycle)<a href="https://agentmods.dev/skills/radorigin-llc/rad-claude-skills/fastify-hooks-lifecycle"><img src="https://agentmods.dev/badge/skills/radorigin-llc/rad-claude-skills/fastify-hooks-lifecycle/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.
<a href="https://agentmods.dev/skills/radorigin-llc/rad-claude-skills/fastify-hooks-lifecycle"><img src="https://agentmods.dev/badge/skills/radorigin-llc/rad-claude-skills/fastify-hooks-lifecycle.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00085 | $0.03280 |
| Opus 5 | $0.00043 | $0.01640 |
| Sonnet 5 | $0.00017 | $0.00656 |
| Haiku 4.5 | $0.00009 | $0.00328 |
Grade A, and why
fastify-hooks-lifecycle 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 10d 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.
How it starts
The opening of the file, as written. The whole thing — 218 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Fastify Hook Lifecycle Reference
You are working with Fastify's hook system. Follow every rule in this document precisely. Violations of the critical rules below cause silent double executions, lost context, and runtime exceptions that are difficult to trace.
General Hook Rules (CRITICAL)
Obey these rules in every hook you write. There are no exceptions.
- NEVER mix async/await with the
donecallback. If the hook function is declaredasync, do not accept or calldone. If the hook usesdone, do not useasyncor return a Promise. Mixing the two causes double execution of downstream hooks and handlers. - NEVER use arrow functions as hook handlers. Arrow functions do not bind
this, which means you lose access to the Fastify instance context (thisis the encapsulating Fastify server). Always usefunctiondeclarations or expressions. - When you need to short-circuit the request lifecycle from an async hook, call
reply.send()and thenreturn reply. If you forgetreturn reply, Fastify continues executing the remaining lifecycle, resulting in double execution and potential "Reply already sent" errors. - Hooks can be either global or encapsulated. A hook registered inside a plugin that uses
fastify-plugin(which breaks encapsulation) becomes global. A hook registered inside a normal plugin is scoped to that plugin and its children only. Be intentional about which you need. - Every hook that accepts a
donecallback MUST call it. Failing to calldonehangs the request indefinitely. - Do not perform heavy synchronous work inside hooks. Fastify is single-threaded; blocking the event loop in a hook blocks all concurrent requests.
Request/Reply Hooks (Execution Order)
These hooks execute in the order listed below for every incoming request. Understand exactly where in the lifecycle each hook fires and what data is available at that point.
1. onRequest
This is the first hook that fires, before any parsing occurs.
- Signature:
function (request, reply, done)(orasync function (request, reply)) request.bodyis UNDEFINED at this point. The request body has not been parsed yet. Do not attempt to read it.request.params,request.query, andrequest.headersARE available.- Use this hook for: early authentication checks (e.g., verifying a JWT before doing any work), request logging, IP-based rate limiting, early redirects, and attaching request-scoped metadata.
- To deny a request, call
reply.code(401).send({ error: 'Unauthorized' })andreturn reply(in async hooks) or calldone(error)(in callback hooks).
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.
- 10d ago First seen · 218 lines · 85 tokens per session scan A 5ef19e364946
fastify-hooks-lifecycle is a skill published in the GitHub repository RadOrigin-LLC/RAD-Claude-Skills (5 stars, last pushed 24d ago), licensed Apache-2.0. It adds 85 tokens to every session and 3,280 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.
Other skills, from other repositories
draper-decorators
This skill should be used when the user asks to "create a decorator", "write a decorator", "move logic into decorator", "clean logic out of the view", "isn't it decorator logic", "test a decorator", or mentions Draper, keeping views clean, or representation logic in decorators. Should also be used when editing…
rudder-mcp-workflow
Connects AI agents to RudderStack via MCP tool calls for catalog, sources, destinations, transformations, and live events. Use when connecting an AI agent to RudderStack's MCP server, driving RudderStack via MCP, or mentions of mcp.rudderstack.com.
helius
Skill "helius" from helius-labs/core-ai, covering helius — build on solana, prerequisites, 1. helius mcp server, 2. mcp router surface and 3. api key.
dependency-management
Python dependency and environment management for multi-service or monorepo python backends. Use when: (1) adding, upgrading, or removing a Python package, (2) responding to Dependabot or security vulnerability alerts (GHSA/CVE), (3) creating a new service that needs its own requirements files, (4) debugging pip…
vibe-domain-extractor
Extracts pure, framework-free, IO-free domain models and deterministic business rules from a rapid prototype with strict preservation vs replacement classification and purity audit enforcement.
api-contracts
API design and contract engineering — REST resource modelling, error envelopes, pagination, filtering, idempotency, versioning and deprecation, rate limiting, webhooks, OpenAPI, GraphQL schema and N+1 defence, and contract testing. Use when designing, reviewing or documenting an endpoint or integration; when the user…