Pro Production Workspace
Boost productivity using this autonomously, deep, scan, entire. Includes structured workflows, validation checks, and reusable patterns for development.
Production Workspace Skill
A Claude Code skill for preparing and maintaining production-ready development workspaces — covering environment parity, configuration management, monitoring setup, and production readiness checklists.
When to Use This Skill
Choose this skill when:
- Preparing an application for production deployment
- Setting up staging environments that mirror production
- Creating production readiness checklists
- Configuring logging, monitoring, and alerting for production
- Implementing health checks and graceful shutdown
- Reviewing security and performance for production launch
Consider alternatives when:
- You need deployment automation (use a deployment skill)
- You need infrastructure provisioning (use a Terraform/IaC skill)
- You need CI/CD pipeline setup (use a GitHub Actions skill)
Quick Start
# Add to your Claude Code project claude mcp add production-workspace # Run production readiness check claude "check if this project is production-ready" # Set up production configuration claude "configure this app for production deployment"
// Production-ready server configuration const server = app.listen(PORT, () => { logger.info({ port: PORT, env: NODE_ENV }, 'Server started'); }); // Graceful shutdown const shutdown = async (signal: string) => { logger.info({ signal }, 'Shutdown signal received'); server.close(async () => { await db.disconnect(); await cache.quit(); logger.info('Server shut down gracefully'); process.exit(0); }); setTimeout(() => { process.exit(1); }, 10000); }; process.on('SIGTERM', () => shutdown('SIGTERM')); process.on('SIGINT', () => shutdown('SIGINT'));
Core Concepts
Production Readiness Checklist
| Category | Check | Status |
|---|---|---|
| Security | HTTPS enforced, CORS configured, secrets in env vars | Required |
| Error Handling | Global error handler, structured logging, error tracking | Required |
| Performance | Response compression, caching headers, connection pooling | Required |
| Monitoring | Health check endpoint, metrics, alerting | Required |
| Reliability | Graceful shutdown, retry logic, circuit breakers | Required |
| Data | Backups configured, migration strategy, seed data removed | Required |
| DevOps | CI/CD pipeline, rollback procedure, runbooks | Recommended |
| Documentation | API docs, deployment guide, architecture diagram | Recommended |
Health Check Endpoint
app.get('/health', async (req, res) => { const checks = { status: 'healthy', uptime: process.uptime(), timestamp: new Date().toISOString(), checks: { database: await checkDb(), cache: await checkRedis(), memory: { used: process.memoryUsage().heapUsed, total: process.memoryUsage().heapTotal, }, }, }; const isHealthy = checks.checks.database.ok && checks.checks.cache.ok; res.status(isHealthy ? 200 : 503).json(checks); });
Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
NODE_ENV | string | "production" | Environment identifier |
LOG_LEVEL | string | "info" | Logging level in production |
CORS_ORIGIN | string | — | Allowed CORS origins |
RATE_LIMIT | number | 100 | Requests per minute per IP |
HEALTH_CHECK_PATH | string | "/health" | Health check endpoint path |
SHUTDOWN_TIMEOUT | number | 10000 | Graceful shutdown timeout (ms) |
COMPRESSION | boolean | true | Enable response compression |
Best Practices
-
Never use
console.login production — use a structured logger (pino, winston) that outputs JSON, includes timestamps, and supports log levels for filtering. -
Implement health checks with dependency verification — the
/healthendpoint should check database, cache, and external service connectivity, not just return 200. -
Set
NODE_ENV=production— this enables Express optimizations, disables verbose error messages, and triggers production behavior in many libraries. -
Remove all test and seed data before launch — verify the database contains only production data and remove any test accounts, sample content, or development fixtures.
-
Document the rollback procedure — before deploying to production, ensure there's a tested, documented process for reverting to the previous version within minutes.
Common Issues
Application crashes silently in production — Missing global error handler or unhandled promise rejection. Add process.on('uncaughtException') and process.on('unhandledRejection') with logging.
Memory usage grows over time — Memory leak from event listeners, growing caches, or unreleased database connections. Monitor process.memoryUsage() and set up alerts when heap usage exceeds 80%.
Environment variables missing in production — Validate all required env vars at startup with a library like envalid. Fail fast with a clear error listing missing variables.
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Full-Stack Code Reviewer
Comprehensive code review skill that checks for security vulnerabilities, performance issues, accessibility, and best practices across frontend and backend code.
Test Suite Generator
Generates comprehensive test suites with unit tests, integration tests, and edge cases. Supports Jest, Vitest, Pytest, and Go testing.
Pro Architecture Workspace
Battle-tested skill for architectural, decision, making, framework. Includes structured workflows, validation checks, and reusable patterns for development.