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.
git clone --depth 1 https://github.com/KhaledSaeed18/node-express-boilerplatenpx agentmods add skills/khaledsaeed18/node-express-boilerplate/add-middlewareWrote 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/khaledsaeed18/node-express-boilerplate/add-middleware)<a href="https://agentmods.dev/skills/khaledsaeed18/node-express-boilerplate/add-middleware"><img src="https://agentmods.dev/badge/skills/khaledsaeed18/node-express-boilerplate/add-middleware/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/khaledsaeed18/node-express-boilerplate/add-middleware"><img src="https://agentmods.dev/badge/skills/khaledsaeed18/node-express-boilerplate/add-middleware.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00044 | $0.00705 |
| Opus 5.5 | $0.00018 | $0.00282 |
| Sonnet 5.5 | $0.00009 | $0.00141 |
| Haiku 4.5 | $0.00004 | $0.00071 |
Grade A, and why
add-middleware 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 3mo 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 — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.
When the user asks to add middleware, follow these steps.
Step 1 — Create the file (src/middleware/<name>.middleware.ts)
Rules:
- Export named functions, not default exports — consistent with the barrel pattern.
- Type
req,res,nextasRequest,Response,NextFunctionfromexpress. Noany. - Use the Pino logger from
src/config/logger.tsif logging is needed — neverconsole.*. - Use config values from
src/config/env.ts— neverprocess.envdirectly. - Throw from
src/errors/for error conditions and callnext(error)— neverres.status().json()directly. - No floating promises — always
awaitor.catch().
Auth guard pattern:
import type { Request, Response, NextFunction } from 'express';
import { AuthenticationError } from '../errors';
export const requireAdmin = (req: Request, _res: Response, next: NextFunction): void => {
if (!req.user || req.user.role !== 'admin') {
return next(new AuthenticationError('Admin access required'));
}
next();
};
Async middleware pattern:
import type { Request, Response, NextFunction } from 'express';
import { NotFoundError } from '../errors';
import logger from '../config/logger';
export const someAsyncGuard = async (req: Request, _res: Response, next: NextFunction): Promise<void> => {
try {
// async work
next();
} catch (error) {
logger.error(error, 'someAsyncGuard failed');
next(error);
}
};
Rate limiter pattern (if adding a new limiter):
import rateLimit from 'express-rate-limit';
export const myLimiter = rateLimit({
windowMs: 15 * 60 * 1000,
max: 100,
standardHeaders: true,
legacyHeaders: false,
message: { success: false, message: 'Too many requests' },
});
Step 2 — Export from the barrel (src/middleware/index.ts)
export { myMiddleware } from './<name>.middleware';
Step 3 — Apply it
App-wide (applies to every request) — add to src/app.ts in the correct position in the middleware chain. Order matters:
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.
- 3mo ago First seen · 103 lines · 44 tokens per session scan A bdf7a2f45364
add-middleware is a skill published in the GitHub repository KhaledSaeed18/node-express-boilerplate (36 stars, last pushed 7d ago), licensed MIT. It adds 44 tokens to every session and 705 once invoked, about $0.0002 per session on Opus 5.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.
add-middleware compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| add-middlewareKhaledSaeed18/node-express-boilerplate | Skill | 36 | 7d ago | MIT | A | 44 | Claude Code, Codex |
| backendmiles990/claude-software-skills | Skill | 26 | 10mo ago | MIT | A | 16 | Claude Code, Codex |
| expressjs-developmentmanutej/luxor-claude-marketplace | Skill | 64 | 5mo ago | none | A | 29 | Claude Code |
| api-integration-architectsickn33/agentic-awesome-skills | Skill | 51k | yesterday | MIT | A | 33 | Claude Code |
| authentication-portal-apigreenpau/caddy-security | Skill | 2.3k | 13d ago | Apache-2.0 | A | 44 | Codex |
| coding-directivesgreenpau/caddy-security | Skill | 2.3k | 13d ago | Apache-2.0 | A | 45 | Codex |
| configuration-http-integrationsgreenpau/caddy-security | Skill | 2.3k | 13d ago | Apache-2.0 | A | 43 | Codex |