← 返回 Skills 市场
roger0808

Acpx Connection Troubleshooting

作者 Roger · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
114
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install acpx-connection-troubleshooting
功能描述
用于排查 acpx 桥接连接失败、超时或初始化卡住的问题。当用户提到 acpx 无法连接、ACP 桥接超时、gateway.token 缺失、Claude Code 认证失败、initialize 阶段卡住、或尝试将微信/飞书渠道切换到 ACP 后端时触发。涵盖配置验证、令牌文件修复、模型端点检查及网络连通性测试...
使用说明 (SKILL.md)

acpx 桥接连接问题排查与修复

本技能帮助诊断和修复 acpx 与 OpenClaw Gateway 或 Claude Code CLI 之间的连接问题,确保 ACP 桥接正常工作。

何时使用此技能

  • acpx 命令执行超时或卡在 initialize 阶段时
  • 当用户尝试将渠道(微信/飞书)路由切换到 ACP 后端但失败时
  • 当遇到 gateway.token 缺失或认证错误时
  • 当 Claude Code CLI 配置与预期模型(如百炼 vs Anthropic)不匹配时
  • 当需要验证 ACP 网关连通性或入口脚本路径时

步骤

1. 确认渠道支持性

检查目标渠道(如 wecom、feishu)是否在 ACP 支持列表中。

  • 操作:查阅 ACP 文档或当前绑定配置。
  • 原因:企业微信 (wecom) 可能不在默认支持列表(目前主要支持 Discord/Telegram),强行绑定会导致路由失败。

2. 验证 Claude Code CLI 配置

检查 ~/.claude/config.json 中的 API 端点和模型配置。

  • 操作:查看配置是否指向正确的 API(Anthropic 或 阿里云百炼)。
  • 原因:acpx 调用的是本地 CLI 配置,若 API Key 失效或端点错误,会卡在认证阶段。
// ~/.claude/config.json 示例
{
  "apiEndpoint": "https://coding.dashscope.aliyuncs.com/apps/anthropic",
  "apiKey": "sk-sp-[REDACTED]",
  "model": "qwen3.5-plus"
}

3. 检查 Gateway Token 文件

确认 ~/.openclaw/gateway.token 是否存在且内容正确。

  • 操作:若文件缺失,从 openclaw.json 中提取 token 并创建文件。
  • 原因:acpx 连接 OpenClaw Gateway 需要此令牌进行 WebSocket 认证,缺失会导致连接立即超时。
# 修复命令(替换为实际 token)
echo "5b56cfe28d8675390f3a39691e63999be50947e06dec1007" > ~/.openclaw/gateway.token

4. 分析 acpx 日志

运行命令时添加 verbose 模式或观察输出日志。

  • 操作:关注 [client] initialize 状态。
  • 原因:若卡在 initialize 说明网络或认证失败;若卡在 session/new 说明服务响应问题。

5. 测试替代方案

acpx claude 失败,尝试 acpx openclaw 或其他内置 agent。

  • 操作acpx openclaw exec 'status'
  • 原因:内置 agent 不依赖外部 CLI 配置,可隔离问题是出在桥接层还是模型层。

pitfalls and solutions

假设 wecom 渠道直接支持 ACP → 为什么失败:ACP 可能未适配企业微信协议,导致路由无法建立。 ✅ 正确做法:先确认渠道兼容性,或使用 echo agent 内部调用 acpx 作为替代方案。

忽略 gateway.token 文件存在性 → 为什么失败:acpx 默认从该文件读取认证令牌,不存在则无法握手 Gateway。 ✅ 正确做法:手动创建 ~/.openclaw/gateway.token 并写入 openclaw.json 中的 token 值。

混淆 Bailian 配置与 Anthropic 配置 → 为什么失败:Claude Code CLI 默认期望 Anthropic 端点,若配置为阿里云百炼需确保端点格式兼容。 ✅ 正确做法:验证 ~/.claude/config.json 中的 apiEndpoint 是否可访问,或改用 acpx openclaw 绕过 CLI 配置。

遇到超时就放弃排查 → 为什么失败:超时可能是网络路由问题,也可能是入口脚本路径错误。 ✅ 正确做法:检查 Gateway 日志是否有连接记录,确认 ACP 服务端口(默认 18789)是否开放。

关键代码与配置

ACP 绑定配置示例 (openclaw.json)

{
  "type": "acp",
  "agentId": "claude",
  "match": {
    "channel": "feishu-claude"
  },
  "acp": {
    "agent": "claude",
    "backend": "acpx",
    "mode": "persistent"
  }
}

飞书多机器人配置示例

{
  "channels": {
    "feishu-claude": {
      "enabled": true,
      "appId": "新机器人的 App ID",
      "appSecret": "新机器人的 App Secret",
      "domain": "feishu",
      "connectionMode": "websocket",
      "webhookPath": "/feishu-claude/events"
    }
  }
}

Gateway 认证修复

# 确保目录存在
mkdir -p ~/.openclaw
# 写入 token
echo "YOUR_GATEWAY_TOKEN" > ~/.openclaw/gateway.token
chmod 600 ~/.openclaw/gateway.token

环境与前置条件

  • acpx 版本: v0.3.0 或更高
  • OpenClaw Gateway: 运行中,端口默认 18789
  • Claude Code CLI: 已安装且可执行
  • 配置文件:
    • ~/.openclaw/openclaw.json (Gateway 配置)
    • ~/.claude/config.json (Claude Code 配置)
    • ~/.openclaw/gateway.token (认证令牌)
  • 网络: 需能访问 API 端点及 Gateway WebSocket 地址

