NestJS patterns -- modules, DI, exception filters, validation pipes, guards, interceptors, testing, config
98
89%
Does it follow best practices?
Impact
100%
1.36xAverage score across 12 eval scenarios
Passed
No known issues
{
"instruction": "Use a global catch-all exception filter that returns a consistent { error: { code, message } } envelope",
"relevant_when": "Agent implements error handling in a NestJS application",
"context": "NestJS exception filters catch errors and format responses. The filter must use @Catch() with no arguments to catch ALL exception types. For HttpException, return { error: { code: exception.name, message: exception.message } }. For unknown errors, log with console.error before returning 500 with { error: { code: 'INTERNAL_ERROR', message: 'An unexpected error occurred' } }.",
"sources": [
{
"type": "file",
"filename": "skills/nestjs-best-practices/SKILL.md",
"tile": "tessl-labs/nestjs-best-practices@0.2.0"
}
],
"checklist": [
{
"name": "catch-all-decorator",
"rule": "Agent uses @Catch() with NO arguments on the exception filter class so it catches all exception types",
"relevant_when": "Agent creates a NestJS exception filter"
},
{
"name": "error-envelope-shape",
"rule": "Agent returns JSON in the shape { error: { code: string, message: string } } for BOTH HttpException and unknown errors",
"relevant_when": "Agent implements error response formatting in a NestJS exception filter"
},
{
"name": "unknown-error-logging",
"rule": "Agent calls console.error to log non-HttpException errors before returning a 500 response",
"relevant_when": "Agent handles unknown/unexpected errors in a NestJS exception filter"
},
{
"name": "global-filter-registration",
"rule": "Agent registers the exception filter globally in main.ts using app.useGlobalFilters()",
"relevant_when": "Agent sets up error handling in a NestJS application"
}
]
}evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
skills
nestjs-best-practices
verifiers