configure-nginx

configure-nginx is a skill for Claude Code from pjt222/agent-almanac. It costs 95 tokens per session (1,949 once invoked), scanned A, original, MIT.

A guide to configuring Nginx, a web server that can also route requests to backend services. It covers static files, HTTPS certificates, load balancing, rate limits, and security headers.

In plain words
What is it for?
Use it to serve frontend files, send requests to Node.js, Python, Go, or R services, enable HTTPS with Let's Encrypt, balance traffic, and add rate limiting.
Why use it?
It helps put a website or backend service into production with consistent routing and basic connection security.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the agent-almanac plugin — 122 skills, 76 agents shipped together

Good fit Use it to serve frontend files, send requests to Node.js, Python, Go, or R services, enable HTTPS with Let's Encrypt, balance traffic, and add rate limiting.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pjt222/agent-almanac/configure-nginx
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pjt222/agent-almanac --skill configure-nginx
Clone the repo
git clone --depth 1 https://github.com/pjt222/agent-almanac

Made for: Claude Code.

Or install agent-almanac, the plugin that ships this one along with the rest of its 122 skills, 76 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for configure-nginx

README.md
[![agentmods](https://agentmods.dev/badge/skills/pjt222/agent-almanac/configure-nginx/github.svg)](https://agentmods.dev/skills/pjt222/agent-almanac/configure-nginx)
Your own site
<a href="https://agentmods.dev/skills/pjt222/agent-almanac/configure-nginx"><img src="https://agentmods.dev/badge/skills/pjt222/agent-almanac/configure-nginx/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for configure-nginx

Your own site · 80×15
<a href="https://agentmods.dev/skills/pjt222/agent-almanac/configure-nginx"><img src="https://agentmods.dev/badge/skills/pjt222/agent-almanac/configure-nginx.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,949 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00095 $0.01949
Opus 5 $0.00048 $0.00975
Sonnet 5 $0.00019 $0.00390
Haiku 4.5 $0.00010 $0.00195

Measured 7d ago against content hash 3b13a026b047, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

configure-nginx scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -I https://example.com
i18n/caveman-lite/skills/configure-nginx/SKILL.md · 291 lines

How it starts

The opening of the file, as written. The whole thing — 291 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Configure Nginx

Set up Nginx as a web server and reverse proxy with SSL termination and security hardening.

When to Use

  • Serving static files (HTML, CSS, JS) in production
  • Reverse proxying to backend services (Node.js, Python, Go, R/Shiny)
  • Terminating SSL/TLS with Let's Encrypt certificates
  • Load balancing across multiple backend instances
  • Adding rate limiting and security headers

Inputs

  • Required: Deployment target (Docker container or bare metal)
  • Required: Backend service(s) to proxy (host:port)
  • Optional: Domain name for SSL
  • Optional: Static file directory

Procedure

Step 1: Basic Reverse Proxy

nginx.conf:

events {
    worker_connections 1024;
}

http {
    upstream app {
        server app:3000;
    }

    server {
        listen 80;
        server_name example.com;

        location / {
            proxy_pass http://app;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
        }
    }
}

Docker Compose service:

services:
  nginx:
    image: nginx:1.27-alpine
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
    depends_on:
      - app

Got: Requests to port 80 are forwarded to the app service.

Step 2: Static File Serving

server {
    listen 80;
    root /usr/share/nginx/html;
    index index.html;

    location / {
        try_files $uri $uri/ /index.html;
    }

    location /assets/ {
        expires 1y;
        add_header Cache-Control "public, immutable";
    }

    location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff2?)$ {
        expires 6M;
        add_header Cache-Control "public";
    }
}

Step 3: SSL/TLS with Let's Encrypt

Using certbot with the webroot method:

server {
    listen 80;
    server_name example.com;

    location /.well-known/acme-challenge/ {
        root /var/www/certbot;
    }

    location / {
        return 301 https://$host$request_uri;
    }
}

server {
    listen 443 ssl;
    server_name example.com;

    ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;

    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_ciphers HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers on;

    location / {
        proxy_pass http://app;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Read the full file on GitHub · 291 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 291 lines · 95 tokens per session scan A 3b13a026b047

Subscribe to this mod's changes

configure-nginx is a skill published in the GitHub repository pjt222/agent-almanac (32 stars, last pushed today), licensed MIT. It adds 95 tokens to every session and 1,949 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.