Skip to content
Back to skills

Input Validation

ASecurity

`analysis-agent`/`task-agent`/`review-agent`: use for input authority, parsing, canonicalization, bounds, state checks, writable fields, rejection, or external-response changes.

  • 7 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 8, 2026
businessrust

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add machenjie/rd-skills --skill input-validation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Input Validation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Input Validation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/machenjie-input-validation/badge)](https://www.skillsdirectory.com/skills/machenjie-input-validation)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: input-validation
description: "`analysis-agent`/`task-agent`/`review-agent`: use for input authority, parsing, canonicalization, bounds, state checks, writable fields, rejection, or external-response changes."
---

# input-validation

## Registry Trigger

**Use when**

- define input source authority parsing canonicalization structural and resource bounds current-state constraints writable fields rejection and external-response validation

**Do not use when**

- no task-local input boundary accepted representation state constraint writable field rejection or external-response decision changes

## Skill Role

Define input authority, decoding and canonicalization order, structural and resource bounds, current-state constraints, writable fields, rejection semantics, and external-response validation. Exclude business-rule and permission policy.

## High-Value Rules

- **Name source authority before validation.** Distinguish caller data, authenticated context, server-owned state, provider responses, configuration, generated values, and derived fields so untrusted input cannot override authority.
- **Define one accepted representation.** Specify decoding, normalization, Unicode, whitespace, case, path, numeric, date, identifier, and duplicate-field behavior before equality, lookup, signing, or policy checks.
- **Bound parser and downstream work.** Derive size, count, depth, expansion, range, precision, allocation, query, and fan-out limits from current product, capacity, and abuse constraints, including partial-input behavior.
- **Separate structure from business and state constraints.** Validate shape at the boundary, then apply authoritative eligibility, lifecycle, uniqueness, ownership, and cross-record rules where current state is available.
- **Allowlist writable fields and transitions.** Map accepted input only to owner-authorized commands, fields, identities, and state changes.
- **Make rejection stable and non-leaking.** Preserve machine meaning, field association, safe detail, retryability, and compatibility without exposing secrets, object existence, internal topology, or parser internals.
- **Validate external responses before trust.** Check schema, identity binding, freshness, signatures where applicable, limits, unknown values, and failure behavior before persisting or acting on provider data.

## Anti-Patterns

- Validate before canonicalization, then compare or authorize a differently decoded representation.
- Use schema success as proof of business validity, ownership, safe resource use, or external-response authenticity.
- Bind request objects directly to persistence or domain state, allowing omitted or unexpected fields to mutate authority-owned values.

## Stop Conditions

Escalate when input or state authority is ambiguous, canonical forms can collide, or resource bounds cannot contain untrusted work. Also escalate when writable fields cross permission or invariant boundaries, rejection leaks sensitive state, or external data authenticity and freshness cannot be established.

## Output Contract

- input-validation decision with source authority, canonical representation, structural and resource bounds, state constraints, writable fields, rejection semantics, external-response checks, and proof limits

## Targeted References

| Path | Type | Load when | Do not load when | Required by | Required output |
|---|---|---|---|---|---|
| [benchmarks and patterns](references/benchmarks-and-patterns.md) | benchmark-pattern | competing authority representation bounds current-state writable-field rejection compatibility or external-response patterns remain viable | one bounded input decision is already complete from the root contract | analysis-agent, task-agent, review-agent | option-comparison, selected-approach |
| [checklist](references/checklist.md) | decision-checklist | several input boundaries representations constraint classes state checks writable fields rejection outcomes or consumer effects must close together | one bounded field or boundary is already complete from the root contract | analysis-agent, task-agent, review-agent | checklist-result, residual-risk |
| [evidence patterns](references/evidence-patterns.md) | evidence-pattern | authority representation canonicalization bounds state replay write-surface rejection compatibility or external-response claims need fresh proof | no task-local validation claim awaits proof | analysis-agent, task-agent, review-agent | evidence-record, proof-limit, residual-risk |

Files in this skill

  • SKILL.md4.4 KB
  • references/benchmarks-and-patterns.md3.7 KB
  • references/checklist.md2.5 KB
  • references/evidence-patterns.md3.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in business →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.