---
name: desktop-volume-control-windows
description: Set Windows desktop output volume to an exact 0–100% value from an authorized LLM command, with immediate audio readback and no UI automation.
version: 1.0
platform: windows
---

# Desktop Volume Control for Windows via LLM Commands

**Say a percentage. Set that percentage. Confirm it.**

For example: `set desktop volume to 42%`, `volume 15`, or `turn Windows volume to 70` means **set the current desktop speaker master volume to exactly that percentage**. It does not mean increase, decrease, or scale by that amount.

## Fast path

1. Parse a single integer `percent` from 0 through 100, inclusive. Reject anything outside that range. A command without a clear percentage needs clarification.
2. Use the user's previously authorized, device-scoped local execution channel to run `scripts/set-desktop-volume.ps1` with `-Percent <percent>` **once**. The channel must already be configured; this skill does not grant a chatbot remote machine access or authorization.
3. Check the same job's terminal result. Report success only when the script exits successfully and returns `readback_verified: true` with `after_percent` equal to the requested percentage (within the documented 1-point audio-scalar tolerance). Otherwise report the actual error.

No pre-read, percentage arithmetic, volume mixer, mouse/keyboard input, UI focus changes, downloads, registry edits, external PowerShell module, or secondary LLM pass is needed. The script uses Windows Core Audio on the selected device's default multimedia output, performs the set and readback in one call, and keeps mute state unchanged.

### Example approved local invocation

```powershell
pwsh -NoProfile -NonInteractive -File .\scripts\set-desktop-volume.ps1 -Percent 42
```

Connect this **fixed script and numeric parameter** to an approved local task/connector in your LLM host. Do not expose arbitrary shell commands, credentials, public unauthenticated execution endpoints, or unrestricted device selection to the model.

## Boundaries

- Only control the currently authorized Windows desktop audio endpoint; do not assume access to another person's computer.
- 0–100 is an **absolute endpoint master level**, not per-app volume or a microphone setting.
- A queued job or accepted request is not completion. Require the local execution receipt.
- Keep machine hostnames, usernames, credentials, fleet identifiers, and private execution infrastructure out of public logs.
- Other operating systems require their own reviewed local adapters rather than pretending the Windows implementation is universal.

## Included code

`scripts/set-desktop-volume.ps1` is a self-contained Windows PowerShell / Core Audio COM adapter. It calls `IAudioEndpointVolume.SetMasterVolumeLevelScalar` once, performs a same-call readback, and outputs compact JSON for the invoking assistant. Nothing executes merely by reading or installing this Markdown skill.
