---
name: rdp-cli-agent
description: Operate remote RDP or VNC desktops through rdp-cli commands, using remote screenshots, input, clipboard and supported file transfers. Use for remote application tasks with rdp-cli, including result verification and command recovery; local application tasks alone do not require this skill.
---

# Remote tasks with rdp-cli

Prefer the existing CLI for remote work. It receives remote frames and sends
protocol input directly; opening a local window or browser is not a prerequisite.
Use the executable supplied by the user or available on PATH. Consult
`rdp-cli --help` and `<command> --help` for the installed version's exact options.

## Observe, act, verify

- Connect to the authorized target or use the specified existing session. Keep
  `data.session` explicitly; do not guess a target from the most recent session.
  Use provided credentials/stdin/credential references without putting secrets
  in saved examples or reports. Read `status` and negotiated capabilities.
- Run `screenshot --session SESSION --out PATH`. Read the returned PNG with an
  image-reading tool and inspect `data.observation` and coordinate metadata.
  Coordinates refer to remote pixels, not the position of a local viewer.
- Select `click`, `move`, `scroll`, `drag`, `type` or `key` for the task. Supply
  the observation and explicit desktop/monitor coordinates where required.
  Use `type` for text, `key` for shortcuts, explicit `clipboard` operations when
  clipboard use is intended, and `files` for the RDP exchange drive.
- Capture a new image or query the appropriate result to confirm the actual
  effect. `sent` means input was dispatched, not that the remote task succeeded.
  A Welcome/login frame may accept input; do not add an Explorer-ready gate.

Example after connecting (substitute actual values):

```sh
rdp-cli status --session SESSION
rdp-cli screenshot --session SESSION --out /tmp/remote-before.png
# Read the PNG; choose coordinates and copy data.observation.
rdp-cli click --session SESSION --desktop --x 420 --y 315 --observation OBSERVATION
rdp-cli screenshot --session SESSION --out /tmp/remote-after.png
# Read the new PNG and verify the remote effect.
```

Use a writable local output path appropriate to the client OS. RDP and VNC use
these same observation/input commands, but capabilities differ. VNC has no file
exchange, audio, microphone or active monitor-layout support. Unicode input and
clipboard support depend on the server/application; do not equate successful
submission with correct displayed text.
RDP types at about 20 characters/second plus overhead to accommodate Windows
text controls. For long text, set an adequate `--timeout-ms` before submission
or choose explicit clipboard paste when permitted; never blindly replay a
timed-out text operation.

## Recover according to the result

- **Stale observation:** obtain and read a new screenshot, then reconsider the
  action. Connection, control and topology changes invalidate observations.
- **Human takeover/pause:** stop input and report the state. Wait for explicit
  return of control; do not automatically resume or use another viewer to win
  control back. After authorized resume, take a new screenshot.
- **Timeout/unknown input result:** query `operations status` with the original
  request/operation ID and observe the screen before deciding whether to retry.
  A timeout is not proof of non-execution. Reuse an ID only for the identical
  request within the supported window; never replay a whole partial operation.
- **Queued transfer:** use `files status --session SESSION --transfer-id ID`
  until a terminal result, and verify content/hash when needed. A file existing
  or a command returning ok does not mean the transfer is complete.
- **Capability unavailable:** inspect status and choose an appropriate supported
  command alternative or report the limitation. Opening a viewer does not add
  a missing protocol capability.

## Human observation and other tools

When a person wants to watch, use `watch --session SESSION --viewer window`
or `watch --session SESSION --viewer web`, or direct them to the tray/menu bar. These viewers
share the session and start read-only. Continue ordinary remote automation with
CLI commands; respect explicit human takeover and return.

Computer-use remains useful for local applications, viewer diagnosis, explicit
GUI tasks, or a justified fallback. Before switching to a path that affects the
local desktop, explain the reason and impact and follow existing user
authorization; this skill adds no unconditional confirmation requirement.
First diagnose a command failure instead of automatically switching to GUI.
Do not use a different tool to bypass control or access checks.

This is task guidance, not a tool sandbox. It neither disables computer-use nor
changes host permissions, and installation is optional.
