Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/trumb/claude-nginx-hardeningnpx agentmods add commands/trumb/claude-nginx-hardening/analyze-nginx-logsWrote 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.
[](https://agentmods.dev/commands/trumb/claude-nginx-hardening/analyze-nginx-logs)<a href="https://agentmods.dev/commands/trumb/claude-nginx-hardening/analyze-nginx-logs"><img src="https://agentmods.dev/badge/commands/trumb/claude-nginx-hardening/analyze-nginx-logs/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.
<a href="https://agentmods.dev/commands/trumb/claude-nginx-hardening/analyze-nginx-logs"><img src="https://agentmods.dev/badge/commands/trumb/claude-nginx-hardening/analyze-nginx-logs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00021 | $0.01339 |
| Opus 5 | $0.00010 | $0.00669 |
| Sonnet 5 | $0.00004 | $0.00268 |
| Haiku 4.5 | $0.00002 | $0.00134 |
Grade A, and why
analyze-nginx-logs 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 11d 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.
| `internal-only` | `go-http-client`, `python-requests`, `curl` UAs downgraded to **info** (common in microservice traffic); internal IP ranges excluded from scanner detection | How it starts
The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context
- Log files: !
ls -la /var/log/nginx/*.log 2>/dev/null | head -10 || echo "no logs found" - Rotated logs: !
ls /var/log/nginx/*.gz 2>/dev/null | wc -lcompressed log files found - Current learnings: !
wc -l < learnings/LEARNINGS.md 2>/dev/null || echo "0"lines - Profile: !
echo "${NH_PROFILE:-auto-detect}"
Operating Mode
DEFAULT: R0 + R1 (Recommendation Mode) Log analysis NEVER writes active config. Findings are staged for review.
Read @skills/nginx-hardening/EXECUTION-POLICY.md for full policy.
Your Task
Analyze nginx access logs to discover new attack patterns, scanner signatures, and threats.
Pipeline
This command orchestrates the full security pipeline:
Step 1: Detect Logs Auto-detect at standard locations or use user-specified paths:
- /var/log/nginx/access.log (and .1 through .14.gz)
- /var/log/nginx/*-access.log variants
- User-specified:
/analyze-nginx-logs /path/to/access.log
Report what was found before proceeding.
Step 2: Parse (Layer 1) Dispatch the log-parser agent:
- Read-only access to log files
- Hex-encodes all attacker-controlled fields
- Outputs structured JSON with aggregated counts
- Save raw parser output to
outputs/<run-id>/parsed-logs.json
Step 3: Sanitize (Layer 2) Run the deterministic sanitizer:
python3 scripts/sanitizer.py --input outputs/<run-id>/parsed-logs.json --output outputs/<run-id>/sanitized-findings.json --log-source <detected-path>
If sanitizer fails → stop analysis, report error (Failure Policy).
Step 4: Analyze (Layer 3) Dispatch config-auditor agent with:
- sanitized-findings.json
- Current nginx config (if available)
- Current learnings and exceptions
Agent produces findings and proposed rules.
Step 5: Present Findings Show the user:
- New attack patterns discovered (not already covered by existing rules)
- New scanner signatures detected
- Hit counts and severity assessments
- Proposed blocking rules for each finding
Step 6: Interactive Review For each finding, the user can:
- Accept — Stage the proposed rule for deployment
- Reject — Discard the finding
- Exception — Mark as intentionally allowed (creates exception file)
- Accept All — Batch accept remaining findings
- Reject All — Batch reject remaining findings
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.
- 11d ago First seen · 124 lines · 21 tokens per session scan A 5570f290b349
analyze-nginx-logs is a command published in the GitHub repository trumb/claude-nginx-hardening (3 stars, last pushed 5mo ago), licensed MIT. It adds 21 tokens to every session and 1,339 once invoked, about $0.0001 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-08-31.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.
implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md.