nginx-configuration — скилл для Claude Code: конфиг Nginx и установка
Скилл для настройки Nginx: реверс-прокси, балансировка, SSL/TLS, кэш и API-шлюз. Пригодится, когда нужно собрать рабочий конфиг без перечитывания документации.
npx skills add aj-geddes/useful-ai-prompts --skill nginx-configuration -a claude-codeЧто делает nginx-configuration
Скилл закрывает типовые задачи конфигурации Nginx: реверс-прокси перед бэкендом, балансировку между сервисами, терминацию SSL/TLS, HTTP/2 и gRPC, кэширование со сжатием, ограничение частоты запросов и защиту от DDoS, переписывание URL и маршрутизацию. Отдельно описаны паттерны API-шлюза.
Внутри — краткий стартовый пример nginx.conf с воркерами, логами и блоком http, а подробные реализации лежат в каталоге references/: production-конфигурация, HTTPS-сервер с балансировкой, скрипт настройки и мониторинг. Есть список практик: HTTP/2, сильные шифры, пул upstream-соединений, stub_status или prometheus, security-заголовки, least_conn. Чего избегать — тоже перечислено: слабые шифры, кэш аутентифицированных ответов, прямой доступ к бэкендам, смешивание HTTP и HTTPS без редиректа.
Скилл ставится в шесть платформ, но пути и команды у каждой свои, поэтому конфиг для одной не переносится в другую автоматически. Слабые шифры и кэш чувствительных данных из списка запретов — это ровно те места, где ошибка в конфиге бьёт по пользователям, так что проверяйте итоговый файл перед выкаткой.
Какие задачи решает
- поднять реверс-прокси перед бэкендом
- развести трафик между несколькими сервисами
- настроить терминацию SSL/TLS с сильными шифрами
- включить кэширование и сжатие ответов
- ограничить частоту запросов и отбить простой DDoS
Примеры запросов агенту
- Собери конфиг Nginx для реверс-прокси перед приложением на порту 3000
- Настрой балансировку между двумя бэкендами через
least_conn - Добавь терминацию SSL/TLS и редирект с HTTP на HTTPS
Как установить nginx-configuration
1Через Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill nginx-configuration -a claude-code2Вручную: положить файлы
~/.claude/skills/nginx-configuration/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/nginx-configuration/
1Через Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill nginx-configuration -a codex2Вручную: положить файлы
.agents/skills/nginx-configuration/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill nginx-configuration -a cursor2Вручную: положить файлы
.cursor/skills/nginx-configuration/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install aj-geddes/useful-ai-prompts nginx-configuration2Вручную: положить файлы
.github/skills/nginx-configuration/SKILL.md1Через Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill nginx-configuration -a gemini-cli2Командой платформы
gemini skills install https://github.com/aj-geddes/useful-ai-prompts --path skills/nginx-configurationВручную: положить файлы
.devin/skills/nginx-configuration/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill nginx-configuration -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о nginx-configuration
Как установить nginx-configuration в Claude Code?
Выполните npx skills add aj-geddes/useful-ai-prompts --skill nginx-configuration -a claude-code. Файл скилла окажется по пути ~/.claude/skills/nginx-configuration/SKILL.md.
Что делает nginx-configuration?
Помогает агенту писать конфигурацию Nginx: реверс-прокси, балансировку, SSL/TLS, кэш, лимиты запросов и API-шлюз. Внутри есть стартовый пример и справочные руководства в references/.
Для каких платформ подходит скилл?
Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI и OpenCode. Команда установки у каждой платформы своя, поэтому берите вариант для своей.
Исходный текст
SKILL.md · MIT
---
name: nginx-configuration
description: >
Configure Nginx web server for high-performance reverse proxy, load balancing,
SSL/TLS, caching, and API gateway functionality.
---
# Nginx Configuration
## Table of Contents
- [Overview](#overview)
- [When to Use](#when-to-use)
- [Quick Start](#quick-start)
- [Reference Guides](#reference-guides)
- [Best Practices](#best-practices)
## Overview
Master Nginx configuration for production-grade web servers, reverse proxies, load balancing, SSL termination, caching, and API gateway patterns with advanced performance tuning.
## When to Use
- Reverse proxy setup
- Load balancing between backend services
- SSL/TLS termination
- HTTP/2 and gRPC support
- Caching and compression
- Rate limiting and DDoS protection
- URL rewriting and routing
- API gateway functionality
## Quick Start
Minimal working example:
```nginx
# /etc/nginx/nginx.conf
user nginx;
worker_processes auto;
worker_rlimit_nofile 65535;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 4096;
use epoll;
multi_accept on;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Logging
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
log_format upstream_time '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" '
// ... (see reference guides for full implementation)
```
## Reference Guides
Detailed implementations in the `references/` directory:
| Guide | Contents |
|---|---|
| [Production Nginx Configuration](references/production-nginx-configuration.md) | Production Nginx Configuration |
| [HTTPS Server with Load Balancing](references/https-server-with-load-balancing.md) | HTTPS Server with Load Balancing |
| [Nginx Configuration Script](references/nginx-configuration-script.md) | Nginx Configuration Script |
| [Nginx Monitoring Configuration](references/nginx-monitoring-configuration.md) | Nginx Monitoring Configuration |
## Best Practices
### ✅ DO
- Use HTTP/2 for performance
- Enable SSL/TLS with strong ciphers
- Implement proper caching strategies
- Use upstream connection pooling
- Monitor with stub_status or prometheus
- Rate limit to prevent abuse
- Add security headers
- Use least_conn load balancing
- Keep error logs separate from access logs
### ❌ DON'T
- Disable gzip compression
- Use weak SSL ciphers
- Cache authenticated responses
- Allow direct access to backends
- Ignore upstream health checks
- Mix HTTP and HTTPS without redirect
- Use default error pages in production
- Cache sensitive user data
© aj-geddes · MIT · aj-geddes/useful-ai-prompts