agent-runtime-gateway-smoke-test
Skill này làm gì
Kiểm tra xem một agent AI có giao tiếp được với API cục bộ qua đường hầm bảo mật hay không, mà không dùng công cụ hay dữ liệu thật. Nó kiểm tra toàn bộ đường đi giao tiếp và đảm bảo mọi thứ trở lại bình thường sau đó.
Khi nào nên dùng
- ✓Khi bạn cần kiểm tra xem API cục bộ có hoạt động đúng với agent không.
- ✓Khi một tác vụ của agent ngừng hoạt động và bạn nghi ngờ đường hầm giao tiếp có vấn đề.
- ✓Khi kiểm tra một thiết lập mới mà website tạm thời trỏ đến API cục bộ.
Liên kết skill
https://github.com/affaan-m/ECC/blob/main/skills/agent-runtime-gateway-smoke-test/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Xác minh giao tiếp giữa API cục bộ của tôi và một agent AI qua đường hầm bảo mật, không dùng dữ liệu thật, rồi khôi phục kết nối ban đầu.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Bài kiểm tra này khởi động API cục bộ và một đường hầm bảo mật. Nó gửi một yêu cầu đơn giản qua đường hầm để xác nhận API phản hồi. Sau đó, nó chạy một tác vụ thử với agent và kiểm tra xem API cục bộ có nhận được phản hồi mong đợi không. Cuối cùng, nó khôi phục cấu hình ban đầu của website và tắt API thử nghiệm cùng đường hầm.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
- 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.
- 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
401or403. Confirm the probe appears in the local API log; an edge response alone does not prove the API was reached. - 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.
- 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.
- 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. |
…
Câu hỏi thường gặp
Vì sao không dùng dữ liệu thật?
Để đảm bảo an toàn và quyền riêng tư, bài kiểm tra chỉ dùng một kịch bản mô phỏng và không truy cập thông tin nhạy cảm.
'Đường hầm bảo mật' là gì?
Đây là kết nối được bảo vệ, cho phép API cục bộ giao tiếp an toàn với agent AI, ngay cả khi chúng ở các địa điểm khác nhau.
Điều gì xảy ra nếu bài kiểm tra thất bại?
Bài kiểm tra sẽ báo phần nào trong giao tiếp bị lỗi (API cục bộ, đường hầm, agent hoặc khâu khôi phục) để bạn sửa.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 280k
- Vị trí xếp hạng
- #259
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
accessibility
280kGiúp agent của bạn tạo giao diện mà ai cũng dùng được, đảm bảo website và app hoạt động tốt với người khuyết tật như người mù hoặc khó vận động.
agent-architecture-audit
280kGiúp agent của bạn kiểm tra xem mọi thứ có hoạt động đúng không, đồng thời tìm và sửa các lỗi trong hệ thống AI để chúng chạy như mong đợi.
agent-eval
280kGiúp agent của bạn so sánh các công cụ lập trình AI khác nhau, đo xem công cụ nào nhanh hơn, rẻ hơn và đáng tin cậy hơn cho từng tác vụ.
agent-harness-construction
280kGiúp agent của bạn hiểu rõ hơn cách thực hiện tác vụ, tối ưu các công cụ và chỉ dẫn mà agent dùng để tăng khả năng thành công.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.