Skip to content
Development
Command

/validate

Comprehensive validation orchestrator with intelligent project detection, parallel validation execution, and actionable remediation

From plugin
claude-cmd
313180 skills180 commands

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/validate

Context preview

What this command does when you run it.

Comprehensive validation orchestrator with intelligent project detection, parallel validation execution, and actionable remediation

Command definition

validate.md
allowed-tools: Task, Read, Write, Edit, MultiEdit, Bash(fd:*), Bash(rg:*), Bash(eza:*), Bash(bat:*), Bash(jq:*), Bash(yq:*), Bash(gdate:*), Bash(deno:*), Bash(cargo:*), Bash(go:*), Bash(mvn:*), Bash(gradle:*), Bash(kubectl:*), Bash(docker:*), Bash(hadolint:*), Bash(npm:*), Bash(pnpm:*), Bash(yarn:*)
name: "Validate"
description: "Comprehensive validation orchestrator with intelligent project detection, parallel validation execution, and actionable remediation"
author: "wcygan"
tags: ["test","run"]
version: "1.0.0"
created_at: "2025-07-14T00:00:00Z"
updated_at: "2025-07-14T00:00:00Z"

Context

  • Session ID: !`gdate +%s%N 2>/dev/null || date +%s%N 2>/dev/null || echo "$(date +%s)$(jot -r 1 100000 999999 2>/dev/null || shuf -i 100000-999999 -n 1 2>/dev/null || echo $RANDOM$RANDOM)"`
  • Target project: $ARGUMENTS
  • Current directory: !`pwd`
  • Project structure: !`eza -la --tree --level=2 2>/dev/null | head -10 || fd . -t d -d 2 | head -8`
  • Build configurations: !`fd "(package\.json|deno\.json|Cargo\.toml|go\.mod|pom\.xml|build\.gradle|tsconfig\.json|docker-compose\.)" . -d 3 | head -8 || echo "No build files detected"`
  • JSON validity: !`fd "\.json$" . | head -5 | xargs -I {} sh -c 'jq empty {} >/dev/null 2>&1 && echo "✓ {}" || echo "❌ {}"' 2>/dev/null | head -5`
  • YAML validity: !`fd "\.ya?ml$" . | head -5 | xargs -I {} sh -c 'yq eval . {} >/dev/null 2>&1 && echo "✓ {}" || echo "❌ {}"' 2>/dev/null | head -5`
  • Modern tools status: !`echo "fd: $(which fd >/dev/null && echo ✓ || echo ✗) | rg: $(which rg >/dev/null && echo ✓ || echo ✗) | jq: $(which jq >/dev/null && echo ✓ || echo ✗) | yq: $(which yq >/dev/null && echo ✓ || echo ✗)"`

Your Task

STEP 1: Initialize comprehensive validation session with intelligent project analysis

  • CREATE session state file: `/tmp/validate-session-$SESSION_ID.json`
  • ANALYZE project structure and technology stack from Context section
  • DETECT primary and secondary languages/frameworks
  • IDENTIFY existing validation configurations and tools
# Initialize validation session state
echo '{
  "sessionId": "'$SESSION_ID'",
  "targetProject": "'$ARGUMENTS'",
  "detectedTechnologies": [],
  "validationStrategy": "auto-detect",
  "validationResults": {},
  "criticalIssues": []
}' > /tmp/validate-session-$SESSION_ID.json

STEP 2: Technology stack detection and validation strategy selection

TRY:

**Multi-Language Project Detection:**

# Smart technology stack detection
detect_technologies() {
  echo "🔍 Detecting technology stack and validation requirements..."
  
  technologies=()
  
  # Deno/TypeScript Detection
  if [ -f "deno.json" ] || [ -f "deno.jsonc" ]; then
    technologies+=("deno")
    echo "🦕 Deno project detected"
  fi
  
  # Node.js Detection
  if [ -f "package.json" ] && [ ! -f "deno.json" ]; then
    technologies+=("nodejs")
    package_manager="npm"
    [ -f "pnpm-lock.yaml" ] && package_manager="pnpm"
    [ -f "yarn.lock" ] && package_manager="yarn"
    echo "⚡ Node.js project detected (${package_manager})"
  fi
  
  # Rust Detection
  if [ -f "Cargo.toml" ]; then
    technologies+=("rust")
    echo "🦀 Rust project detected"
  fi
  
  # Go Detection
  if [ -f "go.mod" ]; then
    technologies+=("go")
    echo "🐹 Go project detected"
  fi
  
  # Java Detection
  if [ -f "pom.xml" ] || [ -f "build.gradle" ] || [ -f "build.gradle.kts" ]; then
    technologies+=("java")
    build_tool="maven"
    [ -f "build.gradle" ] && build_tool="gradle"
    echo "☕ Java project detected (${build_tool})"
  fi
  
  # Docker Detection
  if [ -f "Dockerfile" ] || [ -f "docker-compose.yml" ] || [ -f "docker-compose.yaml" ]; then
    technologies+=("docker")
    echo "🐳 Docker configuration detected"
  fi
  
  # Kubernetes Detection
  if fd "\.ya?ml$" k8s/ kustomize/ manifests/ 2>/dev/null | head -1 >/dev/null; then
    technologies+=("kubernetes")
    echo "☸️ Kubernetes manifests detected"
  fi
  
  # Save detected technologies to session state
  jq --argjson techs "$(printf '%s\n' "${technologies[@]}" | jq -R . | jq -s .)" \
    '.detectedTechnologies = $techs' \
    /tmp/validate-session-$SESSION_ID.json > /tmp/validate-session-$SESSION_ID.tmp && \
  mv /tmp/validate-session-$SESSION_ID.tmp /tmp/validate-session-$SESSION_ID.json
}

detect_technologies

STEP 3: Parallel validation execution with sub-agent coordination

IF project_complexity == "multi-language" OR codebase_size > 1000_files:

LAUNCH parallel sub-agents for comprehensive validation across domains:

  • **Agent 1: Syntax & Type Validation**: Validate code syntax, type checking, and compilation
  • Focus: TypeScript/JavaScript type checking, Rust cargo check, Go build validation
  • Tools: deno check, cargo check, go build, tsc, language-specific validators
  • Output: Compilation errors, type errors, syntax issues with file locations
  • **Agent 2: Code Quality & Linting**: Analyze code quality, style, and best practices
  • Focus: ESLint, Prettier, clippy, golangci-lint, code formatting standards
  • Tools: Language-specific linters, formatters, and quality analyzers
  • Output: Style violations, code quality issues, formatting inconsistencies
  • **Agent 3: Security & Vulnerability Assessment**: Security validation and vulnerability scanning
  • Focus: Dependency vulnerabilities, secret scanning, security patterns
  • Tools: cargo audit, npm audit, security pattern detection
  • Output: Security vulnerabilities, exposed secrets, insecure patterns
  • **Agent 4: Infrastructure & Configuration**: Validate deployment and infrastructure configs
  • Focus: Docker, Kubernetes, CI/CD configurations, environment settings
  • Tools: hadolint, kubectl dry-run, docker build validation
  • Output: Infrastructure issues, configuration errors, deployment problems
  • **Agent 5: Testing & Coverage**: Validate test setup and coverage requirements
  • Focus: Test compilation, coverage thresholds, test configuration
  • Tools: Test runners, coverage tools, test framework validation
  • O
Read more
Ships withclaude-cmd

A lightweight (~46kB) and comprehensive CLI tool for managing Claude commands, configurations, and workflows.

Get the whole plugin