shinyorg/shiny/shiny-screenrecorder

Claude Code and agent skill by shinyorg/shiny

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Generate code using Shiny.ScreenRecorder for cross-platform screen recording - capturing the screen to an MP4 with optional microphone and system audio, choosing a display or window, pausing and resuming, and handling the OS ending a recording on its own, on Android, iOS, Mac Catalyst, macOS, Windows, Linux, and Blazor WebAssembly

Install

npx vskill@latest install shinyorg/shiny/shiny-screenrecorder

SKILL.md

The same SKILL.md was published earlier as shinyorg/shiny/shiny-screenrecorder.

Shiny.ScreenRecorder Skill

You are an expert in Shiny.ScreenRecorder, a cross-platform screen recording library covering video capture to a file, microphone and system audio, display/window selection, pause and resume, and the OS ending a recording without being asked.

When to Use This Skill

Invoke this skill when the user wants to:

  • Record the screen (or their app's screen) to a video file
  • Attach a screen recording to a bug report or support ticket
  • Record a demo, tutorial or session replay from inside an app
  • Capture the microphone, the app's own audio, or the machine's audio alongside video
  • Let the user pick which display or window to record
  • Pause and resume a recording
  • Handle the user or the OS stopping a recording partway through
  • Ask why screen recording "only records my own app on iPhone"

⚠️ Read this before writing anything

What "the screen" means is not the same on every platform, and the difference is visible to users. Three facts decide most of the design:

  1. iOS and Mac Catalyst record your own app's UI only. ReplayKit's in-app path is all a NuGet

package can offer - system-wide capture needs a Broadcast Upload Extension, which is a second app target the consumer must create. Never tell a user their iPhone app can record other apps.

  1. Windows has no audio at all. Windows.Graphics.Capture captures pixels and nothing else.

Asking for IncludeMicrophone or IncludeSystemAudio there throws.

  1. Capabilities differ within a platform, not just between them. macOS 15 gains microphone

capture and loses pause; macOS 12.3-14 is the other way round. Read recorder.Capabilities off the instance at runtime. Never infer it from the target framework.

A request asking for something outside Capabilities throws ScreenRecorderNotSupportedException before any native call happens - by design, because a recording that silently came out without the microphone is worse than one that refused to start. Branch on the flags.

Capability matrix

AndroidiOS / Mac CatalysttvOSmacOS 15+macOS 12.3-14WindowsLinuxBlazor WASM
What is recordedsystem screenthis app onlythis app onlysystem screensystem screensystem screensystem screenuser's pick
Record✅✅✅✅✅✅✅✅
Pause / Resume✅✅ synth✅ synth❌✅ synth✅ synth❌✅ native
Microphone✅✅❌ no mic✅❌❌✅✅
System audio✅ API 29+ (app audio)✅ (app audio)✅ (app audio)✅✅❌✅⚠️ Chromium, tab only
Pick a display❌❌❌✅✅✅portal pickerbrowser picker
Pick a window❌❌❌✅✅✅portal pickerbrowser picker
Hide the cursor❌❌❌✅✅✅✅❌
Frame rate✅❌❌✅✅✅✅✅
Bitrate✅✅✅✅✅✅✅✅
Downscale✅✅✅✅✅✅✅✅
Result has a file path✅✅✅✅✅✅✅❌ null

tvOS is the same ReplayKit implementation as iOS. The only difference is the microphone: an Apple TV has none, RPScreenRecorder carries no MicrophoneEnabled on tvOS, so ScreenRecorderCapabilities.Microphone is not advertised and IncludeMicrophone = true is rejected by request validation. Never generate a tvOS recording request that sets it.

The four things users most often ask for that cannot be done
  1. Recording other apps from an iPhone app. ReplayKit's in-app capture is scoped to your own

process. The only route to the system screen is a Broadcast Upload Extension target, which this package does not ship. Do not suggest a workaround; there isn't one.

  1. Audio on Windows. Windows.Graphics.Capture has no audio path. Adding it means a

hand-written WASAPI loopback capture, which this library does not do. Capabilities reports neither audio flag on Windows.

  1. Hiding the Android cast indicator or the Windows 11 capture border. Both are OS-drawn

recording indicators and neither is suppressible from a normal app. This is deliberate on the platforms' part and the library does not try to work around it.

  1. Silently starting a recording. Every platform except iOS-recording-itself puts a consent

step in front of it - Android's dialog, macOS's TCC grant, the Linux portal picker, the browser picker. There is no unattended screen recording here.

Library Overview

ItemValue
GitHubhttps://github.com/shinyorg/shiny
NuGetShiny.ScreenRecorder (its net11.0 build holds the Blazor WebAssembly recorder - Shiny.ScreenRecorder.Blazor no longer exists), plus Shiny.ScreenRecorder.Linux on Linux
NamespaceShiny.ScreenRecorder (types); Shiny (registration extensions)
PlatformsAndroid, iOS, Mac Catalyst, macOS, Windows, Linux, Blazor WebAssembly
How each platform is backed
PlatformCaptureEncoder
AndroidMediaProjection → VirtualDisplayMediaCodec (H.264 surface + AAC) → MediaMuxer
iOS / Mac CatalystRPScreenRecorder.startCaptureAVAssetWriter
macOS 15+SCStreamSCRecordingOutput (ScreenCaptureKit writes the file)
macOS 12.3-14SCStream + ISCStreamOutputAVAssetWriter
WindowsDirect3D11CaptureFramePoolMediaStreamSource → MediaTranscoder
Linuxxdg-desktop-portal ScreenCast → PipeWiregst-launch-1.0, or ffmpeg -f x11grab
Blazor WASMgetDisplayMediaMediaRecorder
plain .NETnone - every call throwsnone

Android uses MediaCodec rather than the much simpler MediaRecorder for one reason: MediaRecorder.setAudioSource takes a single source and playback capture is not one of them, so app audio is only reachable through AudioRecord + AudioPlaybackCaptureConfiguration. Wanting app audio at all forces the whole pipeline down.

Registration

csharp
builder.Services.AddScreenRecorder(); // IScreenRecorder, singleton

Same call everywhere except Linux. On net11.0, AddScreenRecorder() registers the browser recorder behind OperatingSystem.IsBrowser() and the not-supported recorder anywhere else. On Linux, reference `Shiny.ScreenRecorder.Linux` and call `builder.Services.AddLinuxScreenRecorder()` instead - it is a separate package so its Tmds.DBus.Protocol dependency never reaches a WebAssembly app.

On a plain .NET host - a server, console or test project with no screen - AddScreenRecorder() (or AddNotSupportedScreenRecorder()) registers the recorder that reports ScreenRecorderCapabilities.None.

Platform setup

Android - AndroidManifest.xml:

xml
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />
<uses-permission android:name="android.permission.RECORD_AUDIO" /> <!-- only if capturing audio -->

The foreground service and the consent activity are in the package and merge into your manifest automatically. From Android 14 the service must be running before the projection is obtained; the library does that ordering for you.

The consent dialog asks for the entire screen. From Android 14 the system can offer "a single app" instead and preselects it; with no Target set the request is documented as the primary display, so the library asks Android for exactly that and the app picker never appears.

The foreground service shows a notification for the whole recording - "Screen recording" with a Stop action by default. Stop ends the recording exactly like the system's own stop control: Faulted fires with RevokedByUser and carries the finished file, so handle it the same way. To reword it (for example into the app's language), register an IScreenRecordingNotificationDelegate - it receives the builder with the defaults already applied:

