mutually-exclusive-group-handler

Solid

Generate logic for handling mutually exclusive argument groups with clear error messages and validation in 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

# Mutually Exclusive Group Handler Generate logic for handling mutually exclusive CLI argument groups. ## Capabilities - Generate mutually exclusive group validation - Create dependent argument relationships - Set up required group validation - Implement custom conflict messages - Configure OR/XOR group logic - Generate documentation for groups ## Usage Invoke this skill when you need to: - Implement mutually exclusive options - Create dependent argument chains - Validate argument relationships - Generate clear conflict messages ## Inputs | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | language | string | Yes | Target language | | groups | array | Yes | Mutually exclusive group definitions | ### Group Structure ```json { "groups": [ { "name": "output-format", "type": "mutually_exclusive", "required": true, "options": ["--json", "--yaml", "--table"], "errorMessage": "Choose one output format: --json, --yaml, or --table" }, { "name": "auth-method", "type": "mutually_exclusive", "options": ["--token", "--username"], "dependencies": { "--username": ["--password"] } } ] } ``` ## Generated Patterns ### TypeScript Group Handler ```typescript interface GroupValidation { name: string; options: string[]; required?: boolean; errorMessage?: string; dependencies?: Record<string, string[]>; } export function validateMutuallyExclusiveGr...

Details

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

Related Skills