cliproxy-newapi-stack SKILL.md skillB

cliproxy-newapi-stack from majiayu000/spellbook is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add majiayu000/spellbook/cliproxy-newapi-stack@git:20260915.df199b2

Pins git:20260915.df199b2 in mdr.lock. Pin the fingerprint instead.

Audit grade
B, 16 of 17 checks passed
Kind
SKILL.md skill
Repository
majiayu000/spellbook
Path
skills/cliproxy-newapi-stack/SKILL.md
Versions recorded
4
Latest version
git:20260915.df199b2, committed Sep 15, 2026
First version recorded
Apr 27, 2026
Size
10,242 bytes
Repository stars
290
License
MIT

在已经过独立验证的 CLIProxyAPI upstream 之上部署 NewAPI 计费层,把 Codex/Claude/Gemini/Qwen 等订阅账号包装成可计费的 OpenAI 兼容 API。本 Skill 不负责新建裸 CLIProxyAPI;负责 NewAPI Docker 部署、容器到宿主桥接、模型计费倍率、参数化额度修正、多账号 OAuth 凭据热加载和双路径验证。当用户说“给现有 cliproxy 加 NewAPI”“配置 NewAPI 渠道接已运行的 cliproxy”“NewAPI 价格不对”“给现有部署加账号”“172.17.0.1 容器网络”或“408 冷却放大故障”时触发。.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# CLIProxyAPI + NewAPI Metering Stack

在用户已有并已验证的 **CLIProxyAPI** upstream 前增加 **NewAPI**
(`calciumion/new-api`) 计费、限流和多用户 token 层。本 Skill 不安装裸
CLIProxyAPI,也不调用其他部署 Skill 补齐这个前置条件。

所有"完成"结论必须基于**本会话**命令输出(W-16)。价格和额度变更后必须真发一次请求并查
`logs.quota` 与本次请求的 token 数和目标价格相符。

## Operating Contract

- Direct actions: 只读检查、配置备份和本地 dry-run 可直接执行。
- Escalate before: 安装容器、修改既有 upstream、重启服务、改防火墙或写生产额度前必须取得本次任务的明确授权。
- Evidence-backed pushback: 密钥只从环境变量或密码管理器读取;要求明文落盘或公网暴露原始端口时,展示具体风险并改用 tunnel/TLS。
- Feedback loop: 每次变更后重跑 upstream、NewAPI 和精确计费验证;任一步骤无法取得真实状态时停止并报告,不用默认值伪造成功。

---

## 0. 前置确认(必问)

- **SSH 目标**:`root@HOST` 是否能免密
- **端口分配**:`CLIPROXY_PORT`(默认 `8317`)、`NEWAPI_PORT`(默认 `8200`)
- **upstream 证据**:CLIProxyAPI 已在目标主机运行,当前会话能通过用户批准的
  SSH tunnel 或 loopback 请求验证健康、模型列表和认证;证据不足就停止,不猜测、
  不自动安装裸 upstream
- **登录账号供应商**:`codex` / `claude` / `qwen` / `iflow` / `gemini`
- **价格输入格式**:每个虚拟模型给我 input / cached / output 三个 USD per 1M 数字
- **客户端机器**:要在哪些机器上落 `BASE_URL` 环境变量

安全默认:本地 OAuth + scp 同步;NewAPI 仅绑定 VPS loopback,通过 SSH
tunnel 完成首次注册。公网访问必须走已配置 TLS 的反向代理,不能直接开放
NewAPI 原始 HTTP 端口。

---

## Phase 1 — 验证现有 CLIProxyAPI upstream

先记录现有服务的进程、监听地址、健康响应、模型列表和配置备份位置。任何一项
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add majiayu000/spellbook/cliproxy-newapi-stack@sha256:ea293c641fe0e9d1

