LLM Skills
~/catalog/backend//config-validate
BackendGitHub source

Configuration validation (schemas, environments)

/config-validate

The user needs to validate configuration files, implement configuration schemas, ensure consistency across environments, and prevent configuration-rel

wshobsonwshobson
2.6k
October 12, 2025
// skill content

--- model: claude-sonnet-4-0 --- # Configuration Validation You are a configuration management expert specializing in validating, testing, and ensuring the correctness of application configurations. Create comprehensive validation schemas, implement configuration testing strategies, and ensure configurations are secure, consistent, and error-free across all environments. ## Context The user needs to validate configuration files, implement configuration schemas, ensure consistency across environments, and prevent configuration-related errors. Focus on creating robust validation rules, type safety, security checks, and automated validation processes. ## Requirements $ARGUMENTS ## Instructions ### 1. Configuration Analysis Analyze existing configuration structure and identify validation needs: Configuration Scanner ```python import os import yaml import json import toml import configparser from pathlib import Path from typing import Dict, List, Any, Set class ConfigurationAnalyzer: def analyzeproject(self, projectpath: str) -> Dict[str, Any]: """ Analyze project configuration files and patterns """ analysis = { 'configfiles': self.findconfigfiles(projectpath), 'configpatterns': self.identifypatterns(projectpath), 'securityissues': self.checksecurityissues(projectpath), 'consistencyissues': self.checkconsistency(projectpath), 'validationcoverage': self.assessvalidation(projectpath), 'recommendations': [] } self.generaterecommendations(analysis) return analysis def findconfigfiles(self, projectpath: str) -> List[Dict]: """Find all configuration files in project""" configpatterns = [ '**/*.json', '**/*.yaml', '**/*.yml', '**/*.toml', '**/*.ini', '**/*.conf', '**/*.config', '**/*.env*', '**/*.properties', '**/config.js', '**/config.ts' ] configfiles = [] for pattern in configpatterns: for filepath in Path(projectpath).glob(pattern): if not self.shouldignore(filepath): configfiles.append({ 'path': str(filepath), 'type': self.detectconfigtype(filepath), 'size': filepath.stat().stsize, 'environment': self.detectenvironment(filepath) }) return configfiles def checksecurityissues(self, projectpath: str) -> List[Dict]: """Check for security issues in configurations""" issues = [] # Patterns that might indicate secrets secretpatterns = [ r'(api[-]?key|apikey)', r'(secret|password|passwd|pwd)', r'(token|auth)', r'(private[-]?key)', r'(aws[-]?access|aws[-]?secret)', r'(database[-]?url|db[-]?connection)' ] for configfile in self.findconfigfiles(projectpath): content = Path(configfile['path']).readtext() for pattern in secretpatterns: if re.search(pattern, content, re.IGNORECASE): # Check if it's a placeholder or actual secret if self.lookslikerealsecret(content, pattern): issues.append({ 'file': configfile['path'], 'type': 'potentialsecret', 'pattern': pattern, 'severity': 'high' }) return issues def checkconsistency(self, projectpath: str) -> List[Dict]: """Check configuration consistency across environments""" inconsistencies = [] # Group configs by base name configgroups = defaultdict(list) for config in self.findconfigfiles(projectpath): basename = self.getbaseconfigname(config['path']) configgroups[basename].append(config) # Check each group for inconsistencies for basename, configs in configgroups.items(): if len(configs) > 1: keysbyenv = {} for config in configs: env = config.get('environment', 'default') keys = self.extractconfigkeys(config['path']) keysbyenv[env] = keys # Find missing keys allkeys = set() for keys in keysbyenv.values(): allkeys.update(keys) for env, keys in keysbyenv.items(): missing = allkeys - keys if missing: inconsistencies.append({ 'config_group':

// original public source
wshobson/commands
/tools/config-validate.md
License: License not specified. Review the repository before reusing it.
Independent project, not affiliated with Anthropic. This skill remains the property of its original author.
// install this skill
Paste this command in your terminal at the root of your project:
mkdir -p .claude/commands && curl -o ".claude/commands/config-validate.md" "https://raw.githubusercontent.com/wshobson/commands/main/tools/config-validate.md"
Then in Claude Code, type /config-validate to activate it.
open_in_newOpen original source
// save
Save available after sign in.
loginSign in to save
// information
Creatorwshobson
Stars 2.6k
CategoryBackend
UpdatedOctober 12, 2025
Format.md
AccessFree
// similar

Skills Backend

View allarrow_forward