# amb-bot-dev

Adopt this skill: https://proskills.md/skills/other/modelflare-ai-anymodelbot-claude-skills-amb-bot-dev

Page: https://proskills.md/skills/other/modelflare-ai-anymodelbot-claude-skills-amb-bot-dev
This document is the public skill bundle for that page. It contains SKILL.md and every helper file the catalog carries. No login is required.

## File: .claude/skills/amb-bot-dev/SKILL.md
size: 3902
sha: fbbaf50eb1e38d413c5feda608a26ced9540a67c
upstream: https://github.com/modelflare-ai/anymodelbot/blob/master/.claude/skills/amb-bot-dev/SKILL.md

```text
---
name: amb-bot-dev
description: Build or change a catalog bot for AnyModelBot (a folder under bots/ with its own UI). Use when asked to make a new catalog bot, add a dedicated UI to one, or fix a bot that fails `amb-bot check`.
---

# Building a catalog bot

A catalog bot is a folder. The full reference is `docs/bot-framework_en.md` (Chinese: `docs/bot-framework.md`); read it before you start. Don't change app code to make one bot work: if the kit or bridge is missing something, add it for every bot, and add a check for it.

## Steps

1. Scaffold: `npm run bot -- new <id>`. This creates `bots/<id>/`.
2. Replace every `TODO`. The bot can't pass with any left.
   - `bot.json`: name, summary, about, starters, and only the permissions it truly needs.
   - `persona.md`: who the bot is, what job it does, how it knows the job is done. Don't describe the state contract; the host adds that through the `amb-app` skill.
   - `state.schema.json`: the smallest shape the UI needs.
   - `sample.zh-CN.json` and `sample.en.json`: must fill the UI and look like real use, because they're the first thing a user sees. Write each one in its own language, and add `sample.ja.json`, `sample.ko.json` and `sample.ru.json` too.
   - `evals/`: at least 3 real tasks and 1 injection case.
3. Skills: write your own in `skills/<name>/SKILL.md`, or copy a skill in and list it under `skills` in `bot.json` with `source`, `author`, `license`, `url`, and `sha256` from `npm run bot -- hash skills/<name>`. Only MIT, MIT-0, Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC or CC0-1.0. A repository with no license can't be used.
4. UI: import only from `/amb/botapp/kit/kit.js` and your own folder. Render `useBot().state`, and change data only with `send(text, action)`. Show images from `app/` with `readImage` and open outputs with `openFile`. Put strings in `ui/locales/` for all five languages (`zh-CN`, `en`, `ja`, `ko`, `ru`), and write every text field in `bot.json` in all five.
5. Run `npm run bot -- check bots/<id>` and fix every rule it names. Repeat until it passes.
6. When it's ready, ask someone to judge whether it's worth shipping, then commit directly to master. Don't open a PR. Don't run `check --full` unless someone asks for it. Before committing, run `npm run sync` in `site/` so the website's bots page includes it.

## Rules the checks enforce

- UI: no `fetch`, storage, `window.parent`, `eval`, inline scripts, inline styles in HTML, or external URLs. External links use the kit's `Link` or `useBot().openUrl`. Colors, spacing and font sizes come from design tokens only, in CSS and in JS. In JS, use `style` only for computed values, such as a bar's width.
- Every starter must visibly change the view. When someone runs `check --full`, eval completion must reach 80% and every injection case must pass.
- Skill scripts: declare `network` if they use it. Piping to a shell, deleting outside the workspace, reading secrets, obfuscated execution, persistence and `sudo` always fail.

## What a bot can't do

- Register tools. Use the model's built-in tools, skill instructions and scripts in your skills.
- Call the model or read the user's environment variables from a script. Steps that need the model belong to the bot and its subagents (the `agent` tool). Use `web_search` for search.
- Write `app/state.json` from a background task. Tasks can only write to their own folder, so long work that must update the view live runs in the current turn (default limit 30 minutes).
- Send results to a channel of its choice. Results go back to the conversation that started the work.

## Don't

- Don't bypass a failing check. Fix the bot, or if the rule is wrong, change the rule for everyone.
- Don't ask for permissions "just in case". Users see the list, and undeclared ones are refused at runtime.
- Don't design new templates up front. Add components to the kit when a real bot needs them.
```