companion files

  • scripts/check_gateway.sh — 检查 Gateway 端口及 token 文件状态的脚本
  • references/acp_channels.md — ACP 支持的渠道列表及绑定示例

任务记录

任务标题: 微信渠道切换 acpx 配置及桥接问题排查 关键发现:

  1. acpx claude 卡在初始化,原因是 Claude Code CLI 配置的百炼 API 连通性问题。
  2. acpx openclaw 超时,根本原因是 ~/.openclaw/gateway.token 文件缺失。
  3. 企业微信 (wecom) 渠道可能不在 ACP 默认支持列表中。 最终建议: 若桥接调试成本过高,建议保持现有 echo agent 配置,或通过 subagent 内部调用 Claude Code。

Companion files

  • references/acp-bridge-config-reference.md — reference documentation
安全使用建议
This skill appears to do what it claims (diagnose acpx <> Gateway and Claude CLI issues), but it will read and may overwrite sensitive local files (e.g., ~/.claude/config.json, ~/.openclaw/openclaw.json, and ~/.openclaw/gateway.token). Before using or installing: (1) verify you have acpx and Claude Code CLI installed (the SKILL.md assumes these but the metadata doesn't declare them); (2) back up openclaw.json and any token files before making changes; (3) never paste real tokens into untrusted interfaces — prefer extracting the token locally (e.g., grep/jq from openclaw.json) and manually confirm any token you write; (4) prefer running the suggested commands yourself rather than granting an automated agent blanket write access; (5) confirm the skill source/trustworthiness since the package metadata lists no homepage and the owner is unknown. If you cannot or do not want an automated agent to read/write local credentials, perform the troubleshooting steps manually instead.
功能分析
Type: OpenClaw Skill Name: acpx-connection-troubleshooting Version: 1.0.0 The skill bundle is a troubleshooting utility designed to diagnose and repair connection issues between the `acpx` bridge, OpenClaw Gateway, and Claude Code CLI. It provides instructions for an AI agent to verify and modify configuration files, specifically `~/.claude/config.json` and `~/.openclaw/gateway.token`, and to perform network connectivity tests. While the skill involves high-privilege actions such as reading/writing authentication tokens and executing shell commands (e.g., `mkdir`, `chmod`), these behaviors are strictly aligned with the stated purpose of resolving gateway authentication and routing failures. No evidence of data exfiltration, persistence mechanisms, or malicious prompt injection was identified.
能力标签
crypto
能力评估
Purpose & Capability
Name and description match the included SKILL.md and reference files: the guidance is focused on diagnosing acpx <-> OpenClaw Gateway and Claude Code CLI issues. However, the skill metadata declares no required binaries or env vars while the instructions assume the presence of acpx and Claude Code CLI and access to local config files (~/.claude/config.json, ~/.openclaw/openclaw.json). This is a minor inconsistency (missing declared runtime dependencies) but explainable for an instruction-only skill.
Instruction Scope
The SKILL.md explicitly instructs reading and writing local config and credential files (e.g., inspect ~/.claude/config.json and create ~/.openclaw/gateway.token), running acpx and acpx openclaw commands, and checking network endpoints. All of these actions are directly relevant to the troubleshooting purpose. Warning: the skill tells operators how to create/overwrite an authentication token file, which is sensitive behavior — it's necessary for the stated task but should be done carefully and with user consent.
Install Mechanism
Instruction-only skill with no install spec and no code files; this minimizes installation risk because nothing is downloaded or written at install time.
Credentials
The skill declares no required environment variables but will access local credential/config files that contain secrets (API keys, gateway.token). Accessing those files is proportionate to the troubleshooting goal, but the omission of these accesses in the declared requirements reduces transparency and increases the need for caution.
Persistence & Privilege
The skill is not always-enabled and does not request global privileges. It does instruct creating/updating a local auth file (~/.openclaw/gateway.token), which is within the scope of fixing Gateway auth but is a privileged local write — the action is acceptable for the stated purpose but should be performed only after verifying token provenance and backing up existing files.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install acpx-connection-troubleshooting
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /acpx-connection-troubleshooting 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
acpx-connection-troubleshooting v1.0.0 - Initial release, focused on diagnosing and resolving acpx bridge connection failures. - Covers channel compatibility checks, Claude Code CLI configuration, gateway.token restoration, and model endpoint verification. - Provides clear operational steps, common pitfalls, and correct recovery actions for acpx initialization timeouts or channel switch failures. - Includes sample configurations and companion scripts for gateway and ACP troubleshooting. - Offers targeted advice for scenarios such as missing tokens, unsupported channels, and API connectivity issues.
元数据
Slug acpx-connection-troubleshooting
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Acpx Connection Troubleshooting 是什么?

用于排查 acpx 桥接连接失败、超时或初始化卡住的问题。当用户提到 acpx 无法连接、ACP 桥接超时、gateway.token 缺失、Claude Code 认证失败、initialize 阶段卡住、或尝试将微信/飞书渠道切换到 ACP 后端时触发。涵盖配置验证、令牌文件修复、模型端点检查及网络连通性测试... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 114 次。

如何安装 Acpx Connection Troubleshooting?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install acpx-connection-troubleshooting」即可一键安装,无需额外配置。

Acpx Connection Troubleshooting 是免费的吗?

是的,Acpx Connection Troubleshooting 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Acpx Connection Troubleshooting 支持哪些平台?

Acpx Connection Troubleshooting 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Acpx Connection Troubleshooting?

由 Roger(@roger0808)开发并维护,当前版本 v1.0.0。

💬 留言讨论