argument-validator-generator

Solid

Generate argument validation logic with type coercion, constraints, custom validators, and helpful error messages for CLI applications.

AI & Automation 814 stars 53 forks Updated today MIT

Install

View on GitHub

Quality Score: 95/100

Stars 20%
97
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Argument Validator Generator Generate comprehensive argument validation logic for CLI applications with type coercion and constraint checking. ## Capabilities - Generate type coercion functions for arguments - Create custom validators with constraint checking - Set up validation error messages - Implement value normalization - Configure mutually exclusive validation - Generate validation schemas ## Usage Invoke this skill when you need to: - Add type validation to CLI arguments - Create custom argument validators - Implement complex constraint checking - Generate helpful validation error messages ## Inputs | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | language | string | Yes | Target language (typescript, python, go, rust) | | validators | array | Yes | List of validators to generate | | outputPath | string | No | Output path for generated files | ### Validator Structure ```json { "validators": [ { "name": "port", "type": "number", "constraints": { "min": 1, "max": 65535 }, "errorMessage": "Port must be between 1 and 65535" }, { "name": "email", "type": "string", "pattern": "^[\\w.-]+@[\\w.-]+\\.\\w+$", "errorMessage": "Invalid email format" }, { "name": "environment", "type": "enum", "values": ["development", "staging", "production"], "aliases": { "dev": "development", "prod": "production" } } ] }...

Details

Author
a5c-ai
Repository
a5c-ai/babysitter
Created
4 months ago
Last Updated
today
Language
JavaScript
License
MIT

Related Skills