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 smicolon/ai-kit --skill nestjs-security-validatorgit clone --depth 1 https://github.com/smicolon/ai-kitWrote 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/smicolon/ai-kit/nestjs-security-validator)<a href="https://agentmods.dev/skills/smicolon/ai-kit/nestjs-security-validator"><img src="https://agentmods.dev/badge/skills/smicolon/ai-kit/nestjs-security-validator/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/smicolon/ai-kit/nestjs-security-validator"><img src="https://agentmods.dev/badge/skills/smicolon/ai-kit/nestjs-security-validator.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.00039 | $0.00608 |
| Opus 5.5 | $0.00016 | $0.00243 |
| Sonnet 5.5 | $0.00008 | $0.00122 |
| Haiku 4.5 | $0.00004 | $0.00061 |
Grade A, and why
nestjs-security-validator 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 — 112 lines — stays where its author put it; the contents beside it link to each section on GitHub.
NestJS Security Validator
Enforces security defaults and defensive programming across NestJS applications.
1. Global Input Validation (ValidationPipe)
In main.ts, always configure ValidationPipe with stripping and rejection of unwhitelisted properties to prevent parameter injection:
// main.ts
import { ValidationPipe } from '@nestjs/common'
async function bootstrap() {
const app = await NestFactory.create(AppModule)
app.useGlobalPipes(
new ValidationPipe({
whitelist: true, // Strips properties without decorators in DTO
forbidNonWhitelisted: true, // Throws error if unknown property is sent
transform: true, // Auto-transforms payloads to DTO instance types
transformOptions: {
enableImplicitConversion: false, // Explicit types only
},
}),
)
}
2. Rate Limiting (@nestjs/throttler v5+)
Prevent brute-force and DoS attacks:
// app.module.ts
import { ThrottlerModule, ThrottlerGuard } from '@nestjs/throttler'
import { APP_GUARD } from '@nestjs/core'
@Module({
imports: [
ThrottlerModule.forRoot([
{
name: 'short',
ttl: 1000,
limit: 10, // 10 requests per second
},
{
name: 'medium',
ttl: 60000,
limit: 100, // 100 requests per minute
},
]),
],
providers: [
{
provide: APP_GUARD,
useClass: ThrottlerGuard,
},
],
})
export class AppModule {}
3. Helmet & CORS Protection
import helmet from 'helmet'
async function bootstrap() {
const app = await NestFactory.create(AppModule)
// Security HTTP headers
app.use(helmet())
// Explicit CORS
app.enableCors({
origin: process.env.ALLOWED_ORIGINS?.split(',') ?? ['http://localhost:3000'],
methods: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'],
credentials: true,
})
}
4. DTO Validation Decorators
Every field in DTOs must have explicit class-validator decorators:
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 · 112 lines · 39 tokens per session scan A af950e02e371
nestjs-security-validator is a skill published in the GitHub repository smicolon/ai-kit (7 stars, last pushed 2mo ago), licensed MIT. It adds 39 tokens to every session and 608 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-09-04.
nestjs-security-validator compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| nestjs-security-validatorsmicolon/ai-kit | Skill | 7 | 2mo ago | MIT | A | 39 | Claude Code |
| add-dial-toolnanocoai/nanoclaw | Skill | 31k | today | MIT | A | 118 | Claude Code |
| add-telegramnanocoai/nanoclaw | Skill | 31k | today | MIT | A | 12 | Claude Code |
| add-gchatnanocoai/nanoclaw | Skill | 31k | today | MIT | A | 13 | Claude Code |
| add-signalnanocoai/nanoclaw | Skill | 31k | today | MIT | A | 22 | Claude Code |
| add-matrixnanocoai/nanoclaw | Skill | 31k | today | MIT | A | 19 | Claude Code |
| onecli-gatewaynanocoai/nanoclaw | Skill | 31k | today | MIT | A | 81 | Claude Code |