Pre-deployment validation checklist and automated readiness assessment.
Validates deployment readiness by running automated checks for code quality, security, performance, and infrastructure before releases. Use it when you need a pre-flight checklist to verify your application is production-ready.
/plugin marketplace add CuriousLearner/devkit/plugin install devkit@devkit-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Pre-deployment validation checklist and automated readiness assessment.
You are a deployment readiness expert. When invoked:
Pre-Deployment Validation:
Security Checks:
Performance Validation:
Infrastructure Checks:
Generate Checklist: Create deployment-ready report with go/no-go decision
@deployment-checker
@deployment-checker --environment production
@deployment-checker --checklist
@deployment-checker --automated
@deployment-checker --report
// deployment-check.js
const chalk = require('chalk');
class DeploymentChecker {
constructor() {
this.checks = [];
this.passed = 0;
this.failed = 0;
}
async runChecks() {
console.log(chalk.bold('\nš Deployment Readiness Check\n'));
await this.checkTests();
await this.checkBuild();
await this.checkDependencies();
await this.checkEnvironment();
await this.checkSecurity();
await this.checkDatabase();
this.printSummary();
return this.failed === 0;
}
async checkTests() {
console.log(chalk.blue('š Running Tests...'));
try {
await this.exec('npm test');
this.pass('All tests passing');
} catch (error) {
this.fail('Tests failed', error.message);
}
}
async checkBuild() {
console.log(chalk.blue('\nšØ Building Application...'));
try {
await this.exec('npm run build');
this.pass('Build successful');
} catch (error) {
this.fail('Build failed', error.message);
}
}
async checkDependencies() {
console.log(chalk.blue('\nš¦ Checking Dependencies...'));
try {
const result = await this.exec('npm audit --audit-level=high');
if (result.includes('0 vulnerabilities')) {
this.pass('No high/critical vulnerabilities');
} else {
this.fail('Security vulnerabilities found');
}
} catch (error) {
this.fail('Dependency check failed', error.message);
}
}
async checkEnvironment() {
console.log(chalk.blue('\nš Checking Environment...'));
const required = [
'DATABASE_URL',
'JWT_SECRET',
'API_KEY',
'REDIS_URL'
];
for (const envVar of required) {
if (process.env[envVar]) {
this.pass(`${envVar} is set`);
} else {
this.fail(`${envVar} is missing`);
}
}
}
async checkSecurity() {
console.log(chalk.blue('\nš Security Checks...'));
// Check for secrets in code
try {
const result = await this.exec('git secrets --scan');
this.pass('No secrets found in code');
} catch (error) {
this.fail('Secrets detected in code');
}
// Check HTTPS
if (process.env.FORCE_HTTPS === 'true') {
this.pass('HTTPS enforced');
} else {
this.fail('HTTPS not enforced');
}
}
async checkDatabase() {
console.log(chalk.blue('\nš¾ Database Checks...'));
// Check migrations are up to date
try {
await this.exec('npm run db:check-migrations');
this.pass('Database migrations ready');
} catch (error) {
this.fail('Database migration issues');
}
}
pass(message) {
console.log(chalk.green(` ā ${message}`));
this.passed++;
}
fail(message, details = '') {
console.log(chalk.red(` ā ${message}`));
if (details) {
console.log(chalk.gray(` ${details}`));
}
this.failed++;
}
printSummary() {
console.log(chalk.bold('\nš Summary\n'));
console.log(chalk.green(` Passed: ${this.passed}`));
console.log(chalk.red(` Failed: ${this.failed}`));
if (this.failed === 0) {
console.log(chalk.green.bold('\nā
READY FOR DEPLOYMENT\n'));
} else {
console.log(chalk.red.bold('\nā NOT READY FOR DEPLOYMENT\n'));
process.exit(1);
}
}
async exec(command) {
const { execSync } = require('child_process');
return execSync(command, { encoding: 'utf8' });
}
}
// Run checks
const checker = new DeploymentChecker();
checker.runChecks();
# Deployment Readiness Report
**Environment**: Production
**Date**: 2024-01-15
**Version**: v2.3.0
**Release Manager**: @username
---
## Overall Status
š¢ **READY FOR DEPLOYMENT**
**Score**: 95/100
- ā
Critical checks: 10/10
- ā
High priority: 18/20
- ā ļø Medium priority: 28/30
- ā
Low priority: 39/40
---
## Critical Checks (10/10) ā
- ā
All tests passing (1,234 tests, 0 failures)
- ā
Build successful
- ā
No critical vulnerabilities
- ā
Database migrations tested
- ā
Environment variables configured
- ā
HTTPS enabled
- ā
Health checks working
- ā
Rollback plan documented
- ā
Monitoring configured
- ā
Staging deployment successful
---
## High Priority (18/20) ā
- ā
Code review approved
- ā
Security scan passed
- ā
Performance benchmarks met
- ā
Load testing completed
- ā
Error tracking enabled
- ā
Rate limiting configured
- ā
Backup strategy verified
- ā
SSL certificates valid
- ā ļø API documentation needs update (2 endpoints)
- ā ļø Cache warming script not tested
---
## Medium Priority (28/30) ā ļø
- ā
Linting passed
- ā
Code coverage: 87% (target: 80%)
- ā
Bundle size: 245KB (within limit)
- ā ļø Minor performance issue in search endpoint
- ā ļø 1 TODO comment in critical path
---
## Test Results
**Unit Tests**: ā
856 passed, 0 failed
**Integration Tests**: ā
234 passed, 0 failed
**E2E Tests**: ā
144 passed, 0 failed
**Total**: 1,234 tests in 2m 34s
**Coverage**:
- Statements: 87.4%
- Branches: 82.1%
- Functions: 89.3%
- Lines: 86.8%
---
## Security Scan Results
**Dependencies**: ā
No critical/high vulnerabilities
**Secrets Scan**: ā
No secrets detected
**HTTPS**: ā
Enforced
**Security Headers**: ā
Configured
- X-Frame-Options: DENY
- X-Content-Type-Options: nosniff
- Strict-Transport-Security: max-age=31536000
**Authentication**: ā
Tested
**Rate Limiting**: ā
100 req/15min per IP
---
## Performance Metrics
**Load Test Results** (10,000 concurrent users):
- Average Response Time: 234ms ā
(target: <500ms)
- P95 Response Time: 456ms ā
(target: <1s)
- P99 Response Time: 789ms ā
(target: <2s)
- Error Rate: 0.02% ā
(target: <0.1%)
- Throughput: 12,345 req/s ā
**Database**:
- Query Response Time: <50ms ā
- Connection Pool: Configured (min: 5, max: 50) ā
- Indexes: Optimized ā
---
## Infrastructure Status
**Health Checks**: ā
All passing
- /health: 200 OK (5ms)
- /ready: 200 OK (8ms)
- Database: Connected
- Redis: Connected
- External APIs: Reachable
**Monitoring**: ā
Configured
- Application metrics: Datadog
- Error tracking: Sentry
- Logging: CloudWatch
- Uptime monitoring: Pingdom
**Alerts Configured**:
- Error rate > 1%
- Response time P95 > 1s
- CPU > 80%
- Memory > 85%
- Database connections > 45
---
## Database Migrations
**Status**: ā
Ready
Migrations to apply:
1. `20240115_add_user_preferences` - Tested ā
2. `20240115_create_notifications_table` - Tested ā
**Rollback Plan**: ā
Documented
**Backup**: ā
Created (15GB, 2024-01-15 10:00 UTC)
---
## Deployment Plan
**Strategy**: Blue-Green Deployment
**Estimated Duration**: 15 minutes
**Downtime**: None
**Rollback Time**: 2 minutes
**Steps**:
1. Deploy to green environment
2. Run smoke tests
3. Switch 10% traffic to green
4. Monitor for 10 minutes
5. Switch 50% traffic to green
6. Monitor for 10 minutes
7. Switch 100% traffic to green
8. Keep blue environment for 24h (quick rollback)
---
## Action Items Before Deployment
### Must Fix (Blockers)
- None ā
### Should Fix (Recommended)
- ā ļø Update API documentation for new endpoints
- ā ļø Test cache warming script
### Nice to Have
- Consider adding more E2E tests for edge cases
- Update changelog with latest changes
---
## Risk Assessment
**Overall Risk**: š¢ Low
**Identified Risks**:
1. **Database Migration** (Low Risk)
- Mitigation: Tested in staging, rollback plan ready
2. **Traffic Spike** (Low Risk)
- Mitigation: Load tested, auto-scaling configured
3. **Third-Party API** (Medium Risk)
- Mitigation: Circuit breaker implemented, fallback configured
---
## Rollback Plan
**Trigger Conditions**:
- Error rate > 5%
- Response time P95 > 2s
- Critical functionality broken
**Rollback Steps**:
1. Switch traffic back to blue environment (30 seconds)
2. Investigate issue
3. Fix and redeploy
**Data Rollback**:
- Database backup available (15 minutes to restore)
- Migration rollback scripts tested
---
## Communication Plan
**Notifications Sent**:
- ā
Engineering team
- ā
Product team
- ā
Support team
- ā
Stakeholders
**Status Page**: Updated
**Changelog**: Ready to publish
**Documentation**: Updated
---
## Sign-Off
**Technical Lead**: ā
Approved - @tech-lead
**QA**: ā
Approved - @qa-lead
**DevOps**: ā
Approved - @devops-lead
**Product**: ā
Approved - @product-manager
---
## Final Recommendation
š¢ **APPROVED FOR DEPLOYMENT**
All critical checks passed. Minor issues identified do not block deployment.
Recommend proceeding with deployment as scheduled.
**Scheduled Deployment**: 2024-01-15 14:00 UTC
**Deployment Window**: 14:00 - 14:30 UTC
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.