preflight-check
Preflight Connection Validator
Validate external service connections and report a clear status table before proceeding with work.
Why this exists
Nothing wastes more time than getting halfway through a task only to discover an API key expired or an MCP server is down. This skill front-loads that pain — check everything first, fix what's broken, then start real work with confidence.
Services to validate
Check each of these in order. For each service, make the minimal request that proves authentication works.
1. GitHub (gh CLI)
Run gh auth status via Bash. Look for the "Logged in" confirmation line. Extract:
- Account name
- Active scopes
- Auth method (keyring, token, etc.)
If it fails, suggest gh auth login.
2. Atlassian (MCP server)
Call mcp__claude_ai_Atlassian__atlassianUserInfo with no parameters. If it returns user info (name, email, account_id), the MCP connection and OAuth are working. Extract:
- User name
- Account status
If it fails, the MCP server may not be running or the OAuth token may have expired. Tell the user to check their MCP server configuration or re-authenticate.
3. UniFi (API key)
Load UNIFI_API_KEY from the environment. The key should be available as an environment variable. Make a request to the UniFi controller to verify the key works:
import urllib.request
import ssl
import os
import json
key = os.environ.get("UNIFI_API_KEY", "")
if not key:
print("MISSING: UNIFI_API_KEY not set")
else:
ctx = ssl._create_unverified_context()
req = urllib.request.Request(
"https://192.168.1.1/proxy/network/integration/v1/sites",
headers={"X-API-KEY": key, "Accept": "application/json"}
)
try:
resp = urllib.request.urlopen(req, context=ctx, timeout=10)
data = json.loads(resp.read())
print(f"OK: {len(data.get('data', []))} site(s) found")
except Exception as e:
print(f"FAILED: {e}")
If UNIFI_API_KEY is not in the environment, check for a .env file in the project root and load it with python-dotenv. Never try to cat or source the .env directly — it may be a 1Password FIFO pipe.
If the key is missing entirely, tell the user to set UNIFI_API_KEY (generated in UniFi Network App > Integrations > Create New API Key).
Output format
Present results as a markdown table:
| Service | Auth Method | Status | Details |
|------------|-----------------|--------|--------------------------------|
| GitHub | gh CLI/keyring | OK | Logged in as trtmn |
| Atlassian | MCP/OAuth | OK | Matt Troutman (mattt@...) |
| UniFi | API Key | OK | 2 site(s) found |
Use these status values:
- OK — authenticated and responsive
- FAILED — auth attempted but rejected (include the error)
- MISSING — credentials not found (say where to get them)
- UNREACHABLE — network/timeout error (could be VPN, firewall, etc.)
After the check
- If all services show OK, say so briefly and proceed with whatever the user needs.
- If any service failed, stop and report exactly what went wrong with specific error messages. Don't proceed with work that depends on a broken service — help the user fix it first.
- If a service is MISSING or FAILED but isn't needed for the current task, note it as a warning but don't block.
Adding new services
If the user mentions a new service they want checked, add it to the validation sequence. The pattern is always the same: find credentials, make the smallest possible authenticated request, report the result.
More from trtmn/agent-skills
self-improvement
Run the self-improvement agent to review this session and the ~/.learnings/ log files. Use this skill whenever the user explicitly asks to review learnings, promote entries to CLAUDE.md, do an end-of-session review, or analyze GitHub PRs/issues for recurring patterns. Also use when the user says "promote", "review learnings", "what have we learned", or "self-improvement". Do NOT use this skill just for logging — logging happens automatically without the skill (see Passive Logging below). This skill is specifically for the *review and promotion* workflow.
20unifi-api
Query and control a UniFi network using the `unifi` CLI (a restish wrapper with 1Password auth) or the REST API as fallback. Use this skill whenever the user wants to manage their UniFi network — listing connected clients, blocking/unblocking devices, managing firewall policies, checking WAN health and speed test results, rebooting devices, managing VLANs or SSIDs, reading traffic stats, port forwarding, or any other UniFi network management task. Prefer the `unifi` CLI for Integration API endpoints; fall back to raw curl/python for legacy API endpoints. Trigger even if the user doesn't say "API" or "UniFi" — phrases like "check my network", "block that device", "show me who's connected", "add a firewall rule", "what's my WAN IP", "how's my internet speed", or "what's on the guest network" are all good triggers.
5homebrew-dev
Package and distribute macOS apps, fonts, CLI tools, and arbitrary files using Homebrew formulas and casks. Use this skill whenever the user wants to create a Homebrew formula or cask, set up a personal tap, package a macOS .app bundle, distribute fonts or pre-built binaries via brew, use `brew create`, bump a formula or cask to a new version, submit a package to homebrew-core or homebrew-cask, or publish anything with Homebrew — even if they just ask how to "make something installable with brew", "share my app through Homebrew", "update my formula", or "get my package into Homebrew".
5tailscale-policy-manager
>
5obsidian-cli
>
4font-extractor
Extract and download all fonts from a website, organized into ./fonts/<font-family>/ subdirectories. Use this skill whenever the user wants to grab, rip, download, or extract fonts from a website or URL — even if they just say "get the fonts from this site", "download the fonts used on this page", or "what fonts does this website use?". Works with both static and JavaScript-rendered pages.
4