← Back to Skills Marketplace
roger0808

Acpx Connection Troubleshooting

by Roger · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
114
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install acpx-connection-troubleshooting
Description
用于排查 acpx 桥接连接失败、超时或初始化卡住的问题。当用户提到 acpx 无法连接、ACP 桥接超时、gateway.token 缺失、Claude Code 认证失败、initialize 阶段卡住、或尝试将微信/飞书渠道切换到 ACP 后端时触发。涵盖配置验证、令牌文件修复、模型端点检查及网络连通性测试...
README (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
Usage Guidance
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.
Capability Analysis
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.
Capability Tags
crypto
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install acpx-connection-troubleshooting
  3. After installation, invoke the skill by name or use /acpx-connection-troubleshooting
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug acpx-connection-troubleshooting
Version 1.0.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is Acpx Connection Troubleshooting?

用于排查 acpx 桥接连接失败、超时或初始化卡住的问题。当用户提到 acpx 无法连接、ACP 桥接超时、gateway.token 缺失、Claude Code 认证失败、initialize 阶段卡住、或尝试将微信/飞书渠道切换到 ACP 后端时触发。涵盖配置验证、令牌文件修复、模型端点检查及网络连通性测试... It is an AI Agent Skill for Claude Code / OpenClaw, with 114 downloads so far.

How do I install Acpx Connection Troubleshooting?

Run "/install acpx-connection-troubleshooting" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Acpx Connection Troubleshooting free?

Yes, Acpx Connection Troubleshooting is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Acpx Connection Troubleshooting support?

Acpx Connection Troubleshooting is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Acpx Connection Troubleshooting?

It is built and maintained by Roger (@roger0808); the current version is v1.0.0.

💬 Comments