NapCat QQ Bridge Installer
Overview
Use this skill for Windows hosts that need a local QQ bot stack built around NTQQ, NapCat, and an OpenClaw agent running through WSL + Docker.
This skill is script-driven. Prefer the bundled Python entrypoint instead of rewriting the setup flow by hand:
The script can:
- - install NTQQ with
winget if QQ is missing - download the latest public NapCat release from GitHub at runtime
- overlay a local
bridge.mjs, start-all.bat, and INLINECODE4 - generate
config/bridge.json and INLINECODE6 - bootstrap a basic OpenClaw Docker container if requested
- start, stop, repair, health-check, and smoke-test the bridge
When To Use It
Use this skill when the user asks for any of the following:
- - install a QQ bot on Windows
- wire NapCat to OpenClaw
- download NTQQ / NapCat automatically
- repair a broken QQ bridge
- start or stop an existing NapCat + OpenClaw runtime
- verify whether QQ replies are still flowing
Do not use this skill for official QQ APIs or cloud-hosted bot platforms. This is for local unofficial automation with NapCat.
Host Prerequisites
Expect these host tools to exist or be installable on demand:
- - Windows with Python 3 available as INLINECODE7
- INLINECODE8 for installing INLINECODE9
- INLINECODE10
- Docker inside the selected WSL distro
Download sources used by the bundled script:
- - INLINECODE11
- INLINECODE12
Workflow
1. Pick the runtime root
Default runtime root:
If the user already has an extracted NapCat runtime, point -Root at that folder and prefer repair over install.
2. Run the bundled manager
Typical install:
CODEBLOCK0
Typical repair:
CODEBLOCK1
Start / stop / health / smoke test:
CODEBLOCK2
3. Handle OpenClaw auth when needed
If the OpenClaw container is new or unauthenticated, the user still needs one browser login step for openai-codex.
Use:
CODEBLOCK3
That action opens a terminal with the recommended onboarding command. Do not promise fully unattended OAuth login.
4. Validate the running bridge
After install or repair, always run:
- - INLINECODE18
- INLINECODE19
If the user already has a live QQ session, prefer a private-message self-test to the configured admin QQ.
Safety And Publishing Constraints
- - This skill is public. Never hardcode a real QQ number, group ID, token, container auth blob, or local secret into the published files.
- Generate local tokens at install time inside
config/bridge.json and config/onebot11_<qq>.json. - Generate
config/.env and config/webui.json values locally for NapCat quick-login fallback. Do not publish real runtime secrets. - Download NTQQ and NapCat from public runtime sources at execution time. Do not bundle vendor binaries into the skill.
- If the OpenClaw container already exists, repair it in place instead of deleting user data.
- Do not assume quick login can bypass every QQ verification challenge. QQ may still require a fresh verification step.
Bundled Resources
- -
scripts/manage.py: main entrypoint for install, auth, start, stop, repair, health, and smoke test - INLINECODE25 : generic Windows-host bridge that talks to NapCat and calls OpenClaw through INLINECODE26
- INLINECODE27 : rendered into the runtime root
- INLINECODE28 : rendered into the runtime root
NapCat QQ Bridge 安装器
概述
此技能适用于需要在 Windows 主机上构建基于 NTQQ、NapCat 以及通过 WSL + Docker 运行的 OpenClaw 代理的本地 QQ 机器人栈的场景。
此技能由脚本驱动。建议使用捆绑的 Python 入口点,而非手动重写设置流程:
该脚本可以:
- - 如果 QQ 缺失,使用 winget 安装 NTQQ
- 运行时从 GitHub 下载最新的公开 NapCat 版本
- 覆盖本地 bridge.mjs、start-all.bat 和 stop-all.bat 文件
- 生成 config/bridge.json 和 config/onebot11_.json 配置文件
- 按需引导基础 OpenClaw Docker 容器
- 启动、停止、修复、健康检查以及冒烟测试桥接器
使用时机
当用户提出以下任一需求时使用此技能:
- - 在 Windows 上安装 QQ 机器人
- 将 NapCat 连接到 OpenClaw
- 自动下载 NTQQ / NapCat
- 修复损坏的 QQ 桥接器
- 启动或停止现有的 NapCat + OpenClaw 运行环境
- 验证 QQ 回复是否仍在正常流转
请勿将此技能用于官方 QQ API 或云托管机器人平台。此技能仅适用于基于 NapCat 的本地非官方自动化场景。
主机前置条件
预期以下主机工具已存在或可按需安装:
- - 安装了 Python 3 且可通过 python 命令调用的 Windows 系统
- 用于安装 Tencent.QQ.NT 的 winget 工具
- wsl.exe
- 所选 WSL 发行版中的 Docker
捆绑脚本使用的下载源:
- - https://api.github.com/repos/NapNeko/NapCatQQ/releases/latest
- winget install --id Tencent.QQ.NT --exact
工作流程
1. 选择运行根目录
默认运行根目录:
- - C:\Users\\NapCat.OpenClaw
如果用户已有解压好的 NapCat 运行环境,请将 -Root 指向该文件夹,并优先使用 repair 而非 install。
2. 运行捆绑管理器
典型安装命令:
powershell
python .\scripts\manage.py
-Action install
-Root C:\Bots\NapCat.OpenClaw
-BotQq 123456789
-AdminQq 987654321
-GroupIds 123456,234567
-BootstrapOpenClaw
典型修复命令:
powershell
python .\scripts\manage.py
-Action repair
-Root C:\Bots\NapCat.OpenClaw
-BotQq 123456789
启动 / 停止 / 健康检查 / 冒烟测试:
powershell
python .\scripts\manage.py -Action start -Root C:\Bots\NapCat.OpenClaw
python .\scripts\manage.py -Action stop -Root C:\Bots\NapCat.OpenClaw
python .\scripts\manage.py -Action health -Root C:\Bots\NapCat.OpenClaw
python .\scripts\manage.py -Action smoke-test -Root C:\Bots\NapCat.OpenClaw
3. 必要时处理 OpenClaw 认证
如果 OpenClaw 容器是新建的或未通过认证,用户仍需通过浏览器完成一次 openai-codex 的登录步骤。
使用以下命令:
powershell
python .\scripts\manage.py -Action auth -Root C:\Bots\NapCat.OpenClaw
该操作会打开一个终端,显示推荐的引导命令。请勿承诺完全无人值守的 OAuth 登录。
4. 验证运行中的桥接器
安装或修复后,务必运行:
- - health(健康检查)
- smoke-test(冒泡测试)
如果用户已有活跃的 QQ 会话,建议优先向配置的管理员 QQ 发送私信进行自测。
安全与发布限制
- - 此技能是公开的。切勿在发布的文件中硬编码真实的 QQ 号码、群组 ID、令牌、容器认证信息或本地密钥。
- 在安装时,在 config/bridge.json 和 config/onebot11_.json 中生成本地令牌。
- 在本地生成 config/.env 和 config/webui.json 的值,用于 NapCat 快速登录回退。请勿发布真实的运行密钥。
- 在执行时从公开运行源下载 NTQQ 和 NapCat。请勿将供应商二进制文件捆绑到技能中。
- 如果 OpenClaw 容器已存在,请就地修复而非删除用户数据。
- 请勿假设快速登录可以绕过所有 QQ 验证挑战。QQ 仍可能要求进行新的验证步骤。
捆绑资源
- - scripts/manage.py:用于安装、认证、启动、停止、修复、健康检查和冒泡测试的主入口点
- assets/runtime/bridge.mjs:通用的 Windows 主机桥接器,通过 wsl docker exec ... openclaw agent 与 NapCat 通信并调用 OpenClaw
- assets/runtime/start-all.bat.txt:渲染到运行根目录
- assets/runtime/stop-all.bat.txt:渲染到运行根目录