ThumbAgent AGENTS.md

ThumbAgent AGENTS.md is an instructions file for Codex, OpenCode from LiuShiYi1027/ThumbAgent. It costs 1,472 tokens per session, scanned A, original, Apache-2.0.

A repository instruction file for ThumbAgent, an Android-focused local AI-to-device project. It defines required reading, product boundaries, architecture rules, and a contract-first development process.

In plain words
What is it for?
Guiding work on ThumbAgent features, contracts, skills, persistence, execution behaviour, errors, and architecture while preserving the repository’s rules.
Why use it?
It tells coding agents how to work in the repository and which changes are outside the current product scope.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/liushiyi1027/thumbagent/agents-md
Clone the repo
git clone --depth 1 https://github.com/LiuShiYi1027/ThumbAgent

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 ThumbAgent AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/liushiyi1027/thumbagent/agents-md.svg)](https://agentmods.dev/instructions/liushiyi1027/thumbagent/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/liushiyi1027/thumbagent/agents-md"><img src="https://agentmods.dev/badge/instructions/liushiyi1027/thumbagent/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,472 This file is loaded in full into every session.
When invoked 1,472 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.01472 $0.01472
Opus 5 $0.00736 $0.00736
Sonnet 5 $0.00294 $0.00294
Haiku 4.5 $0.00147 $0.00147

Measured 4d ago against content hash 0efcb88bd4e2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ThumbAgent 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 4d 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.

AGENTS.md · 163 lines

How it starts

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

ThumbAgent Agent Guide

本文件适用于整个仓库。子目录存在更具体的 AGENTS.md 时,子目录规则在其作用域内优先。

1. 开始工作前

必须依次阅读:

  1. README.md
  2. docs/product/positioning.md
  3. docs/product/solution-v1.md
  4. docs/architecture/technical-design-v1.md
  5. docs/engineering/development.md
  6. docs/iterations/README.md
  7. docs/engineering/iteration-process.md
  8. 与任务相关的迭代文档、目录级 AGENTS.md 和 ADR

修改 Contract、Skill、持久化、执行语义或错误体系时,还必须阅读对应专项规范:

  • docs/engineering/contract-versioning.md
  • docs/architecture/capability-model.md
  • docs/engineering/skill-development.md
  • docs/architecture/reliability-model.md
  • docs/engineering/data-migrations.md
  • docs/engineering/error-handling.md

开始修改前必须检查工作区状态。已有修改可能属于用户或其他 Agent,不得覆盖、回滚或顺手重构。

2. V1 边界

V1 目标是完成单台 Android 设备的本地 AI-to-Device 闭环:设备发现、Observation、基础动作、Skills、任务状态、安全策略、证据和报告。

未经明确任务授权,不实现:

  • iOS 或鸿蒙真实 Adapter
  • 多设备并行调度
  • 任意 Shell 执行
  • 支付、验证码或权限绕过
  • 云端账号、团队空间或遥测上传
  • 与当前任务无关的未来能力

3. 强制架构边界

依赖只能沿以下方向:

Clients / Interfaces
        ↓
Application / Skills / Task Engine
        ↓
Domain / Policy / Contracts
        ↓
Device Gateway
        ↓
Platform Adapters
  • Desktop、CLI、MCP 不得直接执行 ADB 或修改任务存储。
  • Skill 不得绕过 Tool Registry、Policy Engine 或 Device Gateway。
  • Domain 不得依赖 FastAPI、Tauri、具体模型 SDK 或 Android 实现。
  • Adapter 不得包含产品流程、Agent 决策或 UI 逻辑。
  • MCP 是外部接口,不是内部模块总线。
  • 模型输出一律视为不可信输入。

详见 docs/architecture/rules.md

4. Contract-first

跨模块数据必须先在 contracts/schemas/ 定义 Schema,再生成或实现语言类型。

以下对象禁止由 Python 与 TypeScript 各自手写一份近似定义:

  • Device
  • Observation
  • Task
  • ToolCall
  • Skill Manifest
  • Error
  • Event

修改 Contract 时必须:

  1. 说明兼容性影响。
  2. 更新生成类型或消费者。
  3. 添加 Contract 测试。
  4. 必要时增加 ADR。

5. 安全规则

  • 禁止 shell=True
  • 禁止拼接模型文本形成命令。
  • 系统进程必须使用固定可执行文件和参数数组。
  • 所有设备动作必须绑定明确的 device_id
  • 所有动作必须经过 Schema、Capability 和 Policy 校验。
  • 密钥、令牌、密码、验证码不得写入代码、数据库、日志或测试快照。
  • 高风险动作不得以“开发方便”为理由绕过确认。
  • 不得实现隐藏的任意命令逃生口。

详见 docs/engineering/security.md

6. 代码要求

  • Python 新代码必须有类型标注;公共接口必须有简洁 docstring。
  • TypeScript 禁止无理由使用 any
  • 领域错误使用统一错误码,不以裸字符串跨层传播。
  • I/O、时间、随机数、模型和设备依赖必须可替换,便于测试。
  • 不为假想需求提前抽象;出现第二个真实实现需求时再提炼通用层。
  • 不混入与当前任务无关的格式化、重命名或重构。
  • 注释解释原因和约束,不重复代码表面含义。

Read the full file on GitHub · 163 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. 4d ago First seen · 163 lines · 1,472 tokens per session scan A 0efcb88bd4e2

Subscribe to this mod's changes

ThumbAgent AGENTS.md is an instructions file published in the GitHub repository LiuShiYi1027/ThumbAgent (0 stars, last pushed 14d ago), licensed Apache-2.0. It adds 1,472 tokens to every session, about $0.0074 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-31.

Related

Other instructions, from other repositories

scrcpy-mcp AGENTS.md

Instructions for JuanCF/scrcpy-mcp, covering agents.md, project overview, project documentation, build/lint/test commands and build the project.

JuanCF/scrcpy-mcp · 1,693 tokens

android-agent CLAUDE.md

Instructions for ghost-in-the-droid/android-agent, covering ghost in the droid — agent tool rules, mcp tool: opencamera, mcp tool: speaktext and general rule.

ghost-in-the-droid/android-agent · 324 tokens

native-devtools-mcp AGENTS.md

AGENTS.md instructions for vectora-foundry/native-devtools-mcp, covering agent context: native-devtools-mcp, 🧠 core reasoning loop, 🗺️ capabilities matrix (strategy guide), 🛠️ tool definitions & schemas and 1. vision & perception (the "eyes").

vectora-foundry/native-devtools-mcp · 8,302 tokens

uiautomator2-mcp-server AGENTS.md

Instructions for tanbro/uiautomator2-mcp-server, covering uiautomator2-mcp-server, project overview, project structure, development setup and install dependencies (uses uv lock file).

tanbro/uiautomator2-mcp-server · 3,906 tokens

uiautomator2-mcp-server CLAUDE.md

Instructions for tanbro/uiautomator2-mcp-server, a project described as: A MCP (Model Context Protocol) server that provides tools for controlling and interacting with Android devices using uiautomator2.

tanbro/uiautomator2-mcp-server · 10 tokens

android-qa-kit AGENTS.md

Instructions for willbytee-sudo/android-qa-kit, covering agents.md — setting up and driving an android device, 1. how to work with the user, 2. start by finding out what's already there, 3. what you can do in each mode and 4. if there's no device: ask first.

willbytee-sudo/android-qa-kit · 2,707 tokens