Validating Inputs

Community

Garbage in? Error out. Keep your code clean.

Authorbarrydobson
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill prevents bugs, security vulnerabilities, and data corruption by ensuring all external inputs are rigorously checked for validity. It shifts from "garbage in, garbage out" to "garbage in, nothing out" or "garbage in, error message out," making software robust and reliable.

Core Features & Use Cases

  • Two-Level Defense: Distinguishes between assertions (for programmer errors) and error handling (for expected production anomalies).
  • Comprehensive Checks: Guides you to validate types, ranges, formats, lengths, and security risks for all untrusted data sources (user input, APIs, files, DB).
  • Robustness vs. Correctness: Helps you consciously decide the appropriate error response strategy (e.g., raise exception, return neutral value, log and continue).
  • Use Case: Before processing user registration data, use this skill to validate email format, password strength, age range, and ensure all required fields are present, raising specific ValueError or TypeError exceptions for invalid inputs.

Quick Start

I need to write a function process_user_data(data: dict). Guide me through identifying all potential invalid inputs for a user dictionary (e.g., missing fields, invalid email, age out of range) and implementing robust validation using both assertions and error handling.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: Validating Inputs
Download link: https://github.com/barrydobson/dotfiles_extra/archive/main.zip#validating-inputs

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository