scrcpy-mcp: Skill for OpenCode

.opencode/skills/scrcpy-gotchas/SKILL.md

scrcpy-gotchas is a skill for OpenCode from JuanCF/scrcpy-mcp. It costs 48 tokens per session (5,676 once invoked), scanned A, original, MIT.

A troubleshooting guide for controlling Android devices through scrcpy, a tool that mirrors and accepts input from an Android device. It explains how to use the device's native screen coordinates.

In plain words
What is it for?
Use it when finding Android interface elements, taking screenshots, tapping, swiping, scrolling, typing, pressing keys, or starting apps through scrcpy-mcp tools.
Why use it?
It prevents taps and swipes from landing in the wrong place when screenshots have been resized. It also documents common mistakes in scrcpy-based automation.

Skill for OpenCode

Written for OpenCode: installed under .opencode/. Also seen: mentions Claude Code.

This is JuanCF/scrcpy-mcp's own configuration. It tells OpenCode how to work on scrcpy-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything scrcpy-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to JuanCF/scrcpy-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/JuanCF/scrcpy-mcp/main/.opencode/skills/scrcpy-gotchas/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/JuanCF/scrcpy-mcp

Made for: OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for scrcpy-gotchas

README.md
[![agentmods](https://agentmods.dev/badge/skills/juancf/scrcpy-mcp/scrcpy-gotchas/github.svg)](https://agentmods.dev/skills/juancf/scrcpy-mcp/scrcpy-gotchas)
Your own site
<a href="https://agentmods.dev/skills/juancf/scrcpy-mcp/scrcpy-gotchas"><img src="https://agentmods.dev/badge/skills/juancf/scrcpy-mcp/scrcpy-gotchas/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for scrcpy-gotchas

Your own site · 80×15
<a href="https://agentmods.dev/skills/juancf/scrcpy-mcp/scrcpy-gotchas"><img src="https://agentmods.dev/badge/skills/juancf/scrcpy-mcp/scrcpy-gotchas.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,676 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.05676
Opus 5 $0.00024 $0.02838
Sonnet 5 $0.00010 $0.01135
Haiku 4.5 $0.00005 $0.00568

Measured 9d ago against content hash be75ce374bb8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

scrcpy-gotchas scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.opencode/skills/scrcpy-gotchas/SKILL.md · 375 lines

How it starts

The opening of the file, as written. The whole thing — 375 lines — stays where its author put it; the contents beside it link to each section on GitHub.

scrcpy-mcp Gotchas

Coordinate systems: always use native coordinates

scrcpy_tap, scrcpy_swipe, scrcpy_long_press, and scrcpy_scroll take device-native coordinates — the same space that scrcpy_ui_dump / scrcpy_ui_find_element report in their bounds and tapX/tapY, and the same space adb shell input tap uses. So the reliable workflow needs no scaling math:

// Find the element (returns native tapX/tapY), then tap them straight through
const el = scrcpy_ui_find_element({ text: "<label>" })  // → { tapX, tapY }
scrcpy_tap({ x: el.tapX, y: el.tapY })

The input tools scale native → video-frame coordinates internally before sending the touch to the scrcpy server, so you never compute a scale factor yourself.

Don't tap screenshot pixels

scrcpy_screenshot returns a downscaled image (e.g. 576×1024 at maxSize=1024), not the native frame. Tapping a pixel coordinate read off the screenshot lands in the wrong place. Always source coordinates from ui_dump / ui_find_element (native), never from the screenshot.

Why internal scaling is required: the scrcpy server's touch protocol is not resolution-independent — the touch message's screen size must exactly match the encoder's video-frame size, or the server silently drops the event. The tools handle this conversion; you just supply native coords.

ui_find_element matching rules

The four search criteria have different matching behaviors:

Criterion Match type Case sensitivity
text Partial substring (includes) Case-insensitive
contentDesc Partial substring (includes) Case-insensitive
resourceId Exact equality (===) Case-sensitive
className Exact equality (===) Case-sensitive

All criteria are combined with AND logic — an element must satisfy every supplied criterion.

// text: case-insensitive substring — "bater" matches "Batería"
scrcpy_ui_find_element({ text: "bater" })  // ✓

// resourceId: exact match only — must be full string
scrcpy_ui_find_element({ resourceId: "android:id/title" })  // must match exactly

// className: full qualified name — "Button" won't match "android.widget.Button"
scrcpy_ui_find_element({ className: "android.widget.Button" })  // full name required

Read the full file on GitHub · 375 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 375 lines · 48 tokens per session scan A be75ce374bb8

Subscribe to this mod's changes

scrcpy-gotchas is a skill published in the GitHub repository JuanCF/scrcpy-mcp (91 stars, last pushed 18d ago), licensed MIT. It adds 48 tokens to every session and 5,676 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

crash-triage

Using logcat to surface the real "Caused by:" root cause hidden behind a generic UI error, plus app lifecycle tools for reproducing failures. Use when an app crashes, shows a generic error dialog, or a task needs to find why a native call failed.

iksnerd/adb-mcp · 60 tokens

scrcpy-mcp

Professional Android automation agent for device interaction, UI testing, and app management. Use for: (1) interacting with Android apps, (2) filling inputs, (3) structural UI inspection via XML/axtree, (4) complex multi-step mobile tasks. Prefer XML/axtree over screenshots — images are expensive tokens.

1999AZZAR/scrcpy-mcp · 71 tokens

flog-inspect

Use when a user asks an agent to inspect Flutter app logs, network traffic, SSE/WebSocket streams, current page state, screenshots, or debugging context through flog instead of copying from the TUI.

shaominngqing/flog · 45 tokens

rn-agent-observer

Runtime observability for React Native/Expo apps on Android. Use when debugging RN UI, performance (FPS, JS blocking), network, re-renders, or runtime errors on a running app — understand the current screen and UI findings, capture screenshots, UI trees, ref snapshots, per-request network, CDP console/heap/CPU…

GinzaTech/rn-agent-observer · 102 tokens

rn-expo

The RN/Expo dev-build recipe for adb-mcp — adbreverse before launching (or the dev client silently runs its embedded bundle), appstate to confirm it is on Metro, on the RIGHT Metro, and not serving stale JavaScript after a git checkout, then reloadapp. Use whenever driving a React Native or Expo dev build, or when…

iksnerd/adb-mcp · 84 tokens

driving

The core observe→locate→act→re-observe loop for driving an Android UI with adb-mcp — true-pixel coordinates, and gotchas like overlays eating taps, keyboards covering buttons, and settle delays. Use whenever tapping, swiping, typing, or otherwise interacting with an Android screen.

iksnerd/adb-mcp · 64 tokens