据 AlphaMoat 统计,截至 2026-09,Nginx Config Creator 累计下载 3,130 次、获 0 个星标,在全部 5,078 个 AI 技能中排名第 3,637 位,在「运维安全」分类(264 个)中排名第 238 位。
| 平台 | 累计安装 | 累计下载 | 星标 | 评论 |
|---|---|---|---|---|
| ClawHub ↗ | 95 | 2,935 | - | - |
| SkillHub ↗ | 182 | 3,130 | - | — |
各平台的计数口径不同,统计时间不一致。
文档描述按服务名、域名和端口生成配置,测试配置后再重新加载 Web 服务器。该操作可能修改线上配置;应先在受控环境中审阅配置并备份现有文件。
资料发布于 2026-10-27
以下是根据技能文档生成的示例,不代表实际运行结果。
2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。
| 月份 | 累计下载 | 环比 | 星标 |
|---|---|---|---|
| 2026-09 | 3,130 | — | - |
| 2026-08 | 2,852 | +3.9% | - |
| 2026-07 | 2,744 | +9.0% | - |
| 2026-06 | 2,518 | +6.0% | - |
| 2026-05 | 2,376 | — | - |
| 2026-03 | 1,840 | — | - |
以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。
---
name: nginx-config-creator
description: "Creates a standard Nginx/OpenResty reverse proxy config file for a service and reloads the web server. Features safety checks and environment awareness. Takes service name, domain, and port as main arguments."
metadata:
openclaw:
requires:
bins: ["bash", "docker"]
---
# Nginx Config Creator (Enterprise Grade)
This skill automates the creation of Nginx/OpenResty reverse proxy configurations. It is designed for both ease of use and safety, incorporating environment awareness and a critical safety-check mechanism.
## Features
- **Environment Awareness**: Simplifies commands by reading configuration from environment variables.
- **Safety Check**: Includes a '熔断' (fuse) mechanism. It tests the configuration before applying it and automatically rolls back if the test fails, preventing web server downtime.
## Pre-requisites (Recommended)
For maximum convenience, it is recommended to set the following environment variables on the host system:
- `NGINX_CONFIG_PATH`: The absolute path to the Nginx `conf.d` directory.
- `NGINX_CONTAINER_NAME`: The name of the running Nginx/OpenResty Docker container.
If these are not set, they **must** be provided as command-line arguments.
## Core Action: `scripts/create-and-reload.sh`
This script performs the entire operation.
### **Inputs (Command-Line Arguments)**
- `--service-name`: (Required) The short name for the service (e.g., `grafana`).
- `--domain`: (Required) The root domain name (e.g., `example.com`).
- `--port`: (Required) The local port the service is running on (e.g., `3000`).
- `--config-path`: (Optional) The path to Nginx's `conf.d` directory. **Overrides** the `NGINX_CONFIG_PATH` environment variable.
- `--container-name`: (Optional) The name of the Nginx Docker container. **Overrides** the `NGINX_CONTAINER_NAME` environment variable.
### **Output**
- **On Success**: Prints a step-by-step log of its actions and a final success message.
- **On Failure**: Prints a descriptive error message to stderr and exits. If the failure occurs during the Nginx configuration test, the full error from `nginx -t` is displayed.
### **Execution Workflow**
1. **Parse Arguments & Environment**: The script gathers all necessary paths and names from command-line arguments and environment variables.
2. **Generate Config**: It creates the `.conf` file in the target directory.
3. **Test Config (Safety Check)**: It executes `nginx -t` inside the specified container.
4. **Decide & Act**:
- If the test passes, it proceeds to reload Nginx via `nginx -s reload`.
- If the test fails, it **automatically deletes the generated file (rolls back)** and reports the error.
5. **Report Result**: Informs the user of the final outcome.
### **Example Usage**
**Scenario 1: Environment variables are pre-set**
```bash
# Set for future convenience
export NGINX_CONFIG_PATH="/path/to/your/nginx/conf.d"
export NGINX_CONTAINER_NAME="your_nginx_container"
# Now, the command is very simple:
bash skills/nginx-config-creator/scripts/create-and-reload.sh \
--service-name "grafana" \
--domain "example.com" \
--port "3000"
```
**Scenario 2: No environment variables (providing all info via arguments)**
```bash
bash skills/nginx-config-creator/scripts/create-and-reload.sh \
--service-name "grafana" \
--domain "example.com" \
--port "3000" \
--config-path "/path/to/your/nginx/conf.d" \
--container-name "your_nginx_container"
```
### **Failure Strategy**
- **Missing Arguments**: The script will exit with an error if required arguments/environment variables are missing.
- **`nginx -t` Fails**: The skill is designed to be safe. It will **not** attempt to reload a broken configuration. It will clean up after itself and show you the exact error, ensuring the live web server is never affected.
在使用技能包之前做安全扫描,并按结论决定放行或拦截的技能。
管理OpenClaw的OpenRouter免费AI模型,自动按质量排名模型,配置速率限制备用方案,并更新opencla...
备份与恢复 OpenClaw 配置、凭据与工作区的技能。
配置并使用 1Password CLI 处理密钥。
一款被描述为可检测提示注入与危险命令的 OpenClaw 安全插件。
远程控制 tmux 会话,向交互式命令行发送按键并抓取输出。
以应用安全工程师视角做代码与架构的安全审计。
管理腾讯云对象存储与数据万象的技能。
数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。