Agent skill
Global Validation
Implement runtime validation and type safety using Zod schemas for Content Collections, API inputs, form data, and environment variables. Use this skill when validating user input, API requests, content schemas, or ensuring data integrity. When working on Content Collections schema definitions in src/content/config.ts, API route input validation with Zod, form validation (server-side and client-side), environment variable validation, component prop validation with runtime checks, URL and query parameter validation, request body and form data sanitization, TypeScript runtime type validation, or custom Zod refinements and transformations.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/global-validation-spaceplushy-portfolio
SKILL.md
Global Validation
This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle global validation.
When to use this skill
- When defining Content Collection Zod schemas in src/content/config.ts
- When validating API route inputs (query params, request body, headers)
- When implementing server-side form validation in API endpoints
- When validating environment variables on application startup
- When adding client-side HTML5 form validation attributes
- When sanitizing user input to prevent XSS attacks
- When validating URLs, emails, or other formatted data types
- When implementing component prop validation for critical components
- When using Zod safeParse for validation with detailed error messages
- When creating custom Zod refinements for complex validation rules
- When ensuring type safety at runtime, not just compile-time
Instructions
For details, refer to the information provided in this file: global validation
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?