install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/394286006/llm-proxy" ~/.claude/skills/clawdbot-skills-llm-proxy && rm -rf "$T"
manifest:
skills/394286006/llm-proxy/SKILL.mdsource content
LLM Proxy Skill
LLM API 代理服务,统一管理多个 LLM Provider,支持内容安全审计。
功能
- 多 Provider 统一代理(22+ 提供商)
- 内容安全审计(恶意指令检测、敏感内容过滤)
- 流式响应实时检测
- 健康状态监控
使用方法
启动代理
启动llm-proxy
停止代理
停止llm-proxy
查看状态
llm-proxy状态
重启代理
重启llm-proxy
手动操作
进入 skill 目录后执行:
启动
./scripts/llm-proxy-ctl.sh start
停止
./scripts/llm-proxy-ctl.sh stop
状态
./scripts/llm-proxy-ctl.sh status
重启
./scripts/llm-proxy-ctl.sh restart
配置说明
配置文件:
scripts/llm-proxy-config.json
基本配置
| 字段 | 默认值 | 说明 |
|---|---|---|
| | 监听地址 |
| | 代理端口 |
| | 读取超时(秒) |
| | 最大请求体(MB) |
| | 最大线程数 |
安全检测配置
| 配置项 | 说明 |
|---|---|
| 内容过滤规则文件 |
| 快速检测关键词列表 |
修改端口
编辑
llm-proxy-config.json 中的 proxy_port 字段,重启服务生效。
支持的 Provider
免费/免费额度
- 本地 Ollamaollama
- Google Geminigemini
- Groqgroq
- Workers AIcloudflare
- DeepSeekdeepseek
- 月之暗面moonshot
- 智谱zhipu
- SiliconFlowsiliconflow
付费
- OpenAIopenai
- Anthropicanthropic
- OpenRouteropenrouter
- NVIDIA NIMnvd
- 阿里百炼bailian
- 百度文心baidu
- 讯飞星火spark
- MiniMaxminimax
- 零一万物yi
- 百川baichuan
- Together AItogether
- Fireworks AIfireworks
- Replicatereplicate
健康检查
curl http://127.0.0.1:18888/health
响应示例:
{ "status": "ok", "uptime": 3600, "rules_loaded": { "layer1": 10, "layer2": 7, "whitelist": 6 }, "stats": { "total_requests": 100, "total_responses": 98, "blocked": 0, "errors": 2 } }
安全检测机制
三层审核
- L1 - 恶意指令检测:危险命令、提权操作、SQL注入、后门等
- L2 - 敏感内容检测:个人身份信息、凭证密钥、违法内容
- 快速关键词检测:流式响应实时检测风险关键词
流式响应检测
- 每 100 字符检测一次
- 发现风险关键词时注入警告提醒
- 严重违规时阻断响应
自定义关键词
编辑
llm-proxy-config.json 中的 quick_check_keywords 数组添加新关键词。
日志
日志目录:
~/.openclaw/logs/llm-proxy/
- 请求日志proxy-YYYY-MM-DD.jsonl
- 服务日志(手动启动时)ctl-service.log
注意事项
- 默认端口
18888 - 仅监听本地
127.0.0.1 - 无自动监控,需手动管理
- 修改配置后需重启服务