[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ESMWTHVRQP5C574S7KH8Y5":3,"skill-same:01M6ESMWTHVRQP5C574S7KH8Y5":76},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":52,"ownerHtmlUrl":53,"ownerBlogUrl":6,"ownerDescription":54,"updatedAt":55,"install":56,"resources":69},"01M6ESMWTHVRQP5C574S7KH8Y5","production-readiness",null,"Comprehensive pre-deployment validation ensuring code is production-ready. Runs complete audit pipeline, performance benchmarks, security scan, documentation check, and generates deployment checklist.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdnyoussef\u002Fproduction-readiness\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"readiness","production readiness","Production","ready","tier-1","complete","performance benchmarks","essential","deployment checklist","scan","benchmarks","performance","check","pipeline","audit","security scan","validation","code","deployment","documentation","2026-11-10 10:12:30",false,"---\nname: production-readiness\ndescription: Comprehensive pre-deployment validation ensuring code is production-ready. Runs complete audit pipeline, performance benchmarks, security scan, documentation check, and generates deployment checklist.\ntags: [deployment, production, validation, essential, tier-1]\nversion: 1.0.0\n---\n\n# Production Readiness\n\n## Purpose\n\nComprehensive pre-deployment validation to ensure code is production-ready.\n\n## Specialist Agent\n\nI am a production readiness specialist ensuring deployment safety.\n\n**Methodology** (Deployment Gate Pattern):\n1. Complete quality audit (theater → functionality → style)\n2. Security deep-dive (vulnerabilities, secrets, unsafe patterns)\n3. Performance benchmarking (load testing, bottlenecks)\n4. Documentation validation (README, API docs, deployment docs)\n5. Dependency audit (outdated, vulnerable packages)\n6. Configuration check (environment variables, secrets management)\n7. Monitoring setup (logging, metrics, alerts)\n8. Rollback plan verification\n9. Generate deployment checklist\n10. Final go\u002Fno-go decision\n\n**Quality Gates** (all must pass):\n- ✅ All tests passing (100%)\n- ✅ Code quality ≥ 85\u002F100\n- ✅ Test coverage ≥ 80%\n- ✅ Zero critical security issues\n- ✅ Zero high-severity bugs\n- ✅ Performance within SLAs\n- ✅ Documentation complete\n- ✅ Rollback plan documented\n\n## Input Contract\n\n```yaml\ninput:\n  target_path: string (directory to validate, required)\n  environment: enum[staging, production] (default: production)\n  skip_performance: boolean (default: false)\n  strict_mode: boolean (default: true)\n```\n\n## Output Contract\n\n```yaml\noutput:\n  ready_for_deployment: boolean\n  quality_gates: object\n    tests_passing: boolean\n    code_quality: number\n    test_coverage: number\n    security_clean: boolean\n    performance_ok: boolean\n    docs_complete: boolean\n  blocking_issues: array[issue]\n  warnings: array[warning]\n  deployment_checklist: array[task]\n  rollback_plan: markdown\n```\n\n## Execution Flow\n\n```bash\n#!\u002Fbin\u002Fbash\nset -e\n\nTARGET_PATH=\"${1:-.\u002F}\"\nENVIRONMENT=\"${2:-production}\"\nSKIP_PERFORMANCE=\"${3:-false}\"\n\nREADINESS_DIR=\"production-readiness-$(date +%s)\"\nmkdir -p \"$READINESS_DIR\"\n\necho \"================================================================\"\necho \"Production Readiness Check\"\necho \"Environment: $ENVIRONMENT\"\necho \"================================================================\"\n\n# Initialize quality gates\ndeclare -A GATES\nGATES[tests]=0\nGATES[quality]=0\nGATES[coverage]=0\nGATES[security]=0\nGATES[performance]=0\nGATES[docs]=0\n\n# GATE 1: Complete Quality Audit\necho \"[1\u002F10] Running complete quality audit...\"\nnpx claude-flow audit-pipeline \"$TARGET_PATH\" \\\n  --phase all \\\n  --model codex-auto \\\n  --output \"$READINESS_DIR\u002Fquality-audit.json\"\n\n# Check tests\nTESTS_PASSED=$(cat \"$READINESS_DIR\u002Fquality-audit.json\" | jq '.functionality_audit.all_passed')\nif [ \"$TESTS_PASSED\" = \"true\" ]; then\n  GATES[tests]=1\n  echo \"✅ GATE 1: Tests passing\"\nelse\n  echo \"❌ GATE 1: Tests failing\"\nfi\n\n# Check code quality\nQUALITY_SCORE=$(cat \"$READINESS_DIR\u002Fquality-audit.json\" | jq '.style_audit.quality_score')\nif [ \"$QUALITY_SCORE\" -ge 85 ]; then\n  GATES[quality]=1\n  echo \"✅ GATE 2: Code quality $QUALITY_SCORE\u002F100\"\nelse\n  echo \"❌ GATE 2: Code quality too low: $QUALITY_SCORE\u002F100 (need ≥85)\"\nfi\n\n# Check test coverage\nTEST_COVERAGE=$(cat \"$READINESS_DIR\u002Fquality-audit.json\" | jq '.functionality_audit.coverage_percent')\nif [ \"$TEST_COVERAGE\" -ge 80 ]; then\n  GATES[coverage]=1\n  echo \"✅ GATE 3: Test coverage $TEST_COVERAGE%\"\nelse\n  echo \"❌ GATE 3: Test coverage too low: $TEST_COVERAGE% (need ≥80%)\"\nfi\n\n# GATE 2: Security Deep-Dive\necho \"[2\u002F10] Running security deep-dive...\"\nnpx claude-flow security-scan \"$TARGET_PATH\" \\\n  --deep true \\\n  --check-secrets true \\\n  --check-dependencies true \\\n  --output \"$READINESS_DIR\u002Fsecurity-scan.json\"\n\nCRITICAL_SECURITY=$(cat \"$READINESS_DIR\u002Fsecurity-scan.json\" | jq '.critical_issues')\nHIGH_SECURITY=$(cat \"$READINESS_DIR\u002Fsecurity-scan.json\" | jq '.high_issues')\n\nif [ \"$CRITICAL_SECURITY\" -eq 0 ] && [ \"$HIGH_SECURITY\" -eq 0 ]; then\n  GATES[security]=1\n  echo \"✅ GATE 4: Security scan clean\"\nelse\n  echo \"❌ GATE 4: Security issues found (Critical: $CRITICAL_SECURITY, High: $HIGH_SECURITY)\"\nfi\n\n# GATE 3: Performance Benchmarking\nif [ \"$SKIP_PERFORMANCE\" != \"true\" ]; then\n  echo \"[3\u002F10] Running performance benchmarks...\"\n\n  # Baseline performance\n  npx claude-flow analysis performance-report \\\n    --detailed true \\\n    --export \"$READINESS_DIR\u002Fperformance-baseline.json\"\n\n  # Bottleneck detection\n  npx claude-flow bottleneck detect \\\n    --threshold 10 \\\n    --export \"$READINESS_DIR\u002Fbottlenecks.json\"\n\n  # Check SLA compliance\n  AVG_RESPONSE_TIME=$(cat \"$READINESS_DIR\u002Fperformance-baseline.json\" | jq '.avg_response_time')\n  P95_RESPONSE_TIME=$(cat \"$READINESS_DIR\u002Fperformance-baseline.json\" | jq '.p95_response_time')\n\n  # SLAs: avg \u003C 200ms, p95 \u003C 500ms\n  if [ \"$AVG_RESPONSE_TIME\" -lt 200 ] && [ \"$P95_RESPONSE_TIME\" -lt 500 ]; then\n    GATES[performance]=1\n    echo \"✅ GATE 5: Performance within SLAs\"\n  else\n    echo \"❌ GATE 5: Performance exceeds SLAs (avg: ${AVG_RESPONSE_TIME}ms, p95: ${P95_RESPONSE_TIME}ms)\"\n  fi\nelse\n  echo \"[3\u002F10] Skipping performance benchmarks (--skip-performance)\"\n  GATES[performance]=1  # Pass if skipped\nfi\n\n# GATE 4: Documentation Validation\necho \"[4\u002F10] Validating documentation...\"\n\n# Check for required docs\nDOCS_COMPLETE=true\n\nif [ ! -f \"README.md\" ]; then\n  echo \"⚠️ Missing README.md\"\n  DOCS_COMPLETE=false\nfi\n\nif [ ! -f \"docs\u002Fdeployment.md\" ] && [ ! -f \"DEPLOYMENT.md\" ]; then\n  echo \"⚠️ Missing deployment documentation\"\n  DOCS_COMPLETE=false\nfi\n\nif [ \"$ENVIRONMENT\" = \"production\" ]; then\n  if [ ! -f \"docs\u002Frollback.md\" ] && [ ! -f \"ROLLBACK.md\" ]; then\n    echo \"⚠️ Missing rollback plan\"\n    DOCS_COMPLETE=false\n  fi\nfi\n\nif [ \"$DOCS_COMPLETE\" = \"true\" ]; then\n  GATES[docs]=1\n  echo \"✅ GATE 6: Documentation complete\"\nelse\n  echo \"❌ GATE 6: Documentation incomplete\"\nfi\n\n# GATE 5: Dependency Audit\necho \"[5\u002F10] Auditing dependencies...\"\nif command -v npm &> \u002Fdev\u002Fnull && [ -f \"package.json\" ]; then\n  npm audit --json > \"$READINESS_DIR\u002Fnpm-audit.json\" 2>&1 || true\n\n  VULNERABLE_DEPS=$(cat \"$READINESS_DIR\u002Fnpm-audit.json\" | jq '.metadata.vulnerabilities.high + .metadata.vulnerabilities.critical')\n  if [ \"$VULNERABLE_DEPS\" -gt 0 ]; then\n    echo \"⚠️ Found $VULNERABLE_DEPS vulnerable dependencies\"\n  else\n    echo \"✅ No vulnerable dependencies\"\n  fi\nfi\n\n# GATE 6: Configuration Check\necho \"[6\u002F10] Checking configuration...\"\n\n# Check for .env.example\nif [ ! -f \".env.example\" ] && [ -f \".env\" ]; then\n  echo \"⚠️ Missing .env.example file\"\nfi\n\n# Check for hardcoded secrets\necho \"Scanning for hardcoded secrets...\"\ngrep -r \"api_key\\|password\\|secret\\|token\" \"$TARGET_PATH\" --include=\"*.js\" --include=\"*.ts\" \\\n  | grep -v \"test\" | grep -v \"example\" || echo \"✅ No obvious hardcoded secrets\"\n\n# GATE 7: Monitoring Setup\necho \"[7\u002F10] Validating monitoring setup...\"\n\n# Check for logging\nif grep -r \"logger\\|console.log\\|winston\\|pino\" \"$TARGET_PATH\" --include=\"*.js\" --include=\"*.ts\" > \u002Fdev\u002Fnull; then\n  echo \"✅ Logging detected\"\nelse\n  echo \"⚠️ No logging framework detected\"\nfi\n\n# GATE 8: Error Handling\necho \"[8\u002F10] Checking error handling...\"\n\n# Check for try-catch blocks\nTRYCATCH_COUNT=$(grep -r \"try {\" \"$TARGET_PATH\" --include=\"*.js\" --include=\"*.ts\" | wc -l)\necho \"Found $TRYCATCH_COUNT try-catch blocks\"\n\n# GATE 9: Load Testing (if not skipped)\nif [ \"$SKIP_PERFORMANCE\" != \"true\" ] && [ \"$ENVIRONMENT\" = \"production\" ]; then\n  echo \"[9\u002F10] Running load tests...\"\n  # Placeholder for load testing\n  echo \"⚠️ Manual load testing required\"\nelse\n  echo \"[9\u002F10] Skipping load tests\"\nfi\n\n# GATE 10: Generate Deployment Checklist\necho \"[10\u002F10] Generating deployment checklist...\"\n\ncat > \"$READINESS_DIR\u002FDEPLOYMENT-CHECKLIST.md\" \u003C\u003CEOF\n# Deployment Checklist: $ENVIRONMENT\n\n**Generated**: $(date -Iseconds)\n\n## Quality Gates Status\n\n| Gate | Status | Score\u002FDetails |\n|------|--------|---------------|\n| Tests Passing | $([ ${GATES[tests]} -eq 1 ] && echo \"✅\" || echo \"❌\") | $([ \"$TESTS_PASSED\" = \"true\" ] && echo \"All tests passing\" || echo \"Tests failing\") |\n| Code Quality | $([ ${GATES[quality]} -eq 1 ] && echo \"✅\" || echo \"❌\") | $QUALITY_SCORE\u002F100 (need ≥85) |\n| Test Coverage | $([ ${GATES[coverage]} -eq 1 ] && echo \"✅\" || echo \"❌\") | $TEST_COVERAGE% (need ≥80%) |\n| Security | $([ ${GATES[security]} -eq 1 ] && echo \"✅\" || echo \"❌\") | Critical: $CRITICAL_SECURITY, High: $HIGH_SECURITY |\n| Performance | $([ ${GATES[performance]} -eq 1 ] && echo \"✅\" || echo \"❌\") | SLA compliance |\n| Documentation | $([ ${GATES[docs]} -eq 1 ] && echo \"✅\" || echo \"❌\") | All required docs present |\n\n## Pre-Deployment Checklist\n\n### Code Quality\n- [ ] All tests passing (100%)\n- [ ] Code quality ≥ 85\u002F100\n- [ ] Test coverage ≥ 80%\n- [ ] No linting errors\n- [ ] No TypeScript errors\n\n### Security\n- [ ] No critical or high-severity vulnerabilities\n- [ ] Dependencies up to date\n- [ ] Secrets in environment variables (not hardcoded)\n- [ ] Security headers configured\n- [ ] Authentication\u002Fauthorization tested\n\n### Performance\n- [ ] Response times within SLAs\n- [ ] No performance bottlenecks\n- [ ] Database queries optimized\n- [ ] Caching configured\n- [ ] Load tested\n\n### Documentation\n- [ ] README.md up to date\n- [ ] API documentation complete\n- [ ] Deployment guide available\n- [ ] Rollback plan documented\n- [ ] Environment variables documented\n\n### Monitoring & Observability\n- [ ] Logging configured\n- [ ] Error tracking setup\n- [ ] Metrics collection enabled\n- [ ] Alerts configured\n- [ ] Dashboard created\n\n### Infrastructure\n- [ ] Environment variables configured\n- [ ] Database migrations ready\n- [ ] Backup strategy verified\n- [ ] Scaling configuration reviewed\n- [ ] SSL certificates valid\n\n### Rollback Plan\n- [ ] Rollback procedure documented\n- [ ] Previous version backed up\n- [ ] Rollback tested\n- [ ] Rollback SLA defined\n\n## Deployment Steps\n\n1. **Pre-deployment**\n   - Create deployment branch\n   - Final code review\n   - Merge to main\u002Fmaster\n\n2. **Staging Deployment**\n   - Deploy to staging\n   - Run smoke tests\n   - Verify functionality\n\n3. **Production Deployment**\n   - Create database backup\n   - Deploy to production\n   - Run health checks\n   - Monitor for errors\n\n4. **Post-deployment**\n   - Verify functionality\n   - Monitor metrics\n   - Check error rates\n   - Document any issues\n\n## Rollback Procedure\n\nIf deployment fails:\n\n1. Stop deployment immediately\n2. Execute rollback: \\`.\u002Fscripts\u002Frollback.sh\\`\n3. Verify previous version restored\n4. Investigate root cause\n5. Fix issues before retry\n\n## Sign-off\n\n- [ ] **Development Lead**: Code review approved\n- [ ] **QA Lead**: Testing complete\n- [ ] **Security Team**: Security review approved\n- [ ] **DevOps**: Infrastructure ready\n- [ ] **Product Owner**: Features approved\n\n---\n\n? Generated by Claude Code Production Readiness Check\nEOF\n\n# Calculate overall readiness\nGATES_PASSED=$((${GATES[tests]} + ${GATES[quality]} + ${GATES[coverage]} + ${GATES[security]} + ${GATES[performance]} + ${GATES[docs]}))\nTOTAL_GATES=6\n\nREADY_FOR_DEPLOYMENT=\"false\"\nif [ \"$GATES_PASSED\" -eq \"$TOTAL_GATES\" ]; then\n  READY_FOR_DEPLOYMENT=\"true\"\nfi\n\n# Generate summary\necho \"\"\necho \"================================================================\"\necho \"Production Readiness Assessment\"\necho \"================================================================\"\necho \"\"\necho \"Environment: $ENVIRONMENT\"\necho \"Gates Passed: $GATES_PASSED\u002F$TOTAL_GATES\"\necho \"\"\necho \"Quality Gates:\"\necho \"  Tests: $([ ${GATES[tests]} -eq 1 ] && echo \"✅\" || echo \"❌\")\"\necho \"  Quality: $([ ${GATES[quality]} -eq 1 ] && echo \"✅\" || echo \"❌\") ($QUALITY_SCORE\u002F100)\"\necho \"  Coverage: $([ ${GATES[coverage]} -eq 1 ] && echo \"✅\" || echo \"❌\") ($TEST_COVERAGE%)\"\necho \"  Security: $([ ${GATES[security]} -eq 1 ] && echo \"✅\" || echo \"❌\") (Critical: $CRITICAL_SECURITY, High: $HIGH_SECURITY)\"\necho \"  Performance: $([ ${GATES[performance]} -eq 1 ] && echo \"✅\" || echo \"❌\")\"\necho \"  Documentation: $([ ${GATES[docs]} -eq 1 ] && echo \"✅\" || echo \"❌\")\"\necho \"\"\n\nif [ \"$READY_FOR_DEPLOYMENT\" = \"true\" ]; then\n  echo \"? READY FOR DEPLOYMENT!\"\n  echo \"\"\n  echo \"Next steps:\"\n  echo \"1. Review deployment checklist: $READINESS_DIR\u002FDEPLOYMENT-CHECKLIST.md\"\n  echo \"2. Get required sign-offs\"\n  echo \"3. Schedule deployment window\"\n  echo \"4. Execute deployment\"\nelse\n  echo \"? NOT READY FOR DEPLOYMENT\"\n  echo \"\"\n  echo \"Blocking issues must be resolved before deployment.\"\n  echo \"See detailed reports in: $READINESS_DIR\u002F\"\n  exit 1\nfi\n```\n\n## Integration Points\n\n### Cascades\n- Final stage in `\u002Ffeature-dev-complete` cascade\n- Part of `\u002Frelease-preparation` cascade\n- Used by `\u002Fdeploy-to-production` cascade\n\n### Commands\n- Uses: `\u002Faudit-pipeline`, `\u002Fsecurity-scan`, `\u002Fperformance-report`\n- Uses: `\u002Fbottleneck-detect`, `\u002Ftest-coverage`\n\n### Other Skills\n- Invokes: `quick-quality-check`, `code-review-assistant`\n- Output to: `deployment-automation`, `rollback-planner`\n\n## Usage Example\n\n```bash\n# Check production readiness\nproduction-readiness . production\n\n# Staging environment\nproduction-readiness .\u002Fdist staging\n\n# Skip performance tests\nproduction-readiness . production --skip-performance\n```\n\n## Failure Modes\n\n- **Tests failing**: Block deployment, fix tests\n- **Security issues**: Block deployment, fix vulnerabilities\n- **Poor quality**: Block deployment, improve code\n- **Missing docs**: Warning, but can proceed with approval\n- **Performance issues**: Warning for staging, blocking for production\n","# Production Readiness\n\n## Purpose\n\nComprehensive pre-deployment validation to ensure code is production-ready.\n\n## Specialist Agent\n\nI am a production readiness specialist ensuring deployment safety.\n\n**Methodology** (Deployment Gate Pattern):\n1. Complete quality audit (theater → functionality → style)\n2. Security deep-dive (vulnerabilities, secrets, unsafe patterns)\n3. Performance benchmarking (load testing, bottlenecks)\n4. Documentation validation (README, API docs, deployment docs)\n5. Dependency audit (outdated, vulnerable packages)\n6. Configuration check (environment variables, secrets management)\n7. Monitoring setup (logging, metrics, alerts)\n8. Rollback plan verification\n9. Generate deployment checklist\n10. Final go\u002Fno-go decision\n\n**Quality Gates** (all must pass):\n- ✅ All tests passing (100%)\n- ✅ Code quality ≥ 85\u002F100\n- ✅ Test coverage ≥ 80%\n- ✅ Zero critical security issues\n- ✅ Zero high-severity bugs\n- ✅ Performance within SLAs\n- ✅ Documentation complete\n- ✅ Rollback plan documented\n\n## Input Contract\n\n```yaml\ninput:\n  target_path: string (directory to validate, required)\n  environment: enum[staging, production] (default: production)\n  skip_performance: boolean (default: false)\n  strict_mode: boolean (default: true)\n```\n\n## Output Contract\n\n```yaml\noutput:\n  ready_for_deployment: boolean\n  quality_gates: object\n    tests_passing: boolean\n    code_quality: number\n    test_coverage: number\n    security_clean: boolean\n    performance_ok: boolean\n    docs_complete: boolean\n  blocking_issues: array[issue]\n  warnings: array[warning]\n  deployment_checklist: array[task]\n  rollback_plan: markdown\n```\n\n## Execution Flow\n\n```bash\n#!\u002Fbin\u002Fbash\nset -e\n\nTARGET_PATH=\"${1:-.\u002F}\"\nENVIRONMENT=\"${2:-production}\"\nSKIP_PERFORMANCE=\"${3:-false}\"\n\nREADINESS_DIR=\"production-readiness-$(date +%s)\"\nmkdir -p \"$READINESS_DIR\"\n\necho \"================================================================\"\necho \"Production Readiness Check\"\necho \"Environment: $ENVIRONMENT\"\necho \"================================================================\"\n\n# Initialize quality gates\ndeclare -A GATES\nGATES[tests]=0\nGATES[quality]=0\nGATES[coverage]=0\nGATES[security]=0\nGATES[performance]=0\nGATES[docs]=0\n\n# GATE 1: Complete Quality Audit\necho \"[1\u002F10] Running complete quality audit...\"\nnpx claude-flow audit-pipeline \"$TARGET_PATH\" \\\n  --phase all \\\n  --model codex-auto \\\n  --output \"$READINESS_DIR\u002Fquality-audit.json\"\n\n# Check tests\nTESTS_PASSED=$(cat \"$READINESS_DIR\u002Fquality-audit.json\" | jq '.functionality_audit.all_passed')\nif [ \"$TESTS_PASSED\" = \"true\" ]; then\n  GATES[tests]=1\n  echo \"✅ GATE 1: Tests passing\"\nelse\n  echo \"❌ GATE 1: Tests failing\"\nfi\n\n# Check code quality\nQUALITY_SCORE=$(cat \"$READINESS_DIR\u002Fquality-audit.json\" | jq '.style_audit.quality_score')\nif [ \"$QUALITY_SCORE\" -ge 85 ]; then\n  GATES[quality]=1\n  echo \"✅ GATE 2: Code quality $QUALITY_SCORE\u002F100\"\nelse\n  echo \"❌ GATE 2: Code quality too low: $QUALITY_SCORE\u002F100 (need ≥85)\"\nfi\n\n# Check test coverage\nTEST_COVERAGE=$(cat \"$READINESS_DIR\u002Fquality-audit.json\" | jq '.functionality_audit.coverage_percent')\nif [ \"$TEST_COVERAGE\" -ge 80 ]; then\n  GATES[coverage]=1\n  echo \"✅ GATE 3: Test coverage $TEST_COVERAGE%\"\nelse\n  echo \"❌ GATE 3: Test coverage too low: $TEST_COVERAGE% (need ≥80%)\"\nfi\n\n# GATE 2: Security Deep-Dive\necho \"[2\u002F10] Running security deep-dive...\"\nnpx claude-flow security-scan \"$TARGET_PATH\" \\\n  --deep true \\\n  --check-secrets true \\\n  --check-dependencies true \\\n  --output \"$READINESS_DIR\u002Fsecurity-scan.json\"\n\nCRITICAL_SECURITY=$(cat \"$READINESS_DIR\u002Fsecurity-scan.json\" | jq '.critical_issues')\nHIGH_SECURITY=$(cat \"$READINESS_DIR\u002Fsecurity-scan.json\" | jq '.high_issues')\n\nif [ \"$CRITICAL_SECURITY\" -eq 0 ] && [ \"$HIGH_SECURITY\" -eq 0 ]; then\n  GATES[security]=1\n  echo \"✅ GATE 4: Security scan clean\"\nelse\n  echo \"❌ GATE 4: Security issues found (Critical: $CRITICAL_SECURITY, High: $HIGH_SECURITY)\"\nfi\n\n# GATE 3: Performance Benchmarking\nif [ \"$SKIP_PERFORMANCE\" != \"true\" ]; then\n  echo \"[3\u002F10] Running performance benchmarks...\"\n\n  # Baseline performance\n  npx claude-flow analysis performance-report \\\n    --detailed true \\\n    --export \"$READINESS_DIR\u002Fperformance-baseline.json\"\n\n  # Bottleneck detection\n  npx claude-flow bottleneck detect \\\n    --threshold 10 \\\n    --export \"$READINESS_DIR\u002Fbottlenecks.json\"\n\n  # Check SLA compliance\n  AVG_RESPONSE_TIME=$(cat \"$READINESS_DIR\u002Fperformance-baseline.json\" | jq '.avg_response_time')\n  P95_RESPONSE_TIME=$(cat \"$READINESS_DIR\u002Fperformance-baseline.json\" | jq '.p95_response_time')\n\n  # SLAs: avg \u003C 200ms, p95 \u003C 500ms\n  if [ \"$AVG_RESPONSE_TIME\" -lt 200 ] && [ \"$P95_RESPONSE_TIME\" -lt 500 ]; then\n    GATES[performance]=1\n    echo \"✅ GATE 5: Performance within SLAs\"\n  else\n    echo \"❌ GATE 5: Performance exceeds SLAs (avg: ${AVG_RESPONSE_TIME}ms, p95: ${P95_RESPONSE_TIME}ms)\"\n  fi\nelse\n  echo \"[3\u002F10] Skipping performance benchmarks (--skip-performance)\"\n  GATES[performance]=1  # Pass if skipped\nfi\n\n# GATE 4: Documentation Validation\necho \"[4\u002F10] Validating documentation...\"\n\n# Check for required docs\nDOCS_COMPLETE=true\n\nif [ ! -f \"README.md\" ]; then\n  echo \"⚠️ Missing README.md\"\n  DOCS_COMPLETE=false\nfi\n\nif [ ! -f \"docs\u002Fdeployment.md\" ] && [ ! -f \"DEPLOYMENT.md\" ]; then\n  echo \"⚠️ Missing deployment documentation\"\n  DOCS_COMPLETE=false\nfi\n\nif [ \"$ENVIRONMENT\" = \"production\" ]; then\n  if [ ! -f \"docs\u002Frollback.md\" ] && [ ! -f \"ROLLBACK.md\" ]; then\n    echo \"⚠️ Missing rollback plan\"\n    DOCS_COMPLETE=false\n  fi\nfi\n\nif [ \"$DOCS_COMPLETE\" = \"true\" ]; then\n  GATES[docs]=1\n  echo \"✅ GATE 6: Documentation complete\"\nelse\n  echo \"❌ GATE 6: Documentation incomplete\"\nfi\n\n# GATE 5: Dependency Audit\necho \"[5\u002F10] Auditing dependencies...\"\nif command -v npm &> \u002Fdev\u002Fnull && [ -f \"package.json\" ]; then\n  npm audit --json > \"$READINESS_DIR\u002Fnpm-audit.json\" 2>&1 || true\n\n  VULNERABLE_DEPS=$(cat \"$READINESS_DIR\u002Fnpm-audit.json\" | jq '.metadata.vulnerabilities.high + .metadata.vulnerabilities.critical')\n  if [ \"$VULNERABLE_DEPS\" -gt 0 ]; then\n    echo \"⚠️ Found $VULNERABLE_DEPS vulnerable dependencies\"\n  else\n    echo \"✅ No vulnerable dependencies\"\n  fi\nfi\n\n# GATE 6: Configuration Check\necho \"[6\u002F10] Checking configuration...\"\n\n# Check for .env.example\nif [ ! -f \".env.example\" ] && [ -f \".env\" ]; then\n  echo \"⚠️ Missing .env.example file\"\nfi\n\n# Check for hardcoded secrets\necho \"Scanning for hardcoded secrets...\"\ngrep -r \"api_key\\|password\\|secret\\|token\" \"$TARGET_PATH\" --include=\"*.js\" --include=\"*.ts\" \\\n  | grep -v \"test\" | grep -v \"example\" || echo \"✅ No obvious hardcoded secrets\"\n\n# GATE 7: Monitoring Setup\necho \"[7\u002F10] Validating monitoring setup...\"\n\n# Check for logging\nif grep -r \"logger\\|console.log\\|winston\\|pino\" \"$TARGET_PATH\" --include=\"*.js\" --include=\"*.ts\" > \u002Fdev\u002Fnull; then\n  echo \"✅ Logging detected\"\nelse\n  echo \"⚠️ No logging framework detected\"\nfi\n\n# GATE 8: Error Handling\necho \"[8\u002F10] Checking error handling...\"\n\n# Check for try-catch blocks\nTRYCATCH_COUNT=$(grep -r \"try {\" \"$TARGET_PATH\" --include=\"*.js\" --include=\"*.ts\" | wc -l)\necho \"Found $TRYCATCH_COUNT try-catch blocks\"\n\n# GATE 9: Load Testing (if not skipped)\nif [ \"$SKIP_PERFORMANCE\" != \"true\" ] && [ \"$ENVIRONMENT\" = \"production\" ]; then\n  echo \"[9\u002F10] Running load tests...\"\n  # Placeholder for load testing\n  echo \"⚠️ Manual load testing required\"\nelse\n  echo \"[9\u002F10] Skipping load tests\"\nfi\n\n# GATE 10: Generate Deployment Checklist\necho \"[10\u002F10] Generating deployment checklist...\"\n\ncat > \"$READINESS_DIR\u002FDEPLOYMENT-CHECKLIST.md\" \u003C\u003CEOF\n# Deployment Checklist: $ENVIRONMENT\n\n**Generated**: $(date -Iseconds)\n\n## Quality Gates Status\n\n| Gate | Status | Score\u002FDetails |\n|------|--------|---------------|\n| Tests Passing | $([ ${GATES[tests]} -eq 1 ] && echo \"✅\" || echo \"❌\") | $([ \"$TESTS_PASSED\" = \"true\" ] && echo \"All tests passing\" || echo \"Tests failing\") |\n| Code Quality | $([ ${GATES[quality]} -eq 1 ] && echo \"✅\" || echo \"❌\") | $QUALITY_SCORE\u002F100 (need ≥85) |\n| Test Coverage | $([ ${GATES[coverage]} -eq 1 ] && echo \"✅\" || echo \"❌\") | $TEST_COVERAGE% (need ≥80%) |\n| Security | $([ ${GATES[security]} -eq 1 ] && echo \"✅\" || echo \"❌\") | Critical: $CRITICAL_SECURITY, High: $HIGH_SECURITY |\n| Performance | $([ ${GATES[performance]} -eq 1 ] && echo \"✅\" || echo \"❌\") | SLA compliance |\n| Documentation | $([ ${GATES[docs]} -eq 1 ] && echo \"✅\" || echo \"❌\") | All required docs present |\n\n## Pre-Deployment Checklist\n\n### Code Quality\n- [ ] All tests passing (100%)\n- [ ] Code quality ≥ 85\u002F100\n- [ ] Test coverage ≥ 80%\n- [ ] No linting errors\n- [ ] No TypeScript errors\n\n### Security\n- [ ] No critical or high-severity vulnerabilities\n- [ ] Dependencies up to date\n- [ ] Secrets in environment variables (not hardcoded)\n- [ ] Security headers configured\n- [ ] Authentication\u002Fauthorization tested\n\n### Performance\n- [ ] Response times within SLAs\n- [ ] No performance bottlenecks\n- [ ] Database queries optimized\n- [ ] Caching configured\n- [ ] Load tested\n\n### Documentation\n- [ ] README.md up to date\n- [ ] API documentation complete\n- [ ] Deployment guide available\n- [ ] Rollback plan documented\n- [ ] Environment variables documented\n\n### Monitoring & Observability\n- [ ] Logging configured\n- [ ] Error tracking setup\n- [ ] Metrics collection enabled\n- [ ] Alerts configured\n- [ ] Dashboard created\n\n### Infrastructure\n- [ ] Environment variables configured\n- [ ] Database migrations ready\n- [ ] Backup strategy verified\n- [ ] Scaling configuration reviewed\n- [ ] SSL certificates valid\n\n### Rollback Plan\n- [ ] Rollback procedure documented\n- [ ] Previous version backed up\n- [ ] Rollback tested\n- [ ] Rollback SLA defined\n\n## Deployment Steps\n\n1. **Pre-deployment**\n   - Create deployment branch\n   - Final code review\n   - Merge to main\u002Fmaster\n\n2. **Staging Deployment**\n   - Deploy to staging\n   - Run smoke tests\n   - Verify functionality\n\n3. **Production Deployment**\n   - Create database backup\n   - Deploy to production\n   - Run health checks\n   - Monitor for errors\n\n4. **Post-deployment**\n   - Verify functionality\n   - Monitor metrics\n   - Check error rates\n   - Document any issues\n\n## Rollback Procedure\n\nIf deployment fails:\n\n1. Stop deployment immediately\n2. Execute rollback: \\`.\u002Fscripts\u002Frollback.sh\\`\n3. Verify previous version restored\n4. Investigate root cause\n5. Fix issues before retry\n\n## Sign-off\n\n- [ ] **Development Lead**: Code review approved\n- [ ] **QA Lead**: Testing complete\n- [ ] **Security Team**: Security review approved\n- [ ] **DevOps**: Infrastructure ready\n- [ ] **Product Owner**: Features approved\n\n---\n\n? Generated by Claude Code Production Readiness Check\nEOF\n\n# Calculate overall readiness\nGATES_PASSED=$((${GATES[tests]} + ${GATES[quality]} + ${GATES[coverage]} + ${GATES[security]} + ${GATES[performance]} + ${GATES[docs]}))\nTOTAL_GATES=6\n\nREADY_FOR_DEPLOYMENT=\"false\"\nif [ \"$GATES_PASSED\" -eq \"$TOTAL_GATES\" ]; then\n  READY_FOR_DEPLOYMENT=\"true\"\nfi\n\n# Generate summary\necho \"\"\necho \"================================================================\"\necho \"Production Readiness Assessment\"\necho \"================================================================\"\necho \"\"\necho \"Environment: $ENVIRONMENT\"\necho \"Gates Passed: $GATES_PASSED\u002F$TOTAL_GATES\"\necho \"\"\necho \"Quality Gates:\"\necho \"  Tests: $([ ${GATES[tests]} -eq 1 ] && echo \"✅\" || echo \"❌\")\"\necho \"  Quality: $([ ${GATES[quality]} -eq 1 ] && echo \"✅\" || echo \"❌\") ($QUALITY_SCORE\u002F100)\"\necho \"  Coverage: $([ ${GATES[coverage]} -eq 1 ] && echo \"✅\" || echo \"❌\") ($TEST_COVERAGE%)\"\necho \"  Security: $([ ${GATES[security]} -eq 1 ] && echo \"✅\" || echo \"❌\") (Critical: $CRITICAL_SECURITY, High: $HIGH_SECURITY)\"\necho \"  Performance: $([ ${GATES[performance]} -eq 1 ] && echo \"✅\" || echo \"❌\")\"\necho \"  Documentation: $([ ${GATES[docs]} -eq 1 ] && echo \"✅\" || echo \"❌\")\"\necho \"\"\n\nif [ \"$READY_FOR_DEPLOYMENT\" = \"true\" ]; then\n  echo \"? READY FOR DEPLOYMENT!\"\n  echo \"\"\n  echo \"Next steps:\"\n  echo \"1. Review deployment checklist: $READINESS_DIR\u002FDEPLOYMENT-CHECKLIST.md\"\n  echo \"2. Get required sign-offs\"\n  echo \"3. Schedule deployment window\"\n  echo \"4. Execute deployment\"\nelse\n  echo \"? NOT READY FOR DEPLOYMENT\"\n  echo \"\"\n  echo \"Blocking issues must be resolved before deployment.\"\n  echo \"See detailed reports in: $READINESS_DIR\u002F\"\n  exit 1\nfi\n```\n\n## Integration Points\n\n### Cascades\n- Final stage in `\u002Ffeature-dev-complete` cascade\n- Part of `\u002Frelease-preparation` cascade\n- Used by `\u002Fdeploy-to-production` cascade\n\n### Commands\n- Uses: `\u002Faudit-pipeline`, `\u002Fsecurity-scan`, `\u002Fperformance-report`\n- Uses: `\u002Fbottleneck-detect`, `\u002Ftest-coverage`\n\n### Other Skills\n- Invokes: `quick-quality-check`, `code-review-assistant`\n- Output to: `deployment-automation`, `rollback-planner`\n\n## Usage Example\n\n```bash\n# Check production readiness\nproduction-readiness . production\n\n# Staging environment\nproduction-readiness .\u002Fdist staging\n\n# Skip performance tests\nproduction-readiness . production --skip-performance\n```\n\n## Failure Modes\n\n- **Tests failing**: Block deployment, fix tests\n- **Security issues**: Block deployment, fix vulnerabilities\n- **Poor quality**: Block deployment, improve code\n- **Missing docs**: Warning, but can proceed with approval\n- **Performance issues**: Warning for staging, blocking for production\n",{"name":5,"tags":44,"version":46,"description":7},[37,45,35,26,23],"production","1.0.0","main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fdnyoussef\u002Fproduction-readiness",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill production-readiness",{"tool":62,"command":63},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill production-readiness",{"tool":65,"command":66},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill production-readiness","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdnyoussef\u002Fproduction-readiness\u002FSKILL.md",true,[70],{"path":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"skill-report.json","REFERENCE","参考文档",9511,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdnyoussef\u002Fproduction-readiness\u002Fskill-report.json",[77,86,95,104,110,116],{"skillNo":78,"name":79,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":39},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[83,84,85],"model","model hierarchy","model hierarchy skill",{"skillNo":87,"name":88,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":39},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[92,93,94],"MCP","zoom","zoom mcp",{"skillNo":96,"name":97,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":39},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[101,102,103,93],"sdk","zoom apps sdk","apps",{"skillNo":105,"name":106,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":39},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[106],{"skillNo":111,"name":112,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":39},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[112],{"skillNo":117,"name":118,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":39},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[118]]