/shiny:shiny-vpnfrom shiny
Generate code using Shiny.Net.Vpn to install, connect, disconnect and monitor a profile in the operating system's built-in IKEv2 VPN client (shared secret, username/password EAP, or client certificate) on iOS, Mac Catalyst, macOS, Android and Linux (NetworkManager + strongSwan)
Ships in shiny. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are an expert in Shiny.Net.Vpn, which installs and drives one IKEv2 profile in the operating system's own VPN client - the same client the user's Settings app manages.
Invoke this skill when the user wants to:
This is not a VPN protocol implementation. It configures the OS's built-in IKEv2 client.
It cannot do WireGuard, OpenVPN or a custom protocol - those need an Apple packet tunnel app
extension (NEPacketTunnelProvider) or an Android VpnService that implements the protocol and
moves every packet itself. If the user's server is WireGuard/OpenVPN, say so instead of writing
code that cannot work.
One profile per app. iOS's personal VPN and Android's provisioned profiles both allow exactly
one per app. SaveProfile replaces it; there is no list of profiles.
The OS owns the tunnel. It keeps running after the app is closed, appears in system VPN settings, and the user can turn it off or delete it there - so read the state, never cache it.
Every manager publishes VpnCapabilities. Branch on it. Anything unavailable throws
VpnNotSupportedException naming the exact limit.
| Capability | iOS / Mac Catalyst / macOS | Android 13+ (API 33) | Android 11-12 (API 30-32) | Android < 11 | Linux |
|---|---|---|---|---|---|
Profile / Connect / Disconnect | ✅ | ✅ | ✅ | ❌ | ✅ |
Status (state + StatusChanged) | ✅ | ✅ | ❌ | ❌ | ✅ |
SharedSecretAuthentication | ✅ | ✅ | ✅ | ❌ | ✅ |
UsernamePasswordAuthentication | ✅ | ✅ | ✅ | ❌ | ✅ |
CertificateAuthentication | ✅ | ✅ | ✅ | ❌ | ❌ (plugin reads key files only) |
ServerRootCertificate | ❌ (CA must come from a config profile) | ✅ | ✅ | ❌ | ✅ |
RemoteIdentifier ≠ server address | ✅ | ❌ | ❌ | ❌ | ✅ |
Without Status, Connect returns as soon as the OS accepts the start and GetStatus returns
VpnConnectionState.Unknown - there is no way to know whether it came up.
| Item | Value |
|---|---|
| GitHub | https://github.com/shinyorg/shiny |
| NuGet | Shiny.Net.Vpn, plus Shiny.Net.Vpn.Linux on Linux |
| Namespace | Shiny.Net.Vpn (types); Shiny (registration) |
| Platforms | iOS, Mac Catalyst, macOS, Android, Linux. No Windows and no tvOS target |
| Platform | Backed by |
|---|---|
| iOS / Mac Catalyst / macOS | NEVPNManager.shared + NEVPNProtocolIKEv2; secrets go into the app's keychain and are passed as persistent references |
| Android | VpnManager.provisionVpnProfile(Ikev2VpnProfile) - the OS's own client, not VpnService |
| Linux | NetworkManager over D-Bus, vpn.service-type = org.freedesktop.NetworkManager.strongswan |
builder.Services.AddVpn(); // IVpnManager, singleton
On Linux reference Shiny.Net.Vpn.Linux - it declares AddVpn(). The base package declares it only
on the platform targets, so the call never collides.
public class VpnSetup(IVpnManager vpn)
{
public async Task<bool> Install(string secret)
{
var result = await vpn.SaveProfile(new VpnProfile
{
Name = "Contoso VPN", // shown in Settings (Android shows the app name)
ServerAddress = "vpn.contoso.com",
LocalIdentifier = "[email protected]", // required on Android for PSK / certificate
Authentication = VpnAuthentication.SharedSecret(secret)
});
return result == AccessState.Available; // Denied = user declined the system prompt
}
}
Other authentication kinds:
VpnAuthentication.UsernamePassword("allan", password) // IKEv2 EAP-MSCHAPv2
VpnAuthentication.Certificate(File.ReadAllBytes("me.p12"), "p12-password")
AccessState.Denied; it does not throw.RemoteIdentifier defaults to ServerAddress. Only set it if the server's IKE ID differs - and
that throws VpnNotSupportedException on Android.ServerRootCertificate (DER or PEM bytes) is for a server certificate issued by a private CA.
It throws on Apple, where a private CA has to be installed through a configuration profile.try
{
await vpn.Connect(TimeSpan.FromSeconds(20)); // waits until Connected
}
catch (VpnConnectionException ex)
{
// ex.Message carries the OS's reason: authentication rejected, server not responding, ...
}
catch (VpnPermissionException)
{
// no profile saved (or the user deleted it in Settings / withdrew consent) - call SaveProfile
}
await vpn.Disconnect(); // waits briefly for the tunnel to go down
var state = await vpn.GetStatus(); // VpnConnectionState
vpn.StatusChanged += this.OnVpnStatus; // delivers the current state on subscribe
void OnVpnStatus(object? sender, VpnConnectionState state) { /* update UI - may be off the main thread */ }
// unsubscribe in Dispose - the native watcher is reference counted
VpnConnectionState: Unknown (no Status capability), NotConfigured, Disconnected,
Connecting, Connected, Reconnecting, Disconnecting.
await vpn.RemoveProfile(); // disconnects, deletes the profile and its stored secrets; no-op if none
Entitlements.plist:
<key>com.apple.developer.networking.vpn.api</key>
<array><string>allow-vpn</string></array>
Denied. A Denied on a first run that never showed a prompt means the entitlement is
missing.Status.AndroidPlatform.StartActivityForResult, so the host must forward
activity results (Shiny.Hosting.Maui does; Shiny.Hosting.Native through ShinyAndroidActivity).sudo apt install network-manager-strongswan (Debian/Ubuntu/Raspberry Pi OS) or
NetworkManager-strongswan (Fedora). SaveProfile throws naming the package when it is missing.org.freedesktop.NetworkManager.settings.modify.system,
…network-control): interactive on a desktop, a polkit rule for headless. A polkit refusal on save
returns AccessState.Denied.| Exception | Means |
|---|---|
VpnNotSupportedException | The platform cannot do this (see the matrix). Branch on Capabilities. |
VpnPermissionException | No profile saved, consent withdrawn, or polkit refused. |
VpnConnectionException | The tunnel failed or timed out - the message carries the OS's reason. |
VpnException | Base type; also storage/keychain/NetworkManager failures. |
Capabilities before offering certificate auth (not on Linux), a CA certificate (not on
Apple) or a custom remote identity (not on Android).SaveProfile from the foreground in response to a user action, and handle
AccessState.Denied - never assume it saved.GetStatus() or
StatusChanged.LocalIdentifier for shared-secret and certificate profiles if Android is a target.StatusChanged to the UI thread before touching UI.AddVpn() for a Windows head - there is no Windows target.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub shinyorg/skills --plugin shiny57 skills in this plugin
/localizegenGenerate strongly-typed localization classes from .resx resource files using Shiny.Extensions.Localization.Generator for .NET applications/shiny-accessorysetupGenerate code using Shiny.BluetoothLE.AccessorySetup - the system accessory pairing sheet for BLE devices (AccessorySetupKit on iOS 18+, CompanionDeviceManager on Android) with no MFi, no location prompt and no general Bluetooth prompt on iOS; picked accessories open as Shiny.BluetoothLE peripherals, and Android adds background presence (device appeared / disappeared) events/shiny-actorsGenerate code using Shiny.Actors — Orleans-style virtual actors without the ceremony, AOT/trim-clean, running anywhere .NET runs including .NET MAUI and Blazor WebAssembly. Covers actor interfaces and source-generated proxies, the ShinyActorBuilder (AddShinyActors), persistent state with ETags, named states and auto-save, event-sourced JournaledActor with snapshots, state and event migrations, typed streams (durable, implicit consumers), timers and persistent reminders (background jobs via Shiny.Jobs, on-time OS notifications via Shiny.Notifications), concurrency control ([Reentrant], [AlwaysInterleave], [ReadOnly], [StatelessWorker]), call filters and request context, OpenTelemetry traces and metrics, remoting over HTTP (Shiny.Net.HttpServer server, RemoteActorSystem client), mDNS discovery of actor servers, Shiny.DocumentDb storage (SQLite, PostgreSQL, IndexedDB...), and the ActorTestHost testing kit./shiny-agesignalsGenerate code using Shiny.AgeSignals to read the user's age range as the app store shares it - Apple Declared Age Range (iOS / macOS 26+) and Google Play Age Signals (Android) - for app store accountability laws (Texas SB 2420, Utah, Louisiana, California AB 1043) and age-gated features/shiny-aiconversationGenerate code for Shiny.AiConversation v3 - session-based AI conversations for .NET over Microsoft.Extensions.AI with persisted, resumable sessions (IAiSessionManager / IAiSession / IAiTurn), streaming replies, the built-in ask_user tool for typed questions and multiple-choice answers, interruption and supersession, usage and context-window pressure tracking, rolling context compaction, silent assistant memory, conversation search, session titles and long-term memory, session interceptors for tools and prompts, pluggable session/memory stores (in-memory or SQLite via Shiny.AiConversation.Stores.SqliteDocDb), and voice conversations via Shiny.AiConversation.Voice (wake word, push-to-talk, follow-up, quiet-word/barge-in interruption, sentence-streamed text-to-speech over Shiny.Speech, acknowledgement modes, sounds, voice selection tools), the MAUI chat UI via Shiny.AiConversation.Maui (AiChatView bound to a session with streaming bubbles, choice chips, push-to-talk and an AiMemoryView), image attachments with retention, and the use_camera tool via Shiny.AiConversation.Maui.Camera, and AG-UI via Shiny.AiConversation.AgUi (a session as an AG-UI event stream for the Shiny AgentView with ask_user questions as interrupts, the render_ui tool for A2UI surfaces, and a remote AG-UI agent as the chat client)/shiny-appdevicebridgeGenerate code using Shiny.AppDeviceBridge, device bridges on your app's own Shiny.Net.HttpServer that also host a web app (Blazor WebAssembly, React, Vue, any static build) inside a .NET MAUI app on Android, iOS, Mac Catalyst, Windows and the maui-labs macOS and Linux heads — served from a loopback HTTP server, updated over the air from a signed release server, GitHub releases or a provider of your own, and given device access through bridges with typed C# and TypeScript clientsOther plugins' skills for the same job