Input Validation Patterns
Design and implement input validation patterns (whitelisting, boundary checks, type validation) to prevent injection and buffer overflow attacks.
Install
/plugin marketplace add sethdford/claude-skillsThe repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.
npx skills add sethdford/claude-skills --skill input-validation-patternsgit clone --depth 1 https://github.com/sethdford/claude-skills.git /tmp/claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills/security/secure-development/skills/input-validation-patterns ~/.claude/skills/input-validation-patternsPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Input Validation Patterns
Design robust input validation using whitelisting, boundary checks, and type validation.
## Context
You are a senior security architect designing input validation for $ARGUMENTS. Input validation is the first line of defense against injection attacks, buffer overflows, and malformed-data exploitation.
## Domain Context
- **Whitelisting vs. Blacklisting**: Whitelist allowed characters/patterns (safe-list approach); blacklisting is fragile and incomplete
- **Validation Points**: Validate at every trust boundary; don't assume data from database or internal APIs is safe
- **Canonicalization**: Normalize input (remove encoding, aliases) before validation (e.g., `../../etc/passwd` → `/etc/passwd`)
- **Type Safety**: Enforce data types (integer, email, UUID); avoid string representations that get misinterpreted
## Instructions
1. **Define Validation Rules** for each input:
- **Type**: Integer, string, email, UUID, date, IP address, etc.
- **Length**: Min and max length (prevents buffer overflow, DoS)
- **Format**: Regex or pattern (email: `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$`)
- **Range**: Min/max value for numbers (e.g., age 0-150, quantity 1-1000)
- **Allowed Characters**: Whitelist (e.g., for filename: alphanumeric, dash, underscore only)
- **Business Rules**: Must be unique, must exist in reference table, must be in future, etc.
2. **Implement Whitelisting** (not blacklisting):Details
- Skill name
input-validation-patterns- Repository
- sethdford/claude-skills
- Path
security/secure-development/skills/input-validation-patterns/SKILL.md- License
- MIT
- Repo updated
- 11 March 2026
FAQ
What does the Input Validation Patterns skill do?
Design and implement input validation patterns (whitelisting, boundary checks, type validation) to prevent injection and buffer overflow attacks.
How do I install the Input Validation Patterns skill?
Claude Code plugin: /plugin marketplace add sethdford/claude-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Input Validation Patterns popular?
It lives in sethdford/claude-skills, which has 48 GitHub stars and 10 forks.
Related skills
A B Test Design
48sethdford/claude-skills
Design rigorous A/B tests with hypotheses, variants, metrics, and sample size calculations.
A B Test Design Pm
48sethdford/claude-skills
Analytics and experimentation skill for product managers.
Abuse Case Design
48sethdford/claude-skills
Design abuse cases (negative use cases) showing how attackers misuse system features. Use when identifying attacks that exploit intended functionality or business logic flaws.
Interface Design
48sethdford/claude-skills
Designing minimal, cohesive, role-based interfaces that respect Interface Segregation Principle.
Index Design
48sethdford/claude-skills
B-tree indexes, composite indexes, covering indexes, UNIQUE indexes, and index trade-offs.
Jobs to Be Done
48sethdford/claude-skills
Map user Jobs-to-Be-Done with functional, emotional, and social dimensions plus outcome expectations. Use when reframing product decisions around user motivations rather than features.
Browse the most popular Claude skills, all other skills, or write your own with the skills generator.