跳到正文
Skillpedia
智能体280k · #259

agent-runtime-gateway-smoke-test

它能做什么

这个工具用来检查 AI 代理能否通过安全隧道与本地 API 通信,且不使用真实的工具或数据。它会测试整条通信链路,并确保测试结束后一切恢复正常。

适用场景

  • ✓当你需要测试本地 API 能否与代理正常配合工作时。
  • ✓当代理任务突然失效,你怀疑通信隧道有问题时。
  • ✓当你在测试一个新配置,其中网站临时指向本地 API 时。

技能链接

https://github.com/affaan-m/ECC/blob/main/skills/agent-runtime-gateway-smoke-test/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/affaan-m/ECC/blob/main/skills/agent-runtime-gateway-smoke-test/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“通过安全隧道验证我的本地 API 与 AI 代理之间的通信,不使用真实数据,测试完成后再恢复原来的连接。”

每周 5 个新技能,1 分钟读完。

工作原理

这个测试会先启动你的本地 API 和安全隧道。然后向隧道发送一个简单请求,确认 API 能正常响应。接着,让代理执行一个简单的测试任务,并检查本地 API 是否收到了预期的返回结果。最后,恢复网站原本的配置,并关闭测试用的 API 和隧道。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Agent Runtime Gateway Smoke Test

Use this workflow when an agent task runs in a remote sandbox that calls back to a local API through a gateway. It verifies the whole path without relying on connected tools or private production data.

When to Activate

  • A local agent API needs an end-to-end runtime check.
  • A task stalls after dispatch and the gateway or tunnel may be unreachable.
  • A web app is temporarily pointed at a local API for agent testing.
  • A previous test left the web app pointing at a stopped API.

Required Inputs

  • Repository-relative instructions for starting the API and web app.
  • The gateway route path and its expected anonymous response.
  • An isolated test agent, a tool-free prompt, and its exact expected answer.
  • A way to inspect task status and confirm a callback reached the local API.
  • Provider credentials, supplied through the project's normal secret store. Name the providers in shared documentation; never copy credential values into the skill or test report.

If these inputs are unavailable, report the missing input instead of guessing an endpoint or using a real account.

Authorization and Cleanup

Confirm authorization to expose the local test API through the selected tunnel provider, dispatch the test task, and temporarily change the web app route. Use an isolated local web app or test deployment; do not switch a shared production app as part of this smoke test. Keep tunnel access scoped to the required authenticated route.

Install cleanup before changing the route: on success, error, timeout, interruption, or cancellation, restore the recorded target and verify health before stopping the API and tunnel. Track only the process IDs or resources created by this test. If restoration fails, report it immediately and keep the evidence needed to recover; do not claim success.

Smoke Test

  1. Record and check the original route. Note the web app's current API target and verify it is healthy. Keep this value locally for restoration. Confirm the test agent and data are isolated from real users.
  2. Start the local API and tunnel. Use a process manager that will keep both alive for the full test. Verify API health. Probe the gateway route anonymously and confirm the documented authentication response, usually 401 or 403. Confirm the probe appears in the local API log; an edge response alone does not prove the API was reached.
  3. Switch the web app only after both checks pass. Verify a request from the web app reaches the local API. Check the route again after any web server restart or configuration reload.
  4. Run one tool-free task. Use a short prompt with an exact expected answer. Confirm the remote sandbox called the local gateway, the task reached a terminal state, and the returned answer matches. A queued or running task is not a pass.
  5. Restore the original route. Set the web app back to its recorded API target, verify that target and a representative page load, then stop the test API and tunnel. If restoration fails, report the broken route immediately.

Example checks, with values supplied by the project:

curl --silent --show-error --output /dev/null --write-out '%{http_code}\n' "$LOCAL_API_HEALTH_URL"
curl --silent --show-error --output /dev/null --write-out '%{http_code}\n' "$PUBLIC_GATEWAY_PROBE_URL"

The first command should return the project's healthy status. The second should return the documented anonymous authentication status and appear in the local API log. Do not put a credential in either URL.

Connected Tool Follow-up

Run a separate test only after the tool-free task passes. Use an explicit test connection and grants. Report connection presence and actions granted as different facts. Do not infer that an empty action search means no app is connected. Do not execute a write action against a real account as a smoke test.

Failure Handling

Observation Next check
Web page loads but API requests fail Compare the configured API target with the listening process and restore the original route.
Gateway probe gets a connection error or 404 Check tunnel lifetime, route path, and local API health before dispatching a task.
Gateway probe gets 401 or 403, but no local log entry The response may come from the tunnel edge; verify the callback path.
Task stays queued or running Check whether another dispatcher claimed it and whether the sandbox reached the local gateway.

…

常见问题

为什么不用真实数据?

为了保证安全和隐私,这个测试只使用模拟场景,不会访问任何敏感信息。

什么是“安全隧道”?

它是一条受保护的连接,即使本地 API 和 AI 代理位于不同位置,也能安全地互相通信。

如果测试失败了会怎样?

测试会报告通信中哪一环出了问题(本地 API、隧道、代理或配置恢复),方便你针对性地修复。

详情

作者的原始描述

Verify a local agent API, temporary gateway tunnel, and remote sandbox callback with a tool-free task, then restore the original app connection.

repo: affaan-m/ECC

热度

GitHub 星标
280k
排名
#259
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能