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.
git clone --depth 1 https://github.com/prisma/prisma-nextWrote 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/rules/prisma/prisma-next/config-validation-and-normalization)<a href="https://agentmods.dev/rules/prisma/prisma-next/config-validation-and-normalization"><img src="https://agentmods.dev/badge/rules/prisma/prisma-next/config-validation-and-normalization/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/rules/prisma/prisma-next/config-validation-and-normalization"><img src="https://agentmods.dev/badge/rules/prisma/prisma-next/config-validation-and-normalization.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.00932 |
| Opus 5.5 | $0.00000 | $0.00373 |
| Sonnet 5.5 | $0.00000 | $0.00186 |
| Haiku 4.5 | $0.00000 | $0.00093 |
Grade A, and why
config-validation-and-normalization 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 — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Config Validation and Normalization
When implementing config files (e.g. prisma-next.config.ts), use Arktype for validation and
normalization. This gives type safety, clear error messages, and sensible defaults.
Pattern: Validate + Normalize in defineConfig()
import { type } from 'arktype';
import { join, dirname } from 'node:path';
const ConfigSchema = type({
required: 'string',
'optional?': 'string',
nested: type({ 'nestedOptional?': 'number' }),
});
export function defineConfig(config: ConfigInput): ConfigOutput {
// 1. Validate structure with Arktype
const validated = ConfigSchema(config);
if (validated instanceof type.errors) {
const messages = validated.map((p: { message: string }) => p.message).join('; ');
throw new Error(`Config validation failed: ${messages}`);
}
// 2. Normalize by applying defaults
const normalized: ConfigOutput = {
...config,
optional: config.optional ?? 'default-value',
nested: { ...config.nested, nestedOptional: config.nested?.nestedOptional ?? 42 },
};
// 3. Return the normalized IR (not the raw input)
return normalized;
}
Validation catches structural errors early with clear messages; normalization applies defaults in one place; Arktype keeps structure aligned with TypeScript types.
Normalization Responsibilities
defineConfig() is the ONLY place normalization happens. It validates structure, applies
defaults for optional fields, returns the normalized config IR, and throws on invalid structure. It
should always output a fully normalized config. All other components assume configs are already
normalized:
- Config loader — loading only. Loads the config file (c12 or similar) and calls
defineConfig()to validate/normalize, then returns the result. Does NOT set defaults or normalize structure. - Command handlers — using only. Use normalized values directly, accessing fields without checking for defaults. Do NOT set defaults or normalize structure.
- Validators. Never normalize.
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 · 122 lines · 0 tokens per session scan A 807e0069048e
config-validation-and-normalization is a cursor rule published in the GitHub repository prisma/prisma-next (407 stars, last pushed 6d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 932 tokens. 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.
config-validation-and-normalization compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| config-validation-and-normalizationprisma/prisma-next | Cursor rule | 407 | 6d ago | Apache-2.0 | A | 0 | Cursor |
| ponytailDietrichGebert/ponytail | Cursor rule | 202k | 9d ago | MIT | A | 604 | Cursor |
| angular-20angular/angular | Cursor rule | 102k | today | MIT | A | 0 | Cursor |
| dev-standardapache/superset | Cursor rule | 76k | yesterday | Apache-2.0 | A | 1,147 | Cursor |
| prefer-assertions-over-defensive-checksprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |
| prefer-direct-imports-over-module-mocksprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |
| shared-plane-packagesprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |