← ClaudeAtlas

input-validation-skilllisted

Validates, sanitizes, normalizes user inputs before processing. Prevents injection attacks, data corruption, runtime errors in production. Enforces schema-driven validation at entry points with explicit rejection policies for malformed payloads.
pantheon-org/skill-quality-auditor · ★ 2 · Testing & QA · score 68
Install: claude install-skill pantheon-org/skill-quality-auditor
# Input Validation Skill Enforce strict input validation before any processing to prevent security vulnerabilities and data corruption. See `references/deep-reference.md` for schema details. ## Mindset ALWAYS treat external input as untrusted. Validate at the boundary, not deep in business logic. Every gotcha in production traces back to skipped validation. Core rules: 1. Validate at entry points, not deep in business logic 2. Reject early — fail fast on malformed input 3. NEVER assume internal callers are trusted without proof 4. ALWAYS return a structured error with the validation failure reason 5. PREFER schema-driven validation over ad-hoc checks whenever a schema library is available 6. AVOID duplicating validation logic across layers — validate once at the entry boundary 7. TYPICALLY use zod, joi, or equivalent typed-schema libraries in TypeScript projects 8. By default, log validation failures at WARN level unless the payload contains PII 9. Consider caching compiled schemas for high-throughput paths to reduce overhead 10. You may skip schema compilation caching in low-volume services where simplicity matters ## When to Use - Processing user-supplied data from forms, APIs, or CLI arguments - Ingesting files or configuration from external sources - Handling webhook payloads or third-party integrations ## When NOT to Use - Validating internal constants or compile-time values - Re-validating data that has already passed a trusted validation boundary in the same r