Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

localhost-dashboard-serving

БесплатноЗапускает вложенные скриптыНе проверен

Use when serving agent data as a phone-accessible page.

jiayaoqijiaот jiayaoqijia★ 81 звезда на GitHub

Об этом скилле

Serving agent data as a localhost dashboard (and getting it onto the user's phone)

When to Use

Load when the user asks to see something the agent already computes, instead of only getting Telegram messages: "bikin webnya", "atau localhost yg bisa gw akses kyk gitu", "bikin dashboard dong", "gw mau liat sendiri", "bisa dibuka dari HP ga", or names a product ("zemiztracker") for such a page.

Typical trigger chain: a CLI tool/monitor was just built (see third-party-monitor-cloning) and the next ask is always "bisa gw akses sendiri nggak?". Answer: stdlib HTTP server on 127.0.0.1 + cloudflared quick tunnel + a keeper cron. No dependencies, no account, no inbound port.

Deliver it BRANDED (title, /<name> route, favicon, mobile-app meta) — the user treats this as a product of theirs, not a debug view. Terse one-word messages like "zemiztracker" mean name it that.

Architecture (4 parts, all cheap)

  1. Server — Python stdlib ThreadingHTTPServer, bound to 127.0.0.1 only (never 0.0.0.0; the tunnel is the only public path). Routes: / plus /<name> (same page), /api/<data> (JSON), /api/refresh (force), /healthz. See templates/localhost_dashboard_server.py.
  2. Cache + history — a daemon thread refreshes the upstream data every TTL (60 s) into memory; requests never hit the upstream API. Append one JSONL row per refresh (~/.hermes/data/<tool>_history.jsonl, trimmed to a few hundred lines) so the page can draw a real trend chart instead of a single number. Reuse the CLI tool's own functions by loading it with importlib.util.spec_from_file_location.
  3. Page — one self-contained HTML file next to the server (no CDN, no build step, inline CSS/JS), rendered client-side from the JSON API with a fetch refresh loop. Dark theme, tabular numbers, @media(max-width:620px) for phone. Put a brand in <title> + <h1>, an inline data-URI SVG favicon, and theme-color + apple-mobile-web-app-* so "Add to Home Screen" looks like an app. Multi-module app (tabs: overview / content / calendar / automation / accounts): split into static/index.html + app.js + styles.css and route on location.hash (#/konten), with one render function per tab hitting its own /api/*. Each tab then has its own URL he can bookmark and share, the shell (sidebar, top bar, mobile nav) is written once, and the CSS design tokens carry straight over from the approved mockup.
  4. Exposure + keeper — cloudflared tunnel --url http://localhost:<port> (quick tunnel, no account) and templates/service_keeper.sh running from a no_agent cron every 5–10 min that restarts the server/tunnel if dead and prints the URL only when it changed.

Keeper + cron: the no-notification-spam pattern

Quick-tunnel URLs rotate on every restart, so never hand the user a bare URL without a way to learn the new one. The keeper script is idempotent and does three things:

curl -sf -m 5 "http://127.0.0.1:$PORT/healthz" >/dev/null || restart_server   # pkill + setsid nohup
pgrep -f "cloudflared tunnel --url http://localhost:$PORT" >/dev/null || restart_tunnel
URL=$(grep -ho 'https://[a-z0-9-]*\.trycloudflare\.com' "$TUN_LOG" | tail -1)
# write URL to data/<tool>_url.txt; print the message ONLY if it differs from the *_seen.txt copy

The pgrep line proves a process exists, not that the tunnel works. cloudflared can sit in a reconnect loop (ERR failed to serve tunnel connection … Retrying connection in up to 1m4s) with the URL already dead, and a pgrep-only keeper stays silent for hours. Gate on the public URL too: curl -s -o /dev/null -w '%{http_code}' -m 15 "$URL<route>"; on a non-200 kill the tunnel and restart it, accepting the URL rotation rather than keeping a link that 404s.

Register it as no_agent=true, deliver=origin, script=<keeper>.sh: empty stdout = no message, so the cron is silent on the happy path and only pings the user when the link actually changes. That is the same delta-only rule as the alert lanes (cron-output-style, hermes-cron-automation). A second no_agent job runs the data scanner itself on its own cadence.

script= must be a plain file living inside ~/.hermes/scripts/. An absolute path is rejected outright, and a symlink to the project copy is rejected as escapes the scripts directory via traversal — so ln -s ~/studio/keep.sh ~/.hermes/scripts/ fails registration even though the file reads fine. Copy the keeper in (cp, then chmod +x) and remember the cron now runs the copy: after editing the project version, re-copy it, or the job keeps firing the stale script.

Restart durability: the detached child must be started inside the script file with setsid nohup ... >>log 2>&1 </dev/null &. Do that from the script, not from an agent terminal call. On hosts where systemctl --user fails with "Failed to connect to bus: No medium found" (Hermes gateway as a system service), script + cron keeper I

Полный SKILL.md на GitHub

Установить localhost-dashboard-serving в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

LICENSESOURCE.mdTRUST.auto.yamlreferences/collapse-toggle-reuse.mdreferences/collapsible-news-cards.mdreferences/conclusion-block-and-install-bar.mdreferences/file-based-page-patching.mdreferences/keeper-invocation-self-kill.mdreferences/large-payload-and-gzip.mdreferences/localhost-dashboard-serving.mdreferences/mobile-legibility-and-privacy.mdreferences/nav-tap-wiring.mdreferences/per-entity-reasoning-blocks.mdreferences/pwa-installability.mdreferences/service-worker-route-hijack.mdreferences/shell-200-but-backend-down.mdreferences/slow-collector-dashboards.mdreferences/stale-data-column-diagnosis.mdreferences/theming-to-reference-ui.mdreferences/web3-glass-theme.mdscripts/dashboard_card_shot_probe.pyscripts/dashboard_content_probe.pyscripts/dashboard_visual_audit.pyscripts/gen_pwa_icons.pyscripts/mobile_probe.pyscripts/mobile_probe_row.pyscripts/nav_tap_probe.pyscripts/sw_navigation_probe.pytemplates/localhost_dashboard_server.pytemplates/pwa_manifest.jsontemplates/pwa_service_worker.jstemplates/service_keeper.sh

FAQ

Что делает скилл localhost-dashboard-serving?

Use when serving agent data as a phone-accessible page.

Как установить скилл localhost-dashboard-serving?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл localhost-dashboard-serving запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить localhost-dashboard-serving с