用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/crimsonblazezero/Zero-Tools --skill api-connection-troubleshooting命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
领星 ERP 数据拉取、周报/月报汇总、运营周会 Excel 表格自动填报并交王祎审核确认后自动提交运营周复盘日志(附件以钉盘链接贴正文)、六组周会纪要自动生成与推送工作流。
Use when generating, pulling, auditing, filling, or rolling monthly business review reports (月度运营复盘/月报/主管月复盘/当月销售分析) for LingXing ERP and Nanjing Europe Group (南京欧洲组KS) Amazon stores.
Use when the user wants to pull Amazon sales/ad profit data from LingXing ERP (跨境电商ERP), build a weekly/monthly business dashboard (经营周报/月报/数据看板/排名环比/父ASIN), or send the report to a DingTalk group (钉钉群). Triggers: "拉上周数据/拉上个月数据", "父ASIN销售广告利润", "经营周报看板", "BSR排名环比", "发送到钉钉/欧洲群", "lingxing周报", "lingxing看板", "月报/月度复盘/全年完成表/退款率/退货率/仓储费/库销比". Pulls order-profit reports at parent-ASIN granularity, cross-validates ads spend, enriches Chinese product names, optionally fetches BSR rank trends, builds a self-contained Chart.js HTML dashboard (monthly variant adds fee-structure/rating/refund-rate/annual-target columns), and sends it to a specified DingTalk group via the dws CLI.
基于 SOC 职业分类
正在显示 SKILL.md
| name | api-connection-troubleshooting |
| description | Diagnose slow or failing API calls after Hermes upgrades. |
| tags | ["troubleshooting","api","connectivity","hermes"] |
| version | 1.0.0 |
| created_at | 2026-08-01 |
当 Hermes Agent 出现 API 调用缓慢、超时或连接失败时,使用本 Skill 进行系统性诊断。
不要假设是客户端配置问题。大多数"升级后变慢"的案例实际上是服务端延迟,而非客户端配置错误。
# 检查当前模型配置
hermes config get model
# 确认 api_mode 已显式设置(不应依赖默认值)
hermes config get model.api_mode
关键检查点:
api_mode 应为 chat_completions(除非明确需要 Responses API)base_url 指向正确的网关skip_provider_detection: true 防止自动切换# 直接测试 API 端点(绕过 Hermes)
python3 -c "
import urllib.request, json
key = '<YOUR_API_KEY>'
req = urllib.request.Request('https://api.example.com/v1/models')
req.add_header('Authorization', f'Bearer {key}')
import time
start = time.time()
r = urllib.request.urlopen(req, timeout=10)
print(f'连通时间: {time.time()-start:.2f}s')
print(json.loads(r.read()))
"
判断标准:
5s:服务端有问题
# 查看最近 API 调用延迟
hermes logs | grep "latency="
# 查看超时错误
hermes logs | grep -i "timeout\|timed out"
日志模式识别:
latency=15s cache=... → 服务端响应慢APITimeoutError → 请求超时(服务端无响应)HTTP Error 400 → 客户端请求格式问题HTTP Error 401 → 认证问题ping apihub.agnes-ai.com
注意:ICMP 被拦截不代表 API 不通,但 100% 丢包值得记录。
症状:升级后 API 调用变慢或失败
错误归因:认为客户端自动切换到 codex_responses 模式
实际情况:
api_mode 已在 config.yaml 显式设置为 chat_completionsclient.beta.responses 可能不存在症状:第二句消息失败,第一句正常 错误归因:认为历史消息格式不兼容 实际情况:
output_text 类型症状:API 调用耗时 15-30s 错误归因:尝试各种客户端配置调整 实际情况:
import urllib.request, json, time, os
# 读取 API key
key = ''
with open(r'C:/Users/Administrator/AppData/Local/hermes/.env') as f:
for line in f:
if line.startswith('OPENAI_API_KEY='):
key = line.strip().split('=',1)[1].strip('"').strip("'")
break
# 测试连通性
url = 'https://apihub.agnes-ai.com/v1/models'
results = []
for i in range(3):
start = time.time()
try:
req = urllib.request.Request(url)
req.add_header('Authorization', f'Bearer {key}')
r = urllib.request.urlopen(req, timeout=30)
elapsed = time.time() - start
data = json.loads(r.read())
results.append(elapsed)
print(f"Attempt {i+1}: {elapsed:.2f}s - OK ({len(data.get('data', []))} models)")
except Exception as e:
elapsed = time.time() - start
results.append(elapsed)
print(f"Attempt {i+1}: {elapsed:.2f}s - FAILED: {e}")
if results:
print()
references/api-latency-patterns.md — 常见 API 延迟模式与解决方案references/hermes-config-checklist.md — Hermes 配置检查清单