# crabtrap-llm-proxy

Guides setup of CrabTrap forward proxy to intercept agent HTTP requests, evaluating outbound traffic against static rules and an LLM judge before reaching remote APIs.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 358 installs · ★ 88
- Author: reason-machines
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/crabtrap-llm-proxy/SKILL.md
- Updated: 2026-10-09
- HTML: https://affpapa.org/en/nevibecode/skills/crabtrap-llm-proxy

## What it does

CrabTrap runs as an outbound HTTP/HTTPS gateway on port 8080 between autonomous agents and outside web services. It first applies deterministic checks against target URLs using prefix, exact, or glob patterns. When no static rule matches, the request routes to a language model like gpt-4o for security evaluation. Blocked calls immediately return status 403.

Deployment requires Docker Compose with PostgreSQL 16 and CrabTrap images, along with an API key for OpenAI or Anthropic. Inspecting HTTPS traffic fails completely without the custom ca.crt authority file mounted or trusted by the client. An administrative control plane runs separately on port 8081 for user and rule management.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill crabtrap-llm-proxy -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/crabtrap-llm-proxy/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/crabtrap-llm-proxy/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill crabtrap-llm-proxy -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/crabtrap-llm-proxy/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill crabtrap-llm-proxy -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/crabtrap-llm-proxy/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install reason-machines/trending-skills crabtrap-llm-proxy
```

2. **Manually: put the files in place**
- File: `.github/skills/crabtrap-llm-proxy/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill crabtrap-llm-proxy -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/reason-machines/trending-skills --path skills/crabtrap-llm-proxy
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/crabtrap-llm-proxy/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill crabtrap-llm-proxy -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/crabtrap-llm-proxy/SKILL.md

## When to use it
- stop unauthorized SSRF requests to internal subnets
- filter outbound API calls using path prefixes and wildcards
- evaluate questionable request payloads with an LLM judge
- record audit traces and proxy decisions inside PostgreSQL

## Example prompts
- Set up CrabTrap with docker compose and show how to create an agent proxy token.
- Create a static rule in CrabTrap that blocks all DELETE calls to GitHub repositories.
- Configure CrabTrap to evaluate outbound requests with an LLM security policy.

## Similar
- [git-guardrails-claude-code](https://affpapa.org/en/nevibecode/skills/git-guardrails-claude-code.md) — skill · 499069 installs
- [ponytail-review](https://affpapa.org/en/nevibecode/skills/ponytail-review.md) — skill · 57000 installs
- [ponytail-audit](https://affpapa.org/en/nevibecode/skills/ponytail-audit.md) — skill · 45400 installs
- [security-audit](https://affpapa.org/en/nevibecode/skills/cloudflare-security-audit.md) — skill · 54800 installs
- [security-and-hardening](https://affpapa.org/en/nevibecode/skills/security-and-hardening.md) — skill · 70200 installs
- [supabase](https://affpapa.org/en/nevibecode/skills/supabase.md) — skill · 8 installs

From the same set: [reason-machines/trending-skills](https://affpapa.org/en/nevibecode/by/reason-machines/trending-skills.md) — 199 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
