Browser Network Assert
Assert API/health HTTP status from probes or HAR.
Skill metadata
| Source | Bundled (installed by default) |
| Path | skills/web-development/browser-network-assert |
| Version | 1.0.0 |
| Author | VibeOS |
| License | MIT |
| Platforms | linux, macos, windows |
| Tags | browser, network, har, health, api, smoke, e2e |
| Related skills | browser-e2e, ship-web-service, internet-starter |
Reference: full SKILL.md
信息
The following is the complete skill definition that VibeOS loads when this skill is triggered. This is what the agent sees as instructions when the skill is active.
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-e2ehome + health checks
Prerequisites
- Target URLs reachable from the agent host
- Optional: HAR export from DevTools if the user provides one
browser_cdpis 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
| Flag | Meaning |
|---|---|
--probe URL | Live GET; repeatable |
--har FILE | Load Chrome HAR |
--require-ok SUBSTR | Need a 2xx whose URL contains SUBSTR |
--require-status CODE:SUBSTR | Exact status match |
--max-5xx N | Fail if more than N 5xx (default 0) |
--json | Machine-readable report |
Procedure
- Confirm servers with
vibeos project servers --expect … --health. - Run
browser-e2enavigate/snapshot for UI. - Run
assert_network.pyfor API/health status contracts. - On fail: print failures; fix; re-probe. Do not deploy.
Pitfalls
- Do not add a core
browser_networktool for this — the script is enough. - Do not treat empty HAR as success; require explicit
--require-oktargets. - 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).