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 VersoXBT/claude-initial-setup --skill express-error-handlinggit clone --depth 1 https://github.com/VersoXBT/claude-initial-setupWrote 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/versoxbt/claude-initial-setup/express-error-handling)<a href="https://agentmods.dev/skills/versoxbt/claude-initial-setup/express-error-handling"><img src="https://agentmods.dev/badge/skills/versoxbt/claude-initial-setup/express-error-handling/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/versoxbt/claude-initial-setup/express-error-handling"><img src="https://agentmods.dev/badge/skills/versoxbt/claude-initial-setup/express-error-handling.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.00084 | $0.01447 |
| Opus 5.5 | $0.00034 | $0.00579 |
| Sonnet 5.5 | $0.00017 | $0.00289 |
| Haiku 4.5 | $0.00008 | $0.00145 |
Grade A, and why
express-error-handling 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 2mo 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 — 214 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Express Error Handling
Patterns for comprehensive, centralized error handling in Express.js applications.
When to Use
- User is writing Express route handlers with async operations
- User needs custom error classes for different HTTP status codes
- User asks about centralized error handling
- User has unhandled promise rejections or uncaught exceptions
- User needs to distinguish between operational and programmer errors
Core Patterns
Custom Error Classes
Create a hierarchy of application errors that carry HTTP status codes and operational flags.
export class AppError extends Error {
readonly statusCode: number
readonly isOperational: boolean
constructor(message: string, statusCode: number, isOperational = true) {
super(message)
this.statusCode = statusCode
this.isOperational = isOperational
Object.setPrototypeOf(this, new.target.prototype)
}
}
export class NotFoundError extends AppError {
constructor(resource: string) {
super(`${resource} not found`, 404)
}
}
export class ValidationError extends AppError {
readonly details: Record<string, string[]>
constructor(details: Record<string, string[]>) {
super('Validation failed', 400)
this.details = details
}
}
export class UnauthorizedError extends AppError {
constructor(message = 'Authentication required') {
super(message, 401)
}
}
export class ForbiddenError extends AppError {
constructor(message = 'Insufficient permissions') {
super(message, 403)
}
}
export class ConflictError extends AppError {
constructor(message: string) {
super(message, 409)
}
}
Async Error Wrapper
Express does not catch errors from async route handlers automatically. Wrap them to forward errors to the error middleware.
import { Request, Response, NextFunction, RequestHandler } from 'express'
function asyncHandler(
fn: (req: Request, res: Response, next: NextFunction) => Promise<void>
): RequestHandler {
return (req, res, next) => {
fn(req, res, next).catch(next)
}
}
// Usage -- errors are automatically forwarded to error middleware
router.get(
'/users/:id',
asyncHandler(async (req, res) => {
const user = await db.user.findUnique({ where: { id: req.params.id } })
if (!user) throw new NotFoundError('User')
res.json({ data: user })
})
)
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.
- 2mo ago First seen · 214 lines · 84 tokens per session scan A 3982c8905841
express-error-handling is a skill published in the GitHub repository VersoXBT/claude-initial-setup (4 stars, last pushed 6mo ago), licensed MIT. It adds 84 tokens to every session and 1,447 once invoked, about $0.0003 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-09-03.
express-error-handling compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| express-error-handlingVersoXBT/claude-initial-setup | Skill | 4 | 6mo ago | MIT | A | 84 | Claude Code |
| error-handling-patternswshobson/agents | Skill | 43k | 2d ago | MIT | A | 43 | Claude Code |
| spine-perftonone-ai/tonone | Skill | 84 | 4d ago | MIT | A | 55 | Claude Code |
| spine-recontonone-ai/tonone | Skill | 84 | 4d ago | MIT | A | 50 | Claude Code |
| dev-error-handlingchristopherlouet/claude-base | Skill | 5 | yesterday | MIT | A | 25 | Claude Code |
| error-handlingtmj-90/gaffer | Skill | 1 | yesterday | Apache-2.0 | A | 84 | Claude Code, Codex |
| learnerXeldarAlz/everything-claude-unity | Skill | 25 | 7mo ago | MIT | A | 34 | Claude Code |