Skip to content
Back to skills

Configure Proxy

BSecurity

Configure advanced options for claude-sub-proxy: model selection, system prompts, tool access, thinking tokens, logging, and network settings.

  • 17 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added June 2, 2026
devopsshellbashnodedockerapici/cd

Works with

  • claude code
  • cli
  • api

Security analysis

B88/100
  • criticalAccesses sensitive system or user directories

Pro shows the line behind each finding and how to fix it

Scanned June 2, 2026

npx -y skills add Ring8688/claude-sub-proxy --skill configure-proxy --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Configure Proxy?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Configure Proxy
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/ring8688-configure-proxy/badge)](https://www.skillsdirectory.com/skills/ring8688-configure-proxy)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Skill: configure-proxy

## Description

Configure advanced options for claude-sub-proxy: model selection, system prompts, tool access, thinking tokens, logging, and network settings.

## Trigger

Trigger this skill when the user wants to:
- Change the default model
- Set a custom system prompt
- Enable/disable Claude Code tools
- Configure thinking tokens
- Adjust log level, port, or host
- "Configure claude-sub-proxy"
- "Change proxy settings"

## Configuration Methods

Two ways to set configuration, with environment variables taking priority:

| Priority | Method | Best For |
|----------|--------|----------|
| 1 (highest) | Environment variables (`CSP_*`) | Docker, CI/CD, systemd |
| 2 | `src/config.txt` | Direct Node.js installs |

### Full Configuration Reference

| config.txt key | Environment Variable | Default | Description |
|---------------|---------------------|---------|-------------|
| `port` | `CSP_PORT` | `42069` | Server listening port |
| `host` | `CSP_HOST` | Auto (`127.0.0.1` / `0.0.0.0` in Docker) | Bind address |
| `log_level` | `CSP_LOG_LEVEL` | `INFO` | Log verbosity |
| `model_default` | `CSP_MODEL_DEFAULT` | `claude-sonnet-4-6` | Default model |
| `proxy_api_key` | `CSP_PROXY_API_KEY` | *(empty)* | Proxy authentication key |
| `system_prompt` | `CSP_SYSTEM_PROMPT` | *(empty — SDK default)* | Custom system prompt |
| `tools_enabled` | `CSP_TOOLS_ENABLED` | `false` | Enable Claude Code tools |
| `max_thinking_tokens` | `CSP_MAX_THINKING_TOKENS` | *(empty)* | Default thinking budget |

---

## Configuration Details

### Model Selection

```bash
# Via environment variable
CSP_MODEL_DEFAULT=claude-opus-4-6 npm start

# Via config.txt
model_default=claude-opus-4-6
```

Available models depend on your subscription plan:

| Model | Plan Required |
|-------|--------------|
| `claude-opus-4-6` | MAX |
| `claude-sonnet-4-6` | Pro / MAX |
| `claude-haiku-4-5-20251001` | Pro / MAX |

Clients can override the default by specifying `model` in the request body.

### Log Level

```bash
CSP_LOG_LEVEL=DEBUG npm start
```

| Level | Use Case |
|-------|----------|
| `ERROR` | Production — only errors |
| `WARN` | Embedded use — errors + warnings |
| `INFO` | Default — general operational info |
| `DEBUG` | Development — request details, SDK params |
| `TRACE` | Troubleshooting — verbose SDK output |

### System Prompt

Override the default Claude Code system prompt for all requests:

```bash
CSP_SYSTEM_PROMPT="You are a helpful coding assistant. Always respond in JSON format." npm start
```

Or in `config.txt`:

```
system_prompt=You are a helpful coding assistant. Always respond in JSON format.
```

Request-level `system` parameter takes priority over this config.

### Tools (Claude Code Built-in Tools)

**WARNING:** Enabling tools gives Claude access to file operations, shell commands, and other Claude Code capabilities. Only enable if you understand the implications.

```bash
CSP_TOOLS_ENABLED=true npm start
```

| Value | Behavior |
|-------|----------|
| `false` (default) | `tools: []` — pure text API, no tool access |
| `true` | SDK default tools — file read/write, bash, etc. |

### Thinking Tokens

Set a default thinking budget for extended thinking:

```bash
CSP_MAX_THINKING_TOKENS=10000 npm start
```

Request-level `thinking.budget_tokens` takes priority over this config.

### Port & Host

```bash
# Custom port
CSP_PORT=8080 npm start

# Bind to all interfaces (for network access)
CSP_HOST=0.0.0.0 CSP_PORT=8080 npm start
```

Default host behavior:
- **Direct Node.js**: `127.0.0.1` (localhost only)
- **Docker**: `0.0.0.0` (all interfaces, auto-detected)

### Proxy API Key

Require authentication for all `/v1/messages` requests:

```bash
CSP_PROXY_API_KEY=my-secret-key npm start
```

Clients must provide the key via `x-api-key` header or `Authorization: Bearer` header.

---

## Docker Example (All Options)

```bash
docker run -d \
  -p 8080:8080 \
  -v ~/.claude:/root/.claude:rw \
  -e CSP_PORT=8080 \
  -e CSP_LOG_LEVEL=DEBUG \
  -e CSP_MODEL_DEFAULT=claude-opus-4-6 \
  -e CSP_PROXY_API_KEY=my-secret-key \
  -e CSP_SYSTEM_PROMPT="You are a concise technical assistant." \
  -e CSP_MAX_THINKING_TOKENS=5000 \
  claude-sub-proxy
```

## config.txt Example (All Options)

```
port=8080
host=127.0.0.1
log_level=DEBUG
model_default=claude-opus-4-6
proxy_api_key=my-secret-key
system_prompt=You are a concise technical assistant.
tools_enabled=false
max_thinking_tokens=5000
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.