← ClaudeAtlas

login-probe-selfheallisted

Probe the things an agent depends on (logged-in browser, API key, tunnel, device link), run a heal command when one is down, and write a status file the agent reads before starting work. Use at the start of every unattended shift so it does not burn time on a dead login.
Tommyapi/ai-employee-skills · ★ 0 · AI & Automation · score 70
Install: claude install-skill Tommyapi/ai-employee-skills
# Login probe and self-heal Most "the agent failed" incidents are a dependency that died hours earlier: a browser that quit, a session that expired, a tunnel that dropped. Probe first, heal if you can, and tell the agent the truth. ## Steps 1. Write `probes.json`; `check` and `heal` are argv lists (no shell): ```json {"probes": [ {"name": "browser", "check": ["curl", "-sf", "--max-time", "5", "http://127.0.0.1:9222/json/version"], "heal": ["./start-browser.sh"], "retries": 1, "cooldown_min": 30, "timeout_s": 20}, {"name": "api-key", "check": ["./check-key.sh"]} ]} ``` 2. Run: `python scripts/probe_heal.py --config probes.json --status status.json` 3. Exit 0 means all healthy (some may have been healed, shown as `(healed)`); exit 1 means at least one is down. The agent reads `status.json` and skips work that needs a down dependency, reporting it instead of looping. ## Behaviour - Healthy = check exits 0. A timeout or a missing binary counts as down, never as a crash. - Heal runs at most once per `cooldown_min` per probe, so a broken thing is not hammered (and an account is not flagged by a restart loop). - `--no-heal` probes only. ## Rules - Identity checks (a human must scan a QR code, solve a face check) are not healable: the heal command should notify the owner with the one concrete step, not retry. - Keep secrets out of `probes.json`; have the check script read them from your own secret store.