cliproxy-manager
CLIProxyAPI Manager Skill
This skill grants the AI instance the ability to manage the CLIProxyAPI service remotely or locally. With this skill, the AI can automate configuration processes, modify model routing, and monitor service health.
⚠️ Prerequisites (MANDATORY)
Before executing any API operations, the AI must:
- Confirm Service Status: Check if the CLIProxyAPI process is running (default port
8317). - Obtain Management Key: A valid key must be provided for authentication.
- Check the
MANAGEMENT_PASSWORDenvironment variable. - Search for
remote-management.secret-keyinconfig.yaml. - If the key is hashed (bcrypt), the user must provide the plaintext key or use a temporary key set via the command line (
--password).
- Check the
- Verify Connectivity: Attempt to call
GET /v0/management/configfor an authentication test.
Key Workflows
1. Configuration Management
- View Current Config: Call
GET /configto understand current routing and model providers. - Update Model Aliases or API Keys: Use
PATCHon the corresponding endpoint (e.g.,/claude-api-keyor/openai-compatibility). - Synchronous Updates: All API changes are automatically written back to the disk file; no manual YAML editing is required.
2. Status & Statistics
- Usage Stats: Use
GET /usageto view quotas and request counts for different models or API keys. - Debug Monitoring: Use
GET /debugto retrieve backend connection status.
3. API Reference
| Endpoint | Method | Common Use Case |
|---|---|---|
/config |
GET |
Fetch the final global configuration |
/api-keys |
PUT/PATCH |
Manage CLIProxyAPI's own access keys |
/gemini-api-key |
PATCH |
Rotate or add Gemini keys |
/claude-api-key |
PATCH |
Rotate or add Claude keys |
/openai-compatibility |
PATCH |
Configure new OpenAI-compatible providers (e.g., DeepSeek, OpenRouter) |
/usage |
GET |
View real-time model usage reports |
Scripts
A helper Python script cliproxy_api.py is provided in the <SKILL_PATH>/scripts/ directory to encapsulate authentication logic:
# Example: Fetch all configurations
python <SKILL_PATH>/scripts/cliproxy_api.py --key YOUR_KEY get config
# Example: Update a specific API Key in the config
python <SKILL_PATH>/scripts/cliproxy_api.py --key YOUR_KEY patch api-keys --data '{"old":"k1", "new":"k2"}'
Rules & Best Practices
- Security First: Never log the full management key in any output or logs.
- Transactional Consistency: Always perform
GET /configto verify current state before applying updates. - Backup Recommendation: Before a full configuration overwrite (
PUT), it is recommended to back up the currentGET /configresult to/tmp/.
More from imhansiy/my-skills
localtunnel-auto-expose
Automatically exposes local services using LocalTunnel via npx and provides the public URL along with the access password. Use when starting a new service or when external web access is requested.
13odoo-dev-assistant
Odoo 开发与运维辅助技能。用于处理 Odoo 模块开发、配置排查、数据库操作、账号与权限修复、文档生成等任务。当前已内置重置 Odoo 登录用户 admin 密码、生成模块介绍页文档、识别当前运行数据库与 addons 路径、恢复 Odoo.sh 备份并配置 odoo.conf 等工作流,后续可继续扩展更多 Odoo 场景。
2plantuml-image-generator
Triggered when the user requests an image (e.g., architecture, flowchart, sequence diagram) or needs a technical illustration inserted into a document. This skill dynamically generates and inserts images using the official PlantUML public API.
1odoorpc-agent-skill
>-
1hexo-blog-manager
Handles the creation workflow for Hexo blog posts and the uploading of images/covers to GitHub_Oss using the jsDelivr CDN. Use exclusively for publishing or updating Hexo blog content with images.
1cliproxyapi-manager-skill
>-
1