myco:unifi-client-data-correctness
Installation
SKILL.md
UniFi Client Data Retrieval Correctness
This skill covers the five correctness patterns required when reading, mapping, or extending UniFi client data in the unifi-mcp monorepo. The patterns were validated against a live UDM SE controller and surfaced four production bugs (Issues #297–#298, PRs #299–#300) in a single release cycle. Each pattern is a permanent fixture — violating any one of them silently corrupts client data for a measurable fraction of real devices.
Primary files:
packages/unifi-core/src/unifi_core/network/models/clients.py— model factories (client_from_controller,blocked_client_from_controller,client_lookup_from_controller) and the_is_online()helperpackages/unifi-core/src/unifi_core/network/managers/client_manager.py—get_client_details()with dual-endpoint fallback and merge logicapps/api/src/unifi_api/graphql/types/network/client.py— Strawberry GraphQL types (Client,BlockedClient,ClientLookup) that mirror the Pydantic models