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 jdanigo/hydraia --skill node-patternsgit clone --depth 1 https://github.com/jdanigo/hydraiaWrote 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/jdanigo/hydraia/node-patterns)<a href="https://agentmods.dev/skills/jdanigo/hydraia/node-patterns"><img src="https://agentmods.dev/badge/skills/jdanigo/hydraia/node-patterns/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/jdanigo/hydraia/node-patterns"><img src="https://agentmods.dev/badge/skills/jdanigo/hydraia/node-patterns.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.00000 | $0.00636 |
| Opus 5.5 | $0.00000 | $0.00254 |
| Sonnet 5.5 | $0.00000 | $0.00127 |
| Haiku 4.5 | $0.00000 | $0.00064 |
Grade A, and why
node-patterns 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 1mo 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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
- No sync I/O (`readFileSync`, `execSync`) on request paths — boot time only. How it starts
The opening of the file, as written. The whole thing — 48 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Node/TypeScript Backend Patterns
Project layout
- Feature folders over layer folders:
src/orders/{orders.router,orders.service,orders.repo,orders.test}.tsbeatssrc/{routes,services,repos}/orders.tsscattered three places. - One composition root (
src/app.ts) wires everything; entry (src/main.ts) only boots. Handlers stay thin — parse/validate → service call → shape response.
Async discipline
- No floating promises: every promise is awaited, returned, or explicitly
void-ed with a comment. Unhandled rejection = crash in modern Node. - Propagate
AbortSignalthrough request-scoped work (fetch, DB timeouts); cancel on client disconnect for expensive handlers. - No sync I/O (
readFileSync,execSync) on request paths — boot time only. - Concurrency with intent:
Promise.allfor independent work,for…of awaitwhen order matters, a limiter (p-limit) when fan-out is unbounded.
Config
- Typed and validated at boot (zod or equivalent): missing/invalid env kills the process at startup with a clear message — never
process.env.X!scattered through the codebase. - One
config.tsexports the parsed object; nothing else readsprocess.env.
Errors
- Central error taxonomy:
AppErrorsubtypes with status + code (NotFound,Validation,Conflict,Upstream). Handlers throw domain errors; ONE error middleware maps them to responses (problem+json shape). - Never
catch (e) {}— swallow nothing; wrap-and-rethrow with context or let it propagate.
DI boundaries
- NestJS: providers with explicit scopes; beware request-scoped bleeding into singletons.
- Express/Fastify: manual factories — services take dependencies as constructor/args, never import singletons directly. Makes the testing shape below possible.
ESM/CJS pitfalls
- Pick ONE module system per package and align
"type",tsconfigmodule, and tooling. Mixed default/named interop errors are config bugs, not code bugs. __dirnamedoes not exist in ESM —import.meta.url+fileURLToPath.
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.
- 1mo ago First seen · 48 lines · 0 tokens per session scan A d0252ad8998a
node-patterns is a skill published in the GitHub repository jdanigo/hydraia (8 stars, last pushed 29d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 636 tokens. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
ia-nodejs-backend
Node.js backend patterns: layered architecture, TypeScript, validation, error handling, security, observability, logging, metrics, deployment. Use when building REST APIs, REST endpoints, middleware, Express/Fastify/Hono/NestJS/Koa servers, tRPC procedures, Bun servers, or server-side TypeScript.
better-auth
Skill for integrating Better Auth - comprehensive TypeScript authentication framework for Cloudflare D1, Next.js, Nuxt, and 15+ frameworks. Use when adding auth, encountering D1 adapter errors, or implementing OAuth/2FA/RBAC features.
python-services
Python patterns for CLI tools, async parallelism, and backend services. Use when building CLI apps, async/parallel Python, FastAPI services, background jobs, or configuring Python project tooling (uv, ruff, ty).
react-frontend
React, TypeScript, and Next.js patterns for frontend development. Use when building React components, managing state, fetching data, optimizing performance, or working with Next.js App Router. Covers React 18-19, hooks, Server Components, and type-safe patterns.
php-laravel
Modern PHP 8.2+ and Laravel patterns: architecture, Eloquent, queues, Pest testing. Use when asked to "write PHP", "build a Laravel app", "fix Eloquent query", "add a queue job", "write a Pest test", or mentions PHP, Laravel, Eloquent, Blade, artisan, or migrations.
ia-php-laravel
Modern PHP 8.4 and Laravel patterns: architecture, Eloquent, migrations, queues, testing. Use when working with Laravel, Eloquent, Blade, artisan, or building/testing a framework-based PHP app. Not for php-src internals, standalone PHP libraries, or general PHP language discussion.