From nginx-toolkit
Analyzes nginx config files for performance, security, and best-practice issues, then produces a prioritized list of recommendations with exact config snippets and an optimized configuration file.
How this command is triggered — by the user, by Claude, or both
Slash command
/nginx-toolkit:optimize-nginx config-fileThis command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# Optimize Nginx Configuration ## Context - Current nginx version: !`nginx -v 2>&1` - Configuration test: !`nginx -t 2>&1` - Main config file: !`nginx -V 2>&1 | grep -o 'conf-path=[^ ]*' | cut -d= -f2` - Running processes: !`ps aux | grep nginx | grep -v grep` ## Your Task Analyze the nginx configuration and provide optimization recommendations for performance, security, and best practices. ### Arguments - `$1` (optional): Path to nginx configuration file to analyze (defaults to main config) ### Steps 1. **Read and analyze configuration** - If argument provided, read that file ...
nginx -v 2>&1nginx -t 2>&1nginx -V 2>&1 | grep -o 'conf-path=[^ ]*' | cut -d= -f2ps aux | grep nginx | grep -v grepAnalyze the nginx configuration and provide optimization recommendations for performance, security, and best practices.
$1 (optional): Path to nginx configuration file to analyze (defaults to main config)Read and analyze configuration
Check for common issues
Provide specific recommendations
Generate optimized configuration
Provide testing instructions
# Analyze main nginx configuration
/optimize-nginx
# Analyze specific configuration file
/optimize-nginx /etc/nginx/sites-available/example.com
# Analyze and apply optimizations
/optimize-nginx /etc/nginx/nginx.conf
Performance:
Security:
Best Practices:
Provide recommendations in this format:
## Nginx Configuration Analysis
### Current Configuration Summary
- Worker processes: [value]
- Worker connections: [value]
- SSL/TLS: [enabled/disabled]
- Gzip: [enabled/disabled]
### High Priority Recommendations
#### 1. [Issue Name]
**Current:** [current setting]
**Recommended:** [recommended setting]
**Impact:** [performance/security/both]
**Reason:** [explanation]
**Configuration:**
\`\`\`nginx
[exact configuration to add/modify]
\`\`\`
### Medium Priority Recommendations
[same format]
### Low Priority Recommendations
[same format]
### Optimized Configuration File
\`\`\`nginx
[complete optimized configuration]
\`\`\`
### Testing Instructions
1. Backup current configuration
2. Test new configuration
3. Reload nginx
4. Verify functionality
5. Monitor logs for errors
npx claudepluginhub p/armanzeroeight-nginx-toolkit-plugins-nginx-toolkit/nginx-config-generatorGenerates production-ready nginx.conf files with reverse proxy, SSL/TLS, load balancing, caching, rate limiting, and security headers.
/load-balanceGenerates load balancer configuration files tailored to your infrastructure. Supports Nginx, HAProxy, and cloud providers with best practices.
/performance-optimizationOrchestrates end-to-end performance optimization for an application or service, running profiling, analysis, and monitoring. Supports --focus and --depth flags.
/flow-performance-optimizationOrchestrates performance optimization workflow: establishes baselines, identifies bottlenecks, implements tunings, conducts load tests, and validates SLOs in project directories.
/sftpConfigures the VSCode SFTP extension for deploying static websites to a production server, optionally also setting up Nginx.
/htaccess-generatorGenerates Apache .htaccess configurations for URL rewriting, security headers, caching, redirects, and performance optimization.