unifi-connect
Use when connecting an agent to a UniFi gateway (UDM Pro, UDM SE, Cloud Gateway) for the first time, or when API calls to one are failing: empty response bodies, curl returning HTTP 000, 401 on a key that works elsewhere, "how do I get a UniFi API key", "SSH is closed on my UDM", "connect to UniFi", "talk to my UniFi controller". Covers minting an API key over the API, which endpoint families accept a key, the cookie-session fallback, the HTTP/2 empty-body trap, and the endpoint map. Start here: the other skills assume this one. Not for firewall policy (unifi-firewall), Wi-Fi and radios (unifi
npx skills add t3chnaztea/unifi-skills --skill unifi-connect --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# UniFi Connect The first thing to know: **SSH is usually closed and you do not need it.** UniFi OS exposes a full REST API on the same host as the web UI, and everything these skills do goes through it. The second thing: **UniFi has three overlapping API surfaces with different auth rules**, and picking the wrong one produces errors that look like broken credentials when they are not. Throughout, `<UDM_HOST>` is your gateway's LAN address. Never hardcode it into a file you might share. ## Lane 1: API key (use this) API keys are the modern lane. No login round-trip, no cookie jar, no CSRF token, and they sidestep the HTTP/2 bug described below. ### Minting a key over the API The admin UI has a key page, but you do not need it. Keys are mintable from an authenticated session: ```bash # Log in once to get a session curl -sk -X POST "https://<UDM_HOST>/api/auth/login" \ -H "Content-Type: application/json" \ -d '{"username":"<ADMIN_USER>","password":"<ADMIN_PASS>"}' \ -c /tmp/unifi_cookies -D /tmp/unifi_headers CSRF=$(grep -i 'x-updated-csrf-token' /tmp/unifi_headers | awk '{print $2}' | tr -d '\r') # Mint a named key curl -sk --http1.1 -b /tmp/unifi_cookies -H "x-csrf-token: $CSRF" \
- Lane 1: API key (use this)
- Minting a key over the API
- Using it
- What a key can and cannot reach
- Lane 2: cookie session (only for legacy Protect)
- The HTTP/2 empty-body trap
- Endpoint map
- UniFi OS level, https://<UDMHOST>/api/
- Network controller, https://<UDMHOST>/proxy/network/api/s/default/
- Network controller v2, https://<UDMHOST>/proxy/network/v2/api/site/default/
- Protect
- The helper script
- Read before write, always
- Version drift
Log in once to get a session curl -sk -X POST "https://<UDM_HOST>/api/auth/login" \ Mint a named key curl -sk --http1.1 -b /tmp/unifi_cookies -H "x-csrf-token: $CSRF" \ curl -sk -H "X-API-Key: $UNIFI_API_KEY" \ export UNIFI_API_KEY="..." # from an env file, never committed, never in a skill export UDM_HOST=192.0.2.1 export UNIFI_API_KEY="..." python3 udm.py # command list python3 udm.py devices # adopted devices
What does the unifi-connect skill do?
Use when connecting an agent to a UniFi gateway (UDM Pro, UDM SE, Cloud Gateway) for the first time, or when API calls to one are failing: empty response bodies, curl returning HTTP 000, 401 on a key that works elsewhere, "how do I get a UniFi API key", "SSH is closed on my UDM", "connect to UniFi", "talk to my UniFi controller". Covers minting an API key over the API, which endpoint families accept a key, the cookie-session fallback, the HTTP/2 empty-body trap, and the endpoint map. Start here: the other skills assume this one. Not for firewall policy (unifi-firewall), Wi-Fi and radios (unifi
How do I install it?
Run `npx skills add t3chnaztea/unifi-skills --skill unifi-connect --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From t3chnaztea/unifi-skills, a repository with 24 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.