runtime-validation
What it does
This skill finds places where an app takes in data from the network, storage, environment settings, or forms, and adds runtime checks using a schema library. It is for developers who want fewer bugs from unexpected data.
When to use it
- ✓When you ask the agent to add checks to data coming from an API or a form.
- ✓When your app breaks because an API returned a different shape than expected.
- ✓When you are reviewing code that reads from local storage or environment variables and want those values checked.
Skill link
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/runtime-validation/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“My app breaks when the API sends slightly different data than expected. Can you add checks at the points where data comes in?”
5 new skills a week. 1 minute to read.
How it works
The agent finds places where data enters the app, such as fetch calls, local storage reads, and form submissions. It adds schemas, for example with Zod, that check the shape of the data and give clear errors when it does not match.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Validate external data at runtime with a schema library
TypeScript gives you confidence at compile time, but data from the network, user input, and storage arrives at runtime as raw, untyped values. A backend schema change, a misconfigured API, or malicious input can produce data that does not match your TypeScript types — and the compiler will never warn you. Runtime validation with a schema library catches these mismatches at the boundary, surfaces clear error messages, and prevents type-unsafe data from propagating through your application.
Quick Reference
- TypeScript types are compile-time only — they are completely erased at runtime
- API responses can differ from their declared types without causing a compile error
- A Zod schema simultaneously validates data and infers the TypeScript type
- Validate at trust boundaries only — not inside every internal function call
Check
Identify all places in this code where external data enters the application (fetch calls, localStorage reads, env variable access, form submissions) and report which ones lack runtime schema validation.
Fix
Add Zod schemas to validate the external data entry points in this code. Show the schema definition, the validated type inference, and where to call .parse() or .safeParse().
Explain
Explain why TypeScript types do not protect against runtime data mismatches, how Zod bridges compile-time and runtime safety, and when to use .parse() versus .safeParse().
Code Review
Review all external data entry points in this file: API calls, storage reads, environment variable access, and form handling. Flag any location where data is cast to a TypeScript type without a preceding runtime validation step.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/javascript/runtime-validation
FAQ
Why are TypeScript types not enough?
The skill says TypeScript types are removed when the code runs, so they cannot check the actual data at runtime.
Where should validation go?
The skill says to validate at trust boundaries, where outside data enters, rather than in every internal function.
What does a schema give me?
The skill says a Zod schema checks the data and also provides the matching TypeScript type.
Details
Original description by the author
Use when reviewing code that calls fetch(), reads from localStorage, accesses process.env, or processes form submissions without explicitly validating the incoming data shape.
Popularity
- GitHub stars
- 75k
- Ranking position
- #3006
- License
- MIT
- Updated
- 10/31/2026
Comments
- …
More skills from this repository
frontendchecklist
75kChecks frontend code and live pages against 380+ rules for accessibility, speed, SEO and security, using a command-line tool.
frontend-checklist-global
75kAudits a frontend project against all 386 Front-End Checklist rules, and gives a specific fix for each issue found.
404-page
75kChecks that your missing-page screen offers helpful links and returns a real 404 status, to help lost visitors find their way.
about-page
75kReviews whether your site has a clear About page that explains who runs it, to build trust with visitors and search engines.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.