xarchitecture
Design, analyze, and evolve system architecture using Domain-Driven Design, 12-Factor App, and proven patterns
Comprehensive risk assessment and mitigation across technical, security, and operational domains
How it fires
How this command gets triggered: by you, by Claude, or both.
/xriskContext preview
What this command does when you run it.
Comprehensive risk assessment and mitigation across technical, security, and operational domains
description: Comprehensive risk assessment and mitigation across technical, security, and operational domains tags: [risk, assessment, mitigation, security, operations, compliance, monitoring]
Identify, assess, and mitigate project risks based on the arguments provided in $ARGUMENTS.
First, examine the project environment for risk indicators: !find . -name "*.log" | head -5 2>/dev/null || echo "No log files found" !git log --grep="fix\|bug\|error" --oneline | head -10 2>/dev/null || echo "No error patterns in git history" !find . -name "requirements.txt" -o -name "package.json" -o -name "go.mod" | head -3
Based on $ARGUMENTS, perform the appropriate risk assessment operation:
If assessing risks (--assess, --identify): !find . -name "*.py" -o -name "*.js" -o -name "*.ts" | wc -l !grep -r "TODO\|FIXME\|HACK" . --include="*.py" --include="*.js" | wc -l 2>/dev/null || echo "0" !docker --version 2>/dev/null || echo "Docker not available"
Identify and assess project risks:
If analyzing technical risks (--technical): !find . -name "*.py" -exec grep -l "eval\|exec\|pickle" {} \; 2>/dev/null | head -5 !find . -name "package-lock.json" -o -name "requirements.txt" | head -2 !grep -r "password\|secret\|key" . --include="*.py" --include="*.js" | grep -v test | head -5 2>/dev/null
Analyze technical risk factors:
If assessing security risks (--security): !find . -name "*.py" -exec grep -l "subprocess\|os\.system\|shell=True" {} \; 2>/dev/null | head -5 !npm audit --audit-level high 2>/dev/null || python -m safety check 2>/dev/null || echo "No security scanners available" !find . -name ".env*" -o -name "*secret*" -o -name "*key*" | head -5
Evaluate security risk exposure:
If evaluating operational risks (--operational): !find . -name "Dockerfile" -o -name "docker-compose.yml" | head -3 !ls -la .github/workflows/ 2>/dev/null || echo "No CI/CD workflows found" !find . -name "*backup*" -o -name "*disaster*" | head -3 2>/dev/null
Assess operational risk factors:
If planning mitigation (--mitigate, --contingency): !find . -name "*test*" | wc -l !git log --since="30 days ago" --grep="fix\|patch" --oneline | wc -l 2>/dev/null || echo "0" !find . -name "*monitor*" -o -name "*alert*" | head -3
Develop risk mitigation strategies:
If monitoring risks (--monitor, --track): !ps aux | grep -E "(monitor|alert)" | head -3 !find . -name "*.log" -newer +7 2>/dev/null | head -5 !uptime
Monitor and track risk indicators:
Think step by step about risk management requirements and provide:
1. **Risk Identification and Assessment**:
2. **Risk Analysis and Prioritization**:
3. **Mitigation Strategy Development**:
4. **Risk Monitoring and Reporting**:
Generate comprehensive risk assessment with prioritized mitigation strategies, monitoring procedures, and stakeholder reporting.
If no specific operation is provided, perform comprehensive risk scan and provide prioritized risk assessment with immediate action recommendations.
Transform Claude Code into a complete development platform with 45 AI-powered commands that automate your entire software development workflow. Now with improved git identity management!
Design, analyze, and evolve system architecture using Domain-Driven Design, 12-Factor App, and proven patterns
Manage project configuration files, environment variables, and application settings
Continue an execution plan from where it left off across sessions
Interactive debugging support with error analysis and fix suggestions - integrates with Debug Specialist sub-agent for complex…