ohos-scrcpy-app: Instructions file for Claude Code

CLAUDE.md

ohos-scrcpy-app CLAUDE.md is an instructions file for Claude Code from guoxiucai/ohos-scrcpy-app. It costs 2,446 tokens per session, scanned A, original, MIT.

A repository instruction file for an OpenHarmony screen-mirroring and device-control application. It documents the Flutter desktop client, the device-side service, the communication protocol, and rules such as using Simplified Chinese and preserving fixed design decisions.

In plain words
What is it for?
Use it when modifying screen streaming, touch or key input, HAP installation, device commands, the HDC connection, or the Flutter desktop interface.
Why use it?
It gives coding agents the technical context needed to change this multi-part application without breaking its device connection or changing agreed architecture.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md.

This is guoxiucai/ohos-scrcpy-app's own configuration. It tells Claude Code how to work on ohos-scrcpy-app 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 ohos-scrcpy-app configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/qingwei/Library/OpenHarmony/Sdk/20/ets/api/.

Reuse

Borrowing it

Nothing to install: this file belongs to guoxiucai/ohos-scrcpy-app. 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/guoxiucai/ohos-scrcpy-app/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/guoxiucai/ohos-scrcpy-app

Made for: Claude Code.

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 ohos-scrcpy-app CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/guoxiucai/ohos-scrcpy-app/claude-md/github.svg)](https://agentmods.dev/instructions/guoxiucai/ohos-scrcpy-app/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/guoxiucai/ohos-scrcpy-app/claude-md"><img src="https://agentmods.dev/badge/instructions/guoxiucai/ohos-scrcpy-app/claude-md/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 ohos-scrcpy-app CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/guoxiucai/ohos-scrcpy-app/claude-md"><img src="https://agentmods.dev/badge/instructions/guoxiucai/ohos-scrcpy-app/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,446 This file is loaded in full into every session.
When invoked 2,446 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.02446 $0.02446
Opus 5.5 $0.00978 $0.00978
Sonnet 5.5 $0.00489 $0.00489
Haiku 4.5 $0.00245 $0.00245

Measured 1mo ago against content hash e92d66231b7f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ohos-scrcpy-app CLAUDE.md 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 1mo 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.

CLAUDE.md · 133 lines

How it starts

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

CLAUDE.md

OpenHarmony 设备投屏 + HDC 调试工具。Flutter 桌面客户端通过 hdc fport 端口转发与设备上常驻的 OpenHarmony 系统服务通信,实时镜像屏幕并提供触控注入、HAP 安装、HAP卸载、亮度/音量、模拟终端、功能键模拟等控制功能。

沟通规则

  • 永远使用简体中文沟通,包括所有回复、注释、提交信息等。

仓库结构

ohos-scrcpy-app/
├── scrcpy_server/             # OpenHarmony 系统应用(ServiceExtension 主体)
│   ├── AppScope/app.json5     # bundleName=com.ohos.scrcpy.server,配置 keepAlive
│   └── entry/src/main/
│       ├── module.json5       # mainElement=ScrcpyService(不是 EntryAbility)
│       ├── ets/
│       │   ├── scrcpyservice/ # 业务全部在此:ScrcpyService、TcpServer、ScreenPipeline、InputInjector、Protocol
│       │   ├── entryability/  # 仅做调试 UI 入口,不写业务
│       │   └── pages/         # 调试页:服务状态、监听端口
│       └── resources/base/element/string.json
├── scrcpy_client_flutter/     # Flutter 桌面客户端(macOS/Windows,Linux 后续)
│   ├── lib/
│   │   ├── hdc/               # 调用系统 hdc CLI(list/fport/install/shell)
│   │   ├── net/               # 协议编解码 + TCP 客户端
│   │   ├── decoder/           # MethodChannel 'scrcpy/decoder' 抽象
│   │   ├── state/app_state.dart
│   │   └── ui/                # top_bar / mirror_view / sidebar / split_view
│   ├── macos/Runner/VideoDecoderPlugin.swift   # VideoToolbox + FlutterTexture
│   ├── windows/runner/video_decoder_plugin.*   # MFT stub,待补
│   └── scripts/               # package_mac.sh (dmg) / package_win.ps1 (Inno Setup)
└── docs/design.md         # 项目设计文档

关键技术决策(已与用户对齐,勿擅自改动)

  • HDC 调用方式:客户端 Process.run 调系统 hdc CLI,优先内置 hdc 二进制文件,其次本机 hdc PATH。
  • 视频解码:平台原生硬解(macOS VideoToolbox / Windows MediaFoundation),通过 MethodChannel + Flutter Texture 上屏。不用 media_kit / fvp / ffi+ffmpeg。
  • 传输通道:仅 hdc fport tcp:<pcPort> tcp:53535,USB/网络 hdc 共用同一通道,不做设备 LAN 直连。
  • 服务端保活与自启:完全交给 app.json5 中已配置的 keepAlive,不写 BootReceiver/StaticSubscriber,不申请 MANAGE_APP_KEEP_ALIVE / RECEIVER_STARTUP_COMPLETED。
  • mainElement:module.json5 的 mainElement 必须指向 ScrcpyService(ServiceExtensionAbility),UIAbility 仅作调试 UI 入口,不放业务逻辑。
  • API 区间:compatibleSdkVersion: 15,compileSdkVersion: 23。

Read the full file on GitHub · 133 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. 1mo ago First seen · 133 lines · 2,446 tokens per session scan A e92d66231b7f

Subscribe to this mod's changes

ohos-scrcpy-app CLAUDE.md is an instructions file published in the GitHub repository guoxiucai/ohos-scrcpy-app (20 stars, last pushed 22d ago), licensed MIT. It adds 2,446 tokens to every session, about $0.0098 per session on Opus 5.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-09-15.

Related

ohos-scrcpy-app CLAUDE.md compared with instructions from other repositories

ohos-scrcpy-app CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ohos-scrcpy-app CLAUDE.mdguoxiucai/ohos-scrcpy-appInstructions file2022d agoMITA2,446Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode