shinyorg/shiny/shiny-discovery
Claude Code and agent skill by shinyorg/shiny
- community
Checking that the SKILL.md file is still in the repository.
Generate code using Shiny.Net.Discovery for cross-platform local network discovery - mDNS/DNS-SD (Bonjour/Zeroconf), SSDP/UPnP, and WS-Discovery (ONVIF) browsing, resolution, and publishing on iOS, Android, Mac Catalyst, macOS, Windows, and Linux
Install
npx vskill@latest install shinyorg/shiny/shiny-discoverySKILL.md
The same SKILL.md was published earlier as shinyorg/shiny/shiny-discovery.
Shiny.Net.Discovery Skill
You are an expert in Shiny.Net.Discovery, a cross-platform local network discovery library covering three protocols: mDNS/DNS-SD (Bonjour/Zeroconf), SSDP/UPnP, and WS-Discovery.
When to Use This Skill
Invoke this skill when the user wants to:
- Discover services or devices on the local network (printers, Chromecasts, IoT devices, peer apps)
- Advertise their own app as a discoverable service
- Find UPnP/DLNA devices, routers, Sonos, Roku, or smart TVs (SSDP)
- Find ONVIF cameras, WSD printers/scanners, or Windows machines (WS-Discovery)
- Read TXT record metadata, or a UPnP device description
- Resolve a known service instance to a host, port, and IP addresses
- Ask about Bonjour/mDNS on iOS without the multicast entitlement
- Register any of the three protocols in DI
Choosing a protocol
| Looking for | Use | Registration | |
|---|---|---|---|
| Apple devices, AirPlay, IPP printers, peer apps, your own services | mDNS/DNS-SD | AddMdns() | |
| Routers, UPnP/DLNA media servers, Sonos, Roku, smart TVs | SSDP | AddSsdp() | |
| ONVIF IP cameras, WSD printers/scanners, Windows machines | WS-Discovery | AddWsDiscovery() |
They are independent - register only what you need. A device that speaks one usually does not speak the others.
Library Overview
| Item | Value | |
|---|---|---|
| GitHub | https://github.com/shinyorg/shiny | |
| NuGet | Shiny.Net.Discovery | |
| Namespace | Shiny.Net.Discovery (types); Shiny (registration extensions) | |
| Platforms | iOS, tvOS, Mac Catalyst, macOS, Android, Windows, Linux, server .NET |
How each platform is backed
mDNS delegates to the OS wherever there is an API:
| Platform | Implementation | Why | |
|---|---|---|---|
| iOS / tvOS / Mac Catalyst / macOS | NSNetService (Bonjour) | Goes through the system mDNSResponder, so no com.apple.developer.networking.multicast entitlement | |
| Android | NsdManager | The OS keeps the multicast path alive. Below API 34 a resolve falls back to the managed responder while NsdManager's one resolve slot is held by a timed-out resolve | |
| Windows / Linux / server .NET | Managed responder on UDP 5353 | No OS DNS-SD API to lean on; dependency-free, AOT-safe |
SSDP and WS-Discovery are managed on every platform, including iOS and Android. This is not a design choice - neither NsdManager nor Apple's Bonjour stack can speak these protocols, and no OS exposes any other API for them. They therefore use raw UDP multicast everywhere.
⚠️ The entitlement rule differs by protocol
For mDNS: do not tell users they need the iOS multicast entitlement. That requirement applies to raw multicast sockets, which the mDNS implementation deliberately avoids on Apple platforms.
For SSDP and WS-Discovery the opposite is true - they do need it on iOS, and it is approval-gated by Apple:
| Platform | mDNS | SSDP / WS-Discovery | |
|---|---|---|---|
| iOS | nothing | `com.apple.developer.networking.multicast` - request at https://developer.apple.com/contact/request/networking-multicast, granted per developer team. Cannot be tested in the simulator | |
| Mac Catalyst / macOS | sandbox network entitlements | same sandbox entitlements; not the multicast entitlement (iOS only). macOS 15+ also prompts for Local Network | |
| Android | nothing (CHANGE_WIFI_MULTICAST_STATE is declared by the package) | CHANGE_WIFI_MULTICAST_STATE (the lock is acquired for you) plus ACCESS_LOCAL_NETWORK when targeting SDK 37+ | |
| Windows | firewall; MSIX capability | same | |
| Linux | firewall | same; Docker bridge networking does not work |
A missing permission throws DiscoveryPermissionException with a message naming exactly what to add, rather than silently returning nothing. An unreachable/network-down send error only counts as a denial until a send has worked - after that it is an interface dropping (a Wi-Fi handoff), and a browse or publication keeps going and re-joins the group when the network comes back.
Setup
Register only the protocols you use. AddSsdp() also registers a named HttpClient (SsdpConstants.HttpClientName) for fetching device descriptions, with redirects and cookies disabled deliberately - you can reconfigure it with services.AddHttpClient(SsdpConstants.HttpClientName).
iOS / Mac Catalyst / macOS — Info.plist (required)
Browsing silently returns nothing if the service type is not declared. Both keys are required:
Every service type the app browses for and publishes must be listed in NSBonjourServices. The local-network permission prompt appears automatically on first use; there is no API to query or pre-request it.
Mac Catalyst / macOS — App Sandbox entitlements (csproj)
For mDNS, iOS needs no entitlement at all. Mac Catalyst and macOS run sandboxed, so network access must be declared — browsing/resolving needs the client entitlement, publishing also needs the server one. These apply to all three protocols:
Still not com.apple.developer.networking.multicast — that is for raw multicast sockets.
Android — AndroidManifest.xml
No runtime permission is needed, but declare:
The package itself declares CHANGE_WIFI_MULTICAST_STATE (a normal, install-time permission) - it merges into the app manifest, so do not tell users to add it for mDNS.
Below API 34 (Android 13 and older) NsdManager allows one resolve in flight and cannot cancel it. Resolves queue behind a live one, each with its own timeout. A resolve that times out keeps the slot until NsdManager eventually reports back (a service that vanished mid-resolve may never), and while it does, Resolve and browse resolution go through the managed mDNS responder instead (SRV/TXT/A over UDP 5353, holding the WifiManager.MulticastLock only for that query). If the managed query cannot run, callers wait behind the stuck resolve until their own timeout. Nothing to configure - do not write workarounds such as re-creating NsdManager or retry loops.
Windows / Linux
The managed responder binds UDP 5353. It sets SO_REUSEADDR (plus SO_REUSEPORT on Unix) so it coexists with avahi-daemon, mDNSResponder, or the Windows DNS client. Ensure the firewall allows UDP 5353.
A packaged Windows app (MSIX/WinUI) also needs the local-network capability in Package.appxmanifest, otherwise the responder sends and receives nothing:
SSDP / WS-Discovery — extra platform setup
Everything above still applies. These two protocols additionally need the following, because they use raw multicast rather than an OS discovery API.
iOS — the multicast entitlement (blocking). Apple grants this per developer team on request; budget days to weeks. Without it, sends fail and nothing is received.
Also set NSLocalNetworkUsageDescription in Info.plist. This cannot be tested in the simulator - local network privacy is not enforced there, so the simulator neither reproduces the failure nor proves the fix. NSBonjourServices is irrelevant to SSDP/WSD; it only gates mDNS.
Android:
The WifiManager.MulticastLock is acquired and released automatically for the lifetime of a browse or publication - do not write code to manage it. ACCESS_LOCAL_NETWORK is a runtime (dangerous) permission in the NEARBY_DEVICES group, so request it before discovering.
Ports: SSDP is UDP 1900, WS-Discovery is UDP 3702, both on group 239.255.255.250 (and ff02::c). On Windows the system SSDPSRV and FDResPub services already hold those ports; SO_REUSEADDR is set so this coexists with them.
Docker: bridge networking does not work - NAT does not rewrite the addresses embedded in LOCATION and XAddrs. Use --network host or macvlan.
mDNS API Reference
IMdnsManager
Extension helpers (MdnsExtensions):
Browsing (live)
Browse never completes on its own — it runs until the token is cancelled. Always pass a CancellationToken.
Browsing (one-shot scan)
Publishing
You are responsible for having something listening on the port — publishing only advertises it.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/shiny-discovery/SKILL.md
Popularity
- Repository stars
- 1,583
- Repository forks
- 248
- 7-day trend score
- 37
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/shinyorg/shiny/shiny-discovery)