csharp
#if ANDROID
public class RecordingNotification(AndroidPlatform platform) : IScreenRecordingNotificationDelegate
{
// relabelling Stop means dropping the default action and adding your own with the library's intent
public void Configure(NotificationCompat.Builder builder) => builder
.SetContentTitle("Bildschirmaufnahme")!
.SetContentText("Die Aufnahme läuft")!
.ClearActions()!
.AddAction(0, "Beenden", platform.GetScreenRecordingStopIntent());
}
// next to AddScreenRecorder()
builder.Services.AddSingleton<IScreenRecordingNotificationDelegate, RecordingNotification>();
#endif

iOS / Mac Catalyst - no entitlement to record your own app. Add NSMicrophoneUsageDescription to Info.plist if using the microphone. The app must be in the foreground.

macOS - the Screen Recording grant in System Settings. RequestAccess prompts for it, but macOS only applies a new grant on the next launch - the first RequestAccess after the user approves still reports Denied, and you must tell them to restart the app. Add NSMicrophoneUsageDescription, and com.apple.security.device.audio-input when sandboxed.

Windows - Windows 10 1903 or later. Packaged apps declare the graphicsCapture capability.

Linux - a desktop session with xdg-desktop-portal implementing ScreenCast, plus gstreamer1.0-tools gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-pipewire, or ffmpeg on X11. Audio needs pactl. Flatpak sandboxes are not supported. All of this is probed at runtime - a machine missing the pieces reports ScreenRecorderCapabilities.None. When GStreamer is installed but no portal is running, an X11 session with ffmpeg falls back to x11grab (whole display, no picker) - except for a request with IncludeSystemAudio, which only the GStreamer path can record.

Blazor WebAssembly - HTTPS (or localhost) and a user gesture. getDisplayMedia is refused from OnInitializedAsync; it must run from a button click. In an iframe, add allow="display-capture; microphone".

The basic recording

csharp
public class BugReportRecorder(IScreenRecorder recorder, ILogger<BugReportRecorder> logger)
{
IScreenRecording? session;
public async Task Start(CancellationToken ct)
{
var request = new ScreenRecordingRequest
{
// null lets the library name a file in the platform cache directory
OutputPath = null,
IncludeMicrophone = recorder.Capabilities.HasFlag(ScreenRecorderCapabilities.Microphone),
MaxWidth = 1280, // a phone screen at native resolution is enormous
MaxDuration = TimeSpan.FromMinutes(2)
};
var access = await recorder.RequestAccess(request, ct);
if (access is AccessState.Denied or AccessState.NotSupported)
throw new InvalidOperationException("Screen recording is not available");
// does not return until frames are genuinely being written - the consent dialog, the
// compositor picker and the Android foreground service all complete first
this.session = await recorder.Start(request, ct);
this.session.Faulted += (_, e) =>
logger.LogWarning("The recording ended on its own: {Reason}", e.Reason);
}
public async Task<ScreenRecordingResult> Stop(CancellationToken ct)
{
var result = await this.session!.Stop(ct);
this.session = null;
return result;
}
}

`MaxWidth` is worth setting on almost every recording. A modern phone or Retina display at native resolution produces very large files for very little visible gain.

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 reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/shinyorg/shiny/shiny-screenrecorder/badge)](https://verified-skill.com/skills/shinyorg/shiny/shiny-screenrecorder)

Something wrong with this skill or its page? Tell us.