The line at the top of this page pins the label git:20260915.df199b2, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_6xw4wt5a3fwaat4h.svg)](https://markdownregistry.com/a/art_6xw4wt5a3fwaat4h)

3 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 4 versions of this file, between Apr 27, 2026 and Sep 15, 2026, about one every 47 days.

versioncommittedcommitsizeaudit
git:20260915.df199b2 latest2026-09-15 df199b2 10,242 BB view · diff
git:20260716.995dd572026-07-16 995dd57 10,233 BB view · diff
git:20260605.a09e45c2026-06-05 a09e45c 8,417 BB view · diff
git:20260427.b4aba302026-04-27 b4aba30 8,327 BB view

Audit of the latest version

B  16 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • fail: No link to a raw IP address (matched: http://127.0.0.1:8200)
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (10242 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No script tag

Starting a new one? Use a template for SKILL.md on mdpantry, which passes every one of these checks and says what to change in it.

Source

GitHub

majiayu000/spellbook · 290 stars · license MIT · pushed 2026-11-04 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_6xw4wt5a3fwaat4h
GET https://markdownregistry.com/api/v1/resolve?ref=majiayu000/spellbook/cliproxy-newapi-stack
GET https://markdownregistry.com/api/v1/blob/ea293c641fe0e9d132b26b96b38acc7da6f3dfbbde1bf7385f663e634605f47e

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from majiayu000/spellbook

AGENTS.md AGENTS.md file
majiayu000/spellbook · AGENTS.md
git:20260630.1f0cf93 · audit A · 290 stars
idea-analogist SKILL.md skill
majiayu000/spellbook · plugins/idea-coach/skills/idea-analogist/SKILL.md · 想法群聊室 — 类比者角色。被 idea-team 主编排器调用,或用户单独说"类比一下"、"别的行业有没有"、"yes-and 扩展"、"X 让你想到什么"、"跨界启示"时触发。**专门做跨界类比 + yes-and…
git:20260820.304ca2f · audit A · 290 stars
idea-devils-advocate SKILL.md skill
majiayu000/spellbook · plugins/idea-coach/skills/idea-devils-advocate/SKILL.md · 想法群聊室 — 反方角色。被 idea-team 主编排器调用,或用户单独说"反方意见"、"挑这个想法的刺"、"为什么会失败"、"找漏洞 / 反例"、"devil's…
git:20260820.304ca2f · audit A · 290 stars
idea-research SKILL.md skill
majiayu000/spellbook · plugins/idea-coach/skills/idea-research/SKILL.md · 想法群聊室 — 调研员角色。被 idea-team 主编排器调用,或用户单独说"调研一下 X"、"X 的现状/竞品/数据"、"找 2026 数据"、"事实底"时触发。**用 WebSearch 拉真实 2026…
git:20260820.304ca2f · audit A · 290 stars
idea-team SKILL.md skill
majiayu000/spellbook · plugins/idea-coach/skills/idea-team/SKILL.md · 想法群聊室主持人 — 把一句话想法丢给多角色 AI 团队(调研员/反方/类比者)做查漏补缺。每个角色有自己的 voice,他们互相 @ 接话;你随时插话。**这是创意扩展工具,不打分、不否决、不堵路**。Use when…
git:20260820.304ca2f · audit A · 290 stars
idea-to-product SKILL.md skill
majiayu000/spellbook · plugins/idea-coach/skills/idea-to-product/SKILL.md · 端到端产品教练 — 把一句话想法走到 PRD + 可点击 HTML 原型。会顶嘴、强制砍功能、用 Nielsen + Norman 做友好性硬检。Use when user 说"我有一个想法"、"想做一个产品"、"做 MVP"、"写…
git:20260820.304ca2f · audit A · 290 stars
app-ui-design SKILL.md skill
majiayu000/spellbook · plugins/spellbook-ui/skills/app-ui-design/SKILL.md · Mobile app UI design expert for iOS and Android. Use when designing app interfaces, creating design systems, ensuring…
git:20260831.f1a2f17 · audit A · 290 stars
figma-to-react SKILL.md skill
majiayu000/spellbook · plugins/spellbook-ui/skills/figma-to-react/SKILL.md · Use when the user wants to extract Figma designs into production-ready React or Next.js components with TypeScript…
git:20260831.f1a2f17 · audit A · 290 stars
frontend-design SKILL.md skill
majiayu000/spellbook · plugins/spellbook-ui/skills/frontend-design/SKILL.md · Create distinctive, production-grade web frontend interfaces with high design quality. Use when the user explicitly…
git:20260831.f1a2f17 · audit A · 290 stars
ui-design-system SKILL.md skill
majiayu000/spellbook · plugins/spellbook-ui/skills/ui-design-system/SKILL.md · Use when creating or maintaining UI design systems, design tokens, component documentation, responsive calculations…
git:20260831.f1a2f17 · audit A · 290 stars
AGENTS.md@registry AGENTS.md file
majiayu000/spellbook · registry/AGENTS.md
git:20260623.1378532 · audit A · 290 stars
AGENTS.md@scripts AGENTS.md file
majiayu000/spellbook · scripts/AGENTS.md
git:20260623.1378532 · audit A · 290 stars

Every file in majiayu000/spellbook

Browse by kind, by grade B, or by owner.