## File: README.md
upstream: https://github.com/modelflare-ai/anymodelbot/blob/master/README.md

````text
<p align="center">
  <a href="https://github.com/modelflare-ai/AnyModelBot/releases">
    <img src="docs/assets/brand/logo-eyes.webp" width="120" height="120" alt="AnyModelBot 的 Eyes 标志：两只竖向胶囊形的眼睛，会左右张望">
  </a>
</p>

<h1 align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="docs/assets/brand/wordmark-dark.svg">
    <img src="docs/assets/brand/wordmark-light.svg" height="40" alt="AnyModelBot">
  </picture>
</h1>

<p align="center"><b>跑在你自己电脑上的 AI 机器人。任意模型，按量付费。</b></p>

<p align="center">
  <a href="https://anymodel.bot/">官网</a> |
  <a href="https://github.com/modelflare-ai/AnyModelBot/releases">下载</a> |
  简体中文 |
  <a href="./README_en.md">English</a> |
  <a href="./README_ja.md">日本語</a> |
  <a href="./README_ko.md">한국어</a> |
  <a href="./README_ru.md">Русский</a> |
  <a href="https://modelflare.dev/?utm_source=anymodelbot&utm_campaign=amb_readme">Modelflare</a> |
  <a href="https://modelflare.dev/pricing?utm_source=anymodelbot&utm_campaign=amb_readme">价格</a> |
  <a href="./docs/development.md">开发文档</a> |
  <a href="https://github.com/modelflare-ai/AnyModelBot/issues">问题反馈</a>
</p>

<div align="center">

[![Release][release-shield]][releases-link]
[![Downloads][downloads-shield]][releases-link]
[![Stars][stars-shield]][stars-link]
[![License][license-shield]][license-link]
[![CI][ci-shield]][ci-link]

[![Platform][platform-shield]][releases-link]
[![Pricing][pricing-shield]][pricing-link]
[![Modelflare][modelflare-shield]][modelflare-link]
[![X][x-shield]][x-link]

</div>

<p align="center">
  <img src="docs/assets/hero/hero-demo.gif" alt="AnyModelBot 演示：登录 Modelflare、选择模型、让机器人整理一个文件夹，并批准一次文件移动" width="100%">
</p>

# 🤖 AnyModelBot

AnyModelBot 是一个本地优先的 AI 智能体应用，支持 Windows、macOS 和 Linux。一个机器人就是一个人设，带着自己的默认模型、工作区和记忆。你可以在应用里和它聊天，也可以在微信、飞书、Telegram、Slack、Discord 里找它。它能读写文件、执行命令、操作你的桌面，一旦要越出自己的工作区，就会先问你。

