ohos-scrcpy-app: Instructions file for Codex

AGENTS.md

ohos-scrcpy-app AGENTS.md is an instructions file for Codex, OpenCode from guoxiucai/ohos-scrcpy-app. It costs 3,413 tokens per session, scanned A, original, MIT.

A repository instruction file for coding agents working on an OpenHarmony screen-mirroring and device-debugging project. It explains the project structure, communication rules, fixed design choices, and delivery checks.

In plain words
What is it for?
Use it when modifying this repository, especially when working across the OpenHarmony device service and Flutter desktop client, or when reporting changes and tests.
Why use it?
It gives an agent project-specific rules instead of making it guess how the code is organised or what changes are safe. It also helps prevent unrelated edits and unreported verification.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

This is guoxiucai/ohos-scrcpy-app's own configuration. It tells Codex and OpenCode 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 →

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/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/guoxiucai/ohos-scrcpy-app

Made for: Codex, 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 ohos-scrcpy-app AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/guoxiucai/ohos-scrcpy-app/agents-md"><img src="https://agentmods.dev/badge/instructions/guoxiucai/ohos-scrcpy-app/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,413 This file is loaded in full into every session.
When invoked 3,413 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.03413 $0.03413
Opus 5 $0.01707 $0.01707
Sonnet 5 $0.00683 $0.00683
Haiku 4.5 $0.00341 $0.00341

Measured today against content hash 7246273234a0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-16, from the pricing page.

Security

Grade A, and why

ohos-scrcpy-app AGENTS.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 today.

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.

AGENTS.md · 257 lines

How it starts

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

AGENTS.md

本文档用于约束在本仓库中工作的 AI 编码代理。所有操作应以当前代码、构建配置和用户要求为准;README.mddocs/ 用于补充背景。当文档与代码不一致时,先核对实际配置和实现,不要直接照搬历史结论。

沟通与交付

  • 始终使用简体中文沟通,包括回复、代码注释、文档和提交信息。
  • 开始修改前先阅读相关实现、配置和设计文档,避免凭经验猜测 OpenHarmony 或平台 API。
  • 只修改任务所需文件,保留用户已有的未提交改动,不清理或覆盖无关变更。
  • 完成后说明修改内容、验证命令与验证结果;未执行的验证及原因也要明确说明。
  • 未经用户明确要求,不提交、不推送、不发布、不部署,也不改签名材料和版本号。

项目概览

鸿镜(HongJing)是 OpenHarmony 设备投屏与 HDC 调试工具,由两个子工程组成:

  1. scrcpy_server/:运行在 OpenHarmony 设备上的系统 HAP。
  2. scrcpy_client_flutter/:运行在 macOS/Windows 上的 Flutter 桌面客户端,Linux 为后续目标。

客户端通过系统或应用内置的 hdc 执行设备发现、安装、卸载、shell 和端口转发。投屏连接固定使用:

客户端 -> hdc fport tcp:<本机端口> tcp:53535
       -> 127.0.0.1:<本机端口>
       -> 设备端 127.0.0.1:53535

视频流、心跳、设备状态和控制消息均复用该 TCP 通道,不增加设备 LAN 直连方案。

目录与职责

.
├── scrcpy_server/
│   ├── AppScope/app.json5                 # bundle、版本、keepAlive
│   ├── build-profile.json5                # SDK、产品与签名配置
│   └── entry/
│       ├── build-profile.json5            # NAPI/CMake、ABI、产物名
│       └── src/main/
│           ├── module.json5               # Ability、权限、mainElement
│           ├── ets/
│           │   ├── scrcpyservice/         # 服务生命周期、协议、输入和应用列表
│           │   ├── hapinstaller/          # HAP 安装 Ability
│           │   ├── entryability/          # 调试/授权 UI 入口
│           │   └── pages/                 # ArkUI 页面
│           └── cpp/                       # TCP、截屏、编码、NAPI 桥接
├── scrcpy_client_flutter/
│   ├── lib/
│   │   ├── hdc/                           # hdc 路径解析与命令封装
│   │   ├── net/                           # TCP 客户端与协议编解码
│   │   ├── decoder/                       # MethodChannel 解码抽象
│   │   ├── state/app_state.dart           # 客户端中央状态与业务编排
│   │   ├── terminal/                      # PTY 终端
│   │   └── ui/                            # Flutter UI
│   ├── macos/Runner/VideoDecoderPlugin.swift
│   ├── windows/runner/                    # D3D11/MFT/CPU 解码与纹理插件
│   ├── bundled_tools/                     # 打包时内置的 hdc 及依赖
│   ├── third_party/xterm/                 # 本地依赖,非任务需要不改
│   └── scripts/                           # macOS/Windows 打包脚本
├── docs/                                  # 架构、平台方案和踩坑记录
├── spec_doc/                              # 需求与开发过程记录
└── openspec/                              # OpenSpec 配置

Read the full file on GitHub · 257 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. today First seen · 257 lines · 3,413 tokens per session scan A 7246273234a0

Subscribe to this mod's changes

ohos-scrcpy-app AGENTS.md is an instructions file published in the GitHub repository guoxiucai/ohos-scrcpy-app (18 stars, last pushed 1mo ago), licensed MIT. It adds 3,413 tokens to every session, about $0.0171 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-09-15.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 8,838 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,126 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens