Перейти к основному содержимому

Перевод: оболочка страницы на русском; тело навыка (SKILL.md) пока на английском — это исходные инструкции агента.

Browser Network Assert

Assert API/health HTTP status from probes or HAR.

Метаданные навыка​

ИсточникВстроенный (установлен по умолчанию)
Путьskills/web-development/browser-network-assert
Версия1.0.0
АвторVibeOS
ЛицензияMIT
Платформыlinux, macos, windows
Тегиbrowser, network, har, health, api, smoke, e2e
Связанные навыкиbrowser-e2e, ship-web-service, internet-starter

Справка: полный SKILL.md​

к сведению

Ниже полное определение навыка, которое VibeOS загружает при активации. Это инструкции, которые видит агент.

Browser Network Assert

Assert that critical HTTP requests (health, API) return expected statuses. No new core tools — use terminal + this script, optionally after a browser smoke. Closes the Cursor-style “network panel” gap with a recipe + checker.

When to Use​

  • After local server start or deploy, before calling the ship done
  • User asks to verify API calls / no 5xx on smoke
  • Alongside browser-e2e home + health checks

Prerequisites​

  • Target URLs reachable from the agent host
  • Optional: HAR export from DevTools if the user provides one
  • browser_cdp is not required (CDP Network events do not persist across stateless calls). Prefer probes / HAR file.

How to Run​

Locate this skill’s script, then:

# Live probes (typical ship loop)
python3 scripts/assert_network.py \
--probe http://127.0.0.1:8000/health \
--probe http://127.0.0.1:3000/api/health \
--require-ok /health \
--require-ok /api/health \
--max-5xx 0

# From HAR
python3 scripts/assert_network.py --har ./capture.har --max-5xx 0 --must-include /api/

# JSON report
python3 scripts/assert_network.py --probe http://127.0.0.1:8000/health \
--require-status 200:/health --json

If the path is unknown: search_files for browser-network-assert/scripts/assert_network.py.

Combine with port awareness:

vibeos project servers --expect 8000 --health
python3 …/assert_network.py --probe http://127.0.0.1:8000/health --require-ok /health

Quick Reference​

FlagMeaning
--probe URLLive GET; repeatable
--har FILELoad Chrome HAR
--require-ok SUBSTRNeed a 2xx whose URL contains SUBSTR
--require-status CODE:SUBSTRExact status match
--max-5xx NFail if more than N 5xx (default 0)
--jsonMachine-readable report

Procedure​

  1. Confirm servers with vibeos project servers --expect … --health.
  2. Run browser-e2e navigate/snapshot for UI.
  3. Run assert_network.py for API/health status contracts.
  4. On fail: print failures; fix; re-probe. Do not deploy.

Pitfalls​

  • Do not add a core browser_network tool for this — the script is enough.
  • Do not treat empty HAR as success; require explicit --require-ok targets.
  • Auth walls: probe only public health/API the user named.

Verification​

  • Script exits 0 with OK (N entries).
  • Failures list is empty in --json ("ok": true).