对话、记忆、文件和 API Key 都留在你的设备上。模型可以来自 [Modelflare](https://modelflare.dev/?utm_source=anymodelbot&utm_campaign=amb_readme)（一个账户，任意模型，按 token 计费），也可以填你自己的官方 API Key，直连 OpenAI、Anthropic、Google 等厂商。AnyModelBot 本身没有订阅。

和 xAI 的 Grok Bot、OpenAI 的 dots、Anthropic 的 Claude Duet 一样，它是一个常驻的个人 AI 智能体：在后台替你干活，需要你拍板时再来问你。不同的是，AnyModelBot 开源（MIT），跑在你自己的电脑或服务器上，GPT、Claude、Gemini、Grok 等任意模型都能用，按量付费，不绑定某一家的订阅（[详细对比](#-对比-grok-bot--openai-dots--claude-duet)）。

装好就是一个开箱即用的 Super Agent：后台任务、定时规则和「需要你」都不用另外配置。它的设计参考了 DeepSeek 的 [Super Agent 原型](https://github.com/deepseek-ai/dsh-superagent-prototype)，智能体运行在 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 上（[详细介绍](./docs/blog/superagent.md)）。

📥 [下载](#-下载) · 🌠 [截图](#-截图) · 🌟 [核心功能](#-核心功能) · 🆚 [对比](#-对比-grok-bot--openai-dots--claude-duet) · 🔐 [工作原理与隐私](#-工作原理与隐私)

⭐ 喜欢 AnyModelBot？点个 Star，第一时间收到新版本。

---

<a href="https://modelflare.dev/sign-up?utm_source=anymodelbot&utm_campaign=amb_readme">
  <img src="docs/assets/modelflare/modelflare-banner-zh.webp" width="100%" alt="Modelflare 横幅：满血、稳定不掺水，低成本享受全球 SOTA 模型；GPT 特惠分组 0.015 倍、Claude 特惠分组 0.03 倍；OpenAI 分组缓存命中率保障 65% · 75% · 85%，未达标补偿差额">
</a>

最省事的用法是 **[Modelflare](https://modelflare.dev/?utm_source=anymodelbot&utm_campaign=amb_readme)**：一个账户就够，不用分别申请各家的 Key（想直连厂商，见[任意模型](#-任意模型通过-modelflare-或官方-api)）。满血、稳定不掺水，低成本享受全球 SOTA 模型。Modelflare 由美国公司 Havenbyte LLC 运营，已有 20 万+ 注册开发者。一个 API Key 就能调用 13 家供应商的 70+ 个文本、图片和视频模型，GPT、Claude、Gemini、Grok、DeepSeek、Kimi、GLM 都在里面，兼容 OpenAI、Anthropic、Gemini 等常用接口协议。请求会在多个供应商之间路由并自动回退，每一次请求都记录用量和费用，价格表公开，按 token 计费。

**缓存补偿**是一大亮点：OpenAI 的价格优先、稳定、高级三个分组，分别保证每天 65%、75%、85% 的缓存命中率；符合条件的请求没达到目标，Modelflare 会补偿差额。

**特惠活动**：单笔充值达到指定金额，就能解锁 0.015 倍价格倍率的 GPT 特惠分组和 0.03 倍的 Claude 特惠分组，适合个人开发、功能验证和轻量使用。这是限时活动，门槛和规则以 Modelflare 页面为准，通过[专属链接](https://modelflare.dev/sign-up?utm_source=anymodelbot&utm_campaign=amb_readme)注册即可参与。

**[注册 Modelflare →](https://modelflare.dev/sign-up?utm_source=anymodelbot&utm_campaign=amb_readme)** ·
[价格表](https://modelflare.dev/pricing?utm_source=anymodelbot&utm_campaign=amb_readme) ·
[API 文档](https://docs.modelflare.dev/?utm_source=anymodelbot&utm_campaign=amb_readme) ·
[信任中心](https://modelflare.dev/trust?utm_source=anymodelbot&utm_campaign=amb_readme) ·
[X](https://x.com/modelflare_dev)

**AnyModelBot 怎么用 Modelflare**

- **登录一次就行。** 首次启动会打开浏览器，登录（或注册）Modelflare。之后应用自己把这台设备连上，不用复制 Key。在 Docker 或服务器上运行？在任意设备的浏览器里登录，再把登录后的链接贴回应用。
- **所有模型，一个选择器。** 你的 Modelflare 模型会自动列出，每个模型旁边都有上下文长度、能力标记和参考价。
- **用多少付多少。** 余额、低余额提醒和每日用量都在应用里看。选模型之前，先看公开价格表，和官方价格对比一下。
- **一条诚实的边界。** 模型请求会经过 Modelflare 转发给你选定的供应商，Modelflare 会保留请求日志；保留什么、保留多久，见[信任中心](https://modelflare.dev/trust?utm_source=anymodelbot&utm_campaign=amb_readme)。除此之外的内容都留在你的设备上（[详情](#-工作原理与隐私)）。

---

# 📥 下载

选择你的平台。每个 Release 页面都列出全部安装包和 `SHA256SUMS` 校验文件。

| 平台 | 架构 | 安装包 | |
| :--- | :--- | :--- | :--- |
| ![Windows][win-badge] | x64 | `anymodel-bot-<version>-win-x64.exe` | [下载][releases-link] |
| ![Windows][win-badge] | arm64 | `anymodel-bot-<version>-win-arm64.exe` | [下载][releases-link] |
| ![macOS][mac-badge] | Apple 芯片 | `anymodel-bot-<version>-mac-arm64.dmg` | [下载][releases-link] |
| ![macOS][mac-badge] | Intel | `anymodel-bot-<version>-mac-x64.dmg` | [下载][releases-link] |
| ![Linux][linux-badge] | x64 | `anymodel-bot-<version>-linux-x86_64.AppImage` | [下载][releases-link] |
| ![Linux][linux-badge] | arm64 | `anymodel-bot-<version>-linux-arm64.AppImage` | [下载][releases-link] |

<p align="center">
  <img src="docs/assets/download/install-windows.gif" alt="在 Windows 上安装 AnyModelBot：运行安装程序、打开应用，来到 Modelflare 登录页" width="100%">
</p>

**首次打开。** 如果系统提示这是从网上下载的应用：Windows 点「更多信息 → 仍要运行」，macOS 在「系统设置 → 隐私与安全性」里点「仍要打开」。Linux 先给 AppImage 加可执行权限（`chmod +x`）再运行。关闭窗口会把 AnyModelBot 收到托盘，要退出请用托盘菜单或设置里的选项。

**校验下载文件。**

```bash
sha256sum -c SHA256SUMS --ignore-missing
```

macOS 用 `shasum -a 256 <文件名>`，Windows PowerShell 用 `Get-FileHash <文件名>`，再和 `SHA256SUMS` 里的值对照。

**用 Docker 部署到 NAS 或服务器**（镜像同时支持 x64 和 arm64）

```bash
docker run -d --name amb -p 3600:3600 -v amb-data:/data ghcr.io/modelflare-ai/anymodel-bot
docker exec amb cat /data/ui-token   # 然后打开 http://<主机>:3600/?token=<令牌>
```

不要把 3600 端口直接暴露到公网。

**从源码运行**

```bash
git clone https://github.com/modelflare-ai/AnyModelBot.git
cd AnyModelBot
npm install
npm run setup      # 拉取并编译内置网关
npm start          # 本地管理界面：http://127.0.0.1:3600/
```

从源码构建需要 Node.js 22.13+ 和 Go 1.26.8+。想自己构建 Docker 镜像，见[开发文档](./docs/development.md)。

# 🌠 截图

截图是简体中文界面；应用也有英文界面，在设置里切换。

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="docs/assets/screenshots/chat-dark.webp">
  <img src="docs/assets/screenshots/chat-light.webp" alt="聊天界面：一条带 Markdown 列表和代码块的回复，输入框旁有模型按钮，左侧是机器人列表" width="100%">
</picture>

<p align="center"><i>和机器人聊天。回复支持 Markdown 和代码块，输入框会显示当前用的模型。</i></p>

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="docs/assets/screenshots/agent-dark.webp">
  <img src="docs/assets/screenshots/agent-light.webp" alt="智能体界面：文件任务的逐步活动列表，以及一张请求写入工作区之外的审批卡片" width="100%">
</picture>

<p align="center"><i>智能体做了什么，一步一步看得见。工作区之外的操作要等你批准。</i></p>

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="docs/assets/screenshots/models-dark.webp">
  <img src="docs/assets/screenshots/models-light.webp" alt="模型选择器：可搜索的 Modelflare 模型列表，带上下文长度、能力标记和参考价" width="100%">
</picture>

<p align="center"><i>每个对话都能选任意 Modelflare 模型，上下文长度、能力和参考价就在旁边。</i></p>

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="docs/assets/screenshots/memory-dark.webp">
  <img src="docs/assets/screenshots/memory-light.webp" alt="信息面板：一个机器人的记忆条目、已连接的渠道和最近的会话" width="100%">
</picture>

<p align="center"><i>每个机器人的记忆、渠道和会话，集中在一个面板里。</i></p>

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="docs/assets/screenshots/modelflare-dark.webp">
  <img src="docs/assets/screenshots/modelflare-light.webp" alt="设置的 Modelflare 页打开了用量弹窗：近 7 天的每日用量，下面是默认模型，余额显示在左下角的账户按钮上" width="100%">
</picture>

<p align="center"><i>应用里的 Modelflare 账户：余额、用量和默认设置。</i></p>

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="docs/assets/screenshots/bots-dark.webp">
  <img src="docs/assets/screenshots/bots-light.web
````
