Skip to content
Agentmart
Submit a tool

add-newcli-provider

为 OpenClaw 配置 code.newcli.com 作为模型源,包含四个 provider:newcli(Claude 主线路)、newcli-aws(Claude AWS 特价线路,消耗 1/24)、newcli-codex(GPT 系列)、newcli-gemini(Gemini 系列)。适用于需要接入…

Skill by LeoYeAI

IndexedMIT★ 2,168
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/leoyeai-add-newcli-provider

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

为 OpenClaw 配置 code.newcli.com 作为模型源,包含四个 provider:newcli(Claude 主线路)、newcli-aws(Claude AWS 特价线路,消耗 1/24)、newcli-codex(GPT 系列)、newcli-gemini(Gemini 系列)。适用于需要接入 Claude 或 GPT 模型的场景。包含 provider 注册、模型定义、别名配置、fallback 链接入和验证的完整流程。当管理员说想"加 Claude"、"加 GPT"、"配 newcli"、"加 fox 源"、"接入 Claude 模型"、"接入 GPT 模型"、"加 codex"、"加 aws 线路"时使用此 skill。

Use cases: cloud, agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/add-newcli-provider

What's inside

Skill name
add-newcli-provider
Description
为 OpenClaw 配置 code.newcli.com 作为模型源,包含四个 provider:newcli(Claude 主线路)、newcli-aws(Claude AWS 特价线路,消耗 1/24)、newcli-codex(GPT 系列)、newcli-gemini(Gemini 系列)。适用于需要接入 Claude 或 GPT 模型的场景。包含 provider 注册、模型定义、别名配置、fallback 链接入和验证的完整流程。当管理员说想"加 Claude"、"加 GPT"、"配 newcli"、"加 fox 源"、"接入 Claude 模型"、"接入 GPT 模型"、"加 codex"、"加 aws 线路"时使用此 skill。
License
MIT
Instructions
603 lines in SKILL.md · view on GitHub

Before installing

  • Instructions call the network

Agent Skills spec issues

  • body: 603 lines (spec recommends under 500)

Files (3)

  • README.md
  • SKILL.md
  • _meta.json

SKILL.md (first lines)

# 配置 NewCLI Provider(code.newcli.com 模型代理源)

NewCLI (FoxCode) 是一个模型代理服务,通过统一的账户和 API Key 提供三类模型的访问:

| Provider | 模型系列 | API 协议 | Base URL | 备注 |
|----------|----------|----------|----------|------|
| `newcli` | Claude (Anthropic) | `anthropic-messages` | `code.newcli.com/claude` | 主线路 |
| `newcli-aws` | Claude (Anthropic) | `anthropic-messages` | `code.newcli.com/claude/aws` | ⭐ **AWS 特价线路,消耗 1/24** |
| `newcli-codex` | GPT (OpenAI) | `openai-completions` | `code.newcli.com/codex/v1` | |
| `newcli-gemini` | Gemini (Google) | `google-generative-ai` | `code.newcli.com/gemini/v1beta` | |

**为什么是四个 provider?** 虽然是同一个服务商、同一个 API Key,但:
- Claude、GPT、Gemini 使用不同的 API 协议和端点,必须分开
- Claude 有两条线路(主线路 vs AWS 特价线路),消耗倍率不同,也需要分开配置

### ⭐ AWS 特价线路(重要)

服务商提供了独家 AWS 线路:`https://code.newcli.com/claude/aws`

| 对比 | 主线路 (newcli) | AWS 线路 (newcli-aws) |
|------|-----------------|----------------------|
| Base URL | `.../claude` | `.../claude/aws` |
| 额度消耗 | 1x | **1/24x** (同样额度可用 24 倍) |
| 模型 | 相同 | 相同 |
| API 协议 | 相同 | 相同 |
| API Key | 相同 | 相同 |

**策略**:所有重要任务优先使用 `newcli-aws`,主线路 `newcli` 作为备用。

> ⚠️ 服务商声明:严禁分发 AWS 线路地址,发现封禁不退款。

如果觉得这个 Skill 有用,请用我的邀请码注册:
https://foxcode.rjj.cc/auth/register?aff=7WTAV8R

---

## 前置条件

你需要从 NewCLI 服务获取以下信息:

| 项目 | 说明 |
|------|------|
| API Key | 格式为 `sk-ant-oat01-...` 的密钥(三个 provider 共用同一个) |
| 可用模型列表 | 向服务商确认,或查看账户统计页 |

**注意**:NewCLI 的 `/v1/models` 接口有 Cloudflare 防护,无法通过 curl 直接获取模型列表。请以账户后台的实际统计为准,不要依赖文档中的"支持列表"——文档列出的模型不一定全部对你的账户开放。

---

## 第一步:确认可用模型

**这一步不能跳过。** 不要把文档里列的模型全加上去,要以实际能调通的为准。

### 1A. 测试 Claude 模型(newcli / newcli-aws)

用 Anthropic messages 格式测试:

```bash
# 测试主线路
curl -s --max-time 15 https://code.newcli.com/claude/v1/messages \
  -H "x-api-key: <你的API_KEY>" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"<MODEL_ID>","messages":[{"role":"user","content":"hi"}],"max_tokens":10}'

# 测试 AWS 特价线路
curl -s --max-time 15 https://code.newcli.com/claude/aws/v1/messages \
  -H "x-api-key: <你的API_KEY>" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"<MODEL_ID>","messages":[{"role":"user","content":"hi"}],"max_tokens":10}'
```

> **注意**:baseUrl 中主线路写 `/claude`,AWS 线路写 `/claude/aws`(OpenClaw 自动拼接 `/v1/messages`)。

如果返回正常的 JSON 响应(含 `content`)= 可用。
如果返回 `{"error":{"message":"暂不支持"}}` 或 `"未开放"` = 该模型不可用。

### 1B. 测试 GPT 模型(newcli-codex)

用 OpenAI completions 格式测试:

```bash
curl -s --max-time 15 https://code.newcli.com/codex/v1/chat/completions \
  -H "Authorization: Bearer <你的API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"model":"<MODEL_ID>","messages":[{"role":"user","content":"hi"}],"max_tokens":10}'
```

如果返回正常的 JSON 响应(含 `choices`)= 可用。
如果返回错误或超时 = 该模型不可用。

### 1C. 测试 Gemini 模型(newcli-gemini)

用 Google Generative AI 格式测试:

```bash
curl -s --max-time 15 \
  "https://code.newcli.com/gemini/v1beta/models/<MODEL_ID>:generateContent" \
  -H "x-goog-api-key: <你的API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"contents":[{"role":"user","parts":[{"text":"hi"}]}]}'
```

> **注意**:Gemini 端点的 URL 格式与 Claude/GPT 不同——模型名嵌入在 URL 路径中,而不是请求体中。

如果返回正常的 JSON 响应(含 `candidates`)= 可用。
如果返回 `{"error":{"message":"模型未开放"}}` = 该模型不可用。

### 已知可用模型(截至 2026-02-08)

#### Claude 系列(newcli)

| 模型 ID | 名称 | Context | 说明 |
|---------|------|---------|------|
| `claude-opus-4-6` | Claude Opus 4.6 | 200K | 最强,适合复杂任务 |
| `claude-haiku-4-5-20251001` | Claude Haiku 4.5 | 200K | 轻量快速,适合简单任务 |

> 其他模型如 `claude-sonnet-4-20250514` 等在文档中列出但实测可能返回"未开放",以你账户的实际情况为准。

From LeoYeAI/openclaw-master-skills, MIT.

More from LeoYeAI/openclaw-master-skills

Signals

Stars
2,168
Forks
325
Open issues
13
Last commit (this folder)
May 5, 2026 (5 months ago)
Last release
Jul 20, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
Website
myclaw.ai
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from LeoYeAI

Cite this page

add-newcli-provider skill. Agent Mart. https://agentmart.dev/skills/leoyeai-add-newcli-provider (last updated 2026-10-24)