unifi
UniFi Network Monitoring Skill
⚠️ MANDATORY SKILL INVOCATION ⚠️
YOU MUST invoke this skill (NOT optional) when the user mentions ANY of these triggers:
- "UniFi status", "network devices", "connected clients"
- "UniFi alerts", "network health", "WiFi status"
- "check UniFi", "gateway status", "UniFi monitoring"
- Any mention of UniFi network or infrastructure monitoring
Failure to invoke this skill when triggers occur violates your operational requirements.
Monitor and query your UniFi network via the local UniFi OS gateway API (tested on Cloud Gateway Max).
Purpose
This skill provides read-only access to your UniFi network's operational data:
- Devices (APs, switches, gateway) status and health
- Active clients (who's connected where)
- Network health overview
- Traffic insights (top applications via DPI)
- Recent alarms and events
All operations are GET-only and safe for monitoring/reporting.
Setup
Add credentials to ~/.claude-homelab/.env:
UNIFI_URL="https://10.1.0.1"
UNIFI_USERNAME="api"
UNIFI_PASSWORD="your-password"
UNIFI_SITE="default"
UNIFI_URL: Your UniFi OS gateway IP/hostname (HTTPS)UNIFI_USERNAME: Local UniFi OS admin usernameUNIFI_PASSWORD: Local UniFi OS admin passwordUNIFI_SITE: Site name (usuallydefault)
Commands
All commands support optional json argument for raw JSON output (default is human-readable table).
Network Dashboard
Comprehensive view of all network stats (Health, Devices, Clients, Networks, DPI, etc.):
bash scripts/dashboard.sh
bash scripts/dashboard.sh json # Raw JSON for all sections
Output: Full ASCII dashboard with all metrics.
List Devices
Shows all UniFi devices (APs, switches, gateway):
bash scripts/devices.sh
bash scripts/devices.sh json # Raw JSON
Output: Device name, model, IP, state, uptime, connected clients
List Active Clients
Shows who's currently connected:
bash scripts/clients.sh
bash scripts/clients.sh json # Raw JSON
Output: Hostname, IP, MAC, AP, signal strength, RX/TX rates
Health Summary
Site-wide health status:
bash scripts/health.sh
bash scripts/health.sh json # Raw JSON
Output: Subsystem status (WAN, LAN, WLAN), counts (up/adopted/disconnected)
Top Applications (DPI)
Top bandwidth consumers by application:
bash scripts/top-apps.sh
bash scripts/top-apps.sh 15 # Show top 15 (default: 10)
Output: App name, category, RX/TX/total traffic in GB
Recent Alerts
Recent alarms and events:
bash scripts/alerts.sh
bash scripts/alerts.sh 50 # Show last 50 (default: 20)
Output: Timestamp, alarm key, message, affected device
Workflow
When the user asks about UniFi:
- "What's on my network?" → Run
bash scripts/devices.sh+bash scripts/clients.sh - "Is everything healthy?" → Run
bash scripts/health.sh - "Any problems?" → Run
bash scripts/alerts.sh - "What's using bandwidth?" → Run
bash scripts/top-apps.sh - "Show me a dashboard" or general checkup → Run
bash scripts/dashboard.sh
Always confirm the output looks reasonable before presenting it to the user (check for auth failures, empty data, etc.).
Notes
- Requires network access to your UniFi gateway
- Uses UniFi OS login +
/proxy/networkAPI path - All calls are read-only GET requests
- Tested endpoints are documented in
references/api-endpoints.md
Reference
- Tested Endpoints — Full catalog of verified read-only API calls on your Cloud Gateway Max
🔧 Agent Tool Usage Requirements
CRITICAL: When invoking scripts from this skill via the zsh-tool, ALWAYS use pty: true.
Without PTY mode, command output will not be visible even though commands execute successfully.
Correct invocation pattern:
<invoke name="mcp__plugin_zsh-tool_zsh-tool__zsh">
<parameter name="command">./skills/SKILL_NAME/scripts/SCRIPT.sh [args]</parameter>
<parameter name="pty">true</parameter>
</invoke>
More from jmagar/claude-homelab
memos
Manage notes and memos in self-hosted Memos service. Use when the user asks to "save this to memos", "create a memo", "search my memos", "find notes about X", "what did I write about", "add a note", "capture this", "remember this", "save this thought", or mentions note-taking, knowledge management, or personal notes.
66unraid
Query and monitor Unraid servers via the GraphQL API. Use when the user asks to 'check Unraid', 'monitor Unraid', 'Unraid API', 'get Unraid status', 'check disk temperatures', 'read Unraid logs', 'list Unraid shares', 'Unraid array status', 'Unraid containers', 'Unraid VMs', or mentions Unraid system monitoring, disk health, parity checks, or server status.
24plex
Control Plex Media Server - browse libraries, search media, check what's playing, view recently added. Use when the user asks to "check Plex", "search Plex", "what's on Plex", "recently added", "who's watching", "Plex sessions", "Plex library", "browse movies", "browse TV shows", or mentions Plex media server.
22tailscale
This skill should be used when managing Tailscale mesh VPN networks. Use when the user asks to "check tailscale status", "list tailscale devices", "ping a device", "send file via tailscale", "tailscale funnel", "tailscale serve", "create auth key", "check who's online", "tailscale exit node", "Magic DNS", or mentions Tailscale network management, tailnet operations, or VPN connectivity.
21qbittorrent
Manage torrents with qBittorrent. Use when the user asks to "list torrents", "add torrent", "pause torrent", "resume torrent", "delete torrent", "check download status", "torrent speed", "qBittorrent stats", or mentions qBittorrent/qbit torrent management.
20sonarr
This skill should be used when managing TV shows in Sonarr. Use when the user asks to "add a TV show", "search Sonarr", "find a series", "add to Sonarr", "remove a show", "check if show exists", "Sonarr library", "TVDB lookup", or mentions TV show management or Sonarr operations.
14