nginx-expert — скилл для Claude Code: что делает и как установить
Помогает настроить Nginx, выставить reverse proxy, настроить кеширование и TLS. Скилл пригодится при подготовке веб-сервера к продакшену.
npx skills add personamanagmentlayer/pcl --skill nginx-expert -a claude-codeЧто делает nginx-expert
Скилл формирует конфигурационные файлы для Nginx и правит существующие параметры сайта. Он рассчитывает лимиты запросов через limit_req_zone, настраивает апстримы с балансировкой least_conn и включает HTTP/2 на 443 порту. Для защиты соединений прописываются протоколы TLS 1.2 и 1.3, заголовки HSTS и stapling сертификатов OCSP.
В работе агент опирается на инструменты редактирования файлов, а также выполняет вызовы Bash для утилит nginx:* и systemctl:*. Перед каждым перезапуском сервиса скилл требует запускать проверку синтаксиса через команду nginx -t. Если на сервере стоит версия Nginx ниже 1.24, отдельные директивы вызовут сбой при валидации.
Помимо базовых директив скилл помогает разделить кеширование: настраивает proxy cache для динамических ответов и браузерный кеш для статики. Конфигурация воркеров оптимизируется под ресурсы машины через worker_processes auto и пул на 1024 соединения.
Какие задачи решает
- Настроить reverse proxy с балансировкой нагрузки least_conn
- Включить HTTPS на базе TLS 1.2 и 1.3 с заголовками HSTS
- Задать ограничение частоты запросов директивой limit_req_zone
- Настроить кеширование статических файлов в браузере и proxy cache
Примеры запросов агенту
- Настрой reverse proxy в Nginx для двух бэкендов на порту 8080 с алгоритмом least_conn
- Добавь в конфиг Nginx лимит запросов 10r/s и проверь синтаксис через
nginx -t - Сконфигурируй SSL для домена с поддержкой HTTP/2, OCSP stapling и только версиями TLS 1.2 и 1.3
Как установить nginx-expert
1Через Skills CLI (Vercel)
npx skills add personamanagmentlayer/pcl --skill nginx-expert -a claude-code2Вручную: положить файлы
~/.claude/skills/nginx-expert/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/nginx-expert/
1Через Skills CLI (Vercel)
npx skills add personamanagmentlayer/pcl --skill nginx-expert -a codex2Вручную: положить файлы
.agents/skills/nginx-expert/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add personamanagmentlayer/pcl --skill nginx-expert -a cursor2Вручную: положить файлы
.cursor/skills/nginx-expert/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install personamanagmentlayer/pcl nginx-expert2Вручную: положить файлы
.github/skills/nginx-expert/SKILL.md1Через Skills CLI (Vercel)
npx skills add personamanagmentlayer/pcl --skill nginx-expert -a gemini-cli2Командой платформы
gemini skills install https://github.com/personamanagmentlayer/pcl --path stdlib/devops/nginx-expertВручную: положить файлы
.devin/skills/nginx-expert/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add personamanagmentlayer/pcl --skill nginx-expert -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о nginx-expert
Как установить nginx-expert в Claude Code?
Выполните команду npx skills add personamanagmentlayer/pcl --skill nginx-expert -a claude-code в терминале. Файл конфигурации появится по пути ~/.claude/skills/nginx-expert/SKILL.md.
Для чего нужен скилл nginx-expert?
Он автоматизирует составление конфигов Nginx для веб-сервера, реверс-прокси и балансировщика. Скилл также помогает настроить кеширование и параметры TLS.
Какая версия Nginx требуется для работы скилла?
Для корректного применения настроек требуется версия Nginx не ниже 1.24. Также агенту нужен доступ к командам nginx и systemctl через оболочку Bash.
Исходный текст
SKILL.md · Apache-2.0
---
name: nginx-expert
version: 1.1.0
description: >-
Expert-level Nginx configuration, reverse proxy, load balancing, SSL/TLS, caching, and
performance tuning. Use when the user mentions web server, reverse proxy, load balancer,
or SSL, or when the task involves Basic Configuration, SSL/TLS, Caching, or Performance
Optimization.
category: devops
author: PCL Team
license: Apache-2.0
tags:
- nginx
- web-server
- reverse-proxy
- load-balancer
- ssl
allowed-tools:
- Read
- Write
- Edit
- Bash(nginx:*, systemctl:*)
- Glob
- Grep
requirements:
nginx: '>=1.24'
---
# Nginx Expert
You are an expert in Nginx with deep knowledge of web server configuration, reverse proxy setups, load balancing, SSL/TLS termination, caching strategies, and performance optimization. You configure production-grade Nginx deployments that are fast, secure, and reliable.
## Best Practices
### 1. Use HTTP/2
```nginx
listen 443 ssl http2;
```
### 2. Enable Caching
```nginx
# Proxy cache for dynamic content
# Browser cache for static assets
```
### 3. Implement Rate Limiting
```nginx
limit_req_zone $binary_remote_addr zone=one:10m rate=10r/s;
```
### 4. Configure SSL Properly
```nginx
# Modern TLS only (1.2, 1.3)
# Strong ciphers
# HSTS header
# OCSP stapling
```
### 5. Optimize Worker Processes
```nginx
worker_processes auto;
worker_connections 1024;
```
### 6. Use Upstream for Load Balancing
```nginx
upstream backend {
least_conn;
server backend1:8080;
server backend2:8080;
}
```
### 7. Log Management
```nginx
# Rotate logs
# Use appropriate log levels
# Monitor error logs
```
### 8. Security Hardening
```nginx
# Hide version
# Security headers
# Rate limiting
# IP whitelisting where appropriate
```
## Approach
When configuring Nginx:
1. **Test Configuration**: Always run `nginx -t` before reloading
2. **Monitor Logs**: Check error logs for issues
3. **Optimize Performance**: Enable caching, compression, keep-alive
4. **Secure**: HTTPS, security headers, rate limiting
5. **High Availability**: Multiple upstream servers, health checks
6. **Use Best Practices**: HTTP/2, modern TLS, proper buffering
7. **Document**: Comment complex configurations
8. **Version Control**: Keep configs in git
Always configure Nginx for performance, security, and reliability following industry best practices.
## Reference Documentation
Detailed material lives alongside this skill and is read on demand:
- [Core Expertise](references/CORE_CONCEPTS.md) — Basic Configuration, Reverse Proxy, SSL/TLS, Caching, Performance Optimization, Security, SPA and Rewrites, Monitoring and Logging
© PCL Team · Apache-2.0 · personamanagmentlayer/pcl