Agent skill · Backend & API

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

tech nasty24★ · 1 repos on radarProfile →
claude-codeships scriptsMIT
Install
npx skills add t3chnaztea/unifi-skills --skill unifi-connect --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 11 KB
Bundled scripts: yes
Requires: UniFi OS gateways running a self-hosted Network controller. Verified on UniFi OS 5.1.19 / Network 10.4.57. Endpoint…
Path: skills/unifi-connect/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 24
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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" \

What's inside
Steps it walks through
  1. Lane 1: API key (use this)
  2. Minting a key over the API
  3. Using it
  4. What a key can and cannot reach
  5. Lane 2: cookie session (only for legacy Protect)
  6. The HTTP/2 empty-body trap
  7. Endpoint map
  8. UniFi OS level, https://<UDMHOST>/api/
  9. Network controller, https://<UDMHOST>/proxy/network/api/s/default/
  10. Network controller v2, https://<UDMHOST>/proxy/network/v2/api/site/default/
  11. Protect
  12. The helper script
  13. Read before write, always
  14. Version drift
Ships with 1 file
  • scripts/udm.py
Commands it runs
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
More from unifi-skills
All skills →
About this skill
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.

Keep going