feat(skills): add int-uptime-kuma skill (Uptime Kuma monitoring)#111
Open
mt-alarcon wants to merge 2 commits into
Open
feat(skills): add int-uptime-kuma skill (Uptime Kuma monitoring)#111mt-alarcon wants to merge 2 commits into
mt-alarcon wants to merge 2 commits into
Conversation
New integration skill to monitor and manage an Uptime Kuma instance.
- Read path (status/get): Prometheus /metrics with Basic Auth — stateless,
stdlib-only, works on any python3.
- Write path (add/edit/pause/resume/delete): Socket.io over WebSocket via
python-socketio. Real login is verified and aborts on failure (no silent
fallback). Every write requires a server ack {ok:true} or exits non-zero.
- Mutation-safety (int-blue style): dry-run by default, --execute to apply,
--source for the audit trail, snapshot_before on edit/delete, blast-radius
gates (delete requires --confirm "<exact name>"; pause warns), --max-writes.
- smoke command: exit-0 + JSON {overall, steps[], duration_ms}, including a
write_auth step that exercises the write-path login.
- Compatible with Uptime Kuma 2.x (validated on 2.2.1). The official
uptime-kuma-api lib only supports up to 1.23.2, hence the in-house client.
- 107 tests, network fully blocked in tests. Instance/credentials via env only.
Adds python-socketio[client] to dependencies (write path).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Sorry @mt-alarcon, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
Elevate the skill to a robust standard:
- login() now fails with an actionable diagnosis (_login_hint): it tells
apart rejected credentials (stale/incorrect username/password) from a
2FA-enabled account (TOTP required), instead of echoing the raw ack.
The raw server response is always appended. This closes the gap where
an auth failure surfaced as an opaque, silent {} from a write.
- SKILL.md documents the actionable login contract (stale vs 2FA).
- Tests: +5 (TestLoginHint) covering both failure modes, raw-payload
preservation, and that the raised error carries the hint. 112 passing.
Verified against Uptime Kuma 2.2.1 (read via Prometheus /metrics, write
via python-socketio). No new lint-http-type violations.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Author
|
Update: hardened the write-path login. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
New integration skill
int-uptime-kumato monitor and manage an Uptime Kuma instance from the workspace.Why
Uptime Kuma is a common self-hosted monitoring choice, but it has no stable REST API (it's Socket.io-based) and the official
uptime-kuma-apilib only supports up to 1.23.2 — leaving 2.x users without a clean programmatic path. This skill fills that gap with an in-house client validated on 2.2.1.Design
status/get): Prometheus/metricswith Basic Auth — stateless, stdlib-only, runs on anypython3.add/edit/pause/resume/delete): Socket.io over WebSocket viapython-socketio. Real login is verified and aborts on failure (no silent{ok:true}fallback); every write requires a server ack{ok:true}or exits non-zero.--executeto apply,--sourcefor the audit trail,snapshot_beforeon edit/delete, blast-radius gates (deleterequires--confirm "<exact name>";pausewarns it blinds monitoring),--max-writes.smoke: exit-0 + JSON{overall, steps[], duration_ms}, including awrite_authstep that exercises the write-path login (so an auth break surfaces in health checks).conditions: [](NOT NULL in 2.x) andaccepted_statuscodesas a list.Tests
107 tests, network fully blocked in the suite (no live calls). Covers the Prometheus parser, smoke (incl.
write_auth), dry-run-default for all 5 writes, the ack barrier for all 5 writes, the delete 2-factor gate, snapshots, and--max-writes. Regressions are non-tautological (neutralizing the ack check makes them fail).Notes
python-socketio[client]>=5.11todependencies(required by the write path).UPTIME_KUMA_*) — nothing hardcoded.🤖 Generated with Claude Code