Analyzes nginx configuration files and provides prioritized optimization recommendations for performance, security, and best practices. Generates an optimized config with inline explanations and safe reload instructions.
Ships in nginx-toolkit. Installing the plugin adds it to Claude Code.
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
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
/nginx-toolkit:optimize-nginx [config-file]from nginx-toolkit
npx claudepluginhub armanzeroeight/fastagent-plugins --plugin nginx-toolkitOther plugins' commands for the same job