global-validation
Validate data structures, user inputs, and loaded content to ensure the static website operates correctly. Use this skill when verifying JSON data integrity, validating form inputs, and ensuring DOM elements exist before manipulation.
When & Why to Use This Skill
The Global Validation skill is designed to enhance the reliability and stability of static website projects by enforcing rigorous data integrity and input checks. It provides Claude with a standardized framework to verify JSON structures, validate HTML form inputs, and ensure DOM elements are present before manipulation, effectively preventing runtime errors and broken resources.
Use Cases
- Data Integrity Verification: Validating JSON data files from local directories to ensure all required properties and data types are present before rendering content.
- Form Input Sanitization: Checking user-submitted data against specific constraints and formats to ensure security and data quality.
- DOM Element Safety: Verifying the existence of specific HTML elements, IDs, or CSS classes before executing JavaScript functions to prevent 'null' reference errors.
- Resource and Path Validation: Confirming that internal file paths and external URLs are valid and reachable before the site attempts to fetch or link to them.
- Type and Range Enforcement: Ensuring numerical values (like scores or dates) and strings (like names) fall within expected ranges and formats during data processing.
| name | Global Validation |
|---|
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 in the adigunners.github.io static website project.
When to use this skill
- Validating JSON data structure when loading data files from the
data/directory before using them - Checking that required properties exist in data objects before rendering content to the page
- Validating user input from HTML forms to ensure data meets expected formats and constraints
- Verifying that DOM elements exist before attempting to manipulate them in JavaScript modules
- Validating data types and value ranges (e.g., ensuring scores are numbers, names are strings) before processing
- Checking CSS class names and ID selectors to ensure referenced elements exist in the HTML
- Validating file paths and URLs before attempting to fetch external resources in the static site
Instructions
For details, refer to the information provided in this file: global validation