Agent skill

Background UI Debug

by zly2006 in zly2006/zhihu-plus-plus

在不创建、激活或切换任何前台窗口的前提下,通过项目的 debug-only 离屏 Compose UI 控制接口检查语义树、点击、输入、滚动、等待和截图。适用于 macOS Kotlin/Native UI 回归、页面卡死、导航完成度和逐按钮验收;禁止用 AppleScript、System Events、open、桌面截图或坐标点击替代。

AGPL-3.0Auto-check passedMobile

Install Background UI Debug

skills CLI
$ npx skills add zly2006/zhihu-plus-plus --skill background-ui-debug -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install zly2006/zhihu-plus-plus background-ui-debug --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/zly2006/zhihu-plus-plus.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/background-ui-debug .claude/skills/background-ui-debug && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
background-ui-debug
GitHub stars
4.2k
Token cost
~657 tokens
SKILL.md length
108 words
Files
4 (incl. scripts, references)
Skills in repo
11
Repo updated
First seen
Licence
AGPL-3.0

At a glance

在不创建、激活或切换任何前台窗口的前提下,通过项目的 debug-only 离屏 Compose UI 控制接口检查语义树、点击、输入、滚动、等待和截图。适用于 macOS Kotlin/Native UI 回归、页面卡死、导航完成度和逐按钮验收;禁止用 AppleScript、System Events、open、桌面截图或坐标点击替代。

  • Works in 6 steps: 先确认生产应用没有运行,并检查当前任务不会启动 macosApp。 → 用 scripts/start_background_ui_debug.sh… → 发送一行一个 JSON 命令。先用 state 再次确认… → …
  • Tasks that involve Android development
  • SKILL.md covers 理念, 工作流 and 证据标准
  • Runs Shell scripts from its folder

What it does

Background UI Debug is an agent skill from zly2006/zhihu-plus-plus. 在不创建、激活或切换任何前台窗口的前提下,通过项目的 debug-only 离屏 Compose UI 控制接口检查语义树、点击、输入、滚动、等待和截图。适用于 macOS Kotlin/Native UI 回归、页面卡死、导航完成度和逐按钮验收;禁止用 AppleScript、System Events、open、桌面截图或坐标点击替代。

Its SKILL.md is about 660 tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts and reference files (for example `agents/openai.yaml`, `references/protocol.md` and `scripts/start_background_ui_debug.sh`).

It sits in Mobile, covering Android development and Mobile UI design. It works with Kotlin and macOS. The repository describes itself as: Zhihu++ | 知乎++: Ad-free, low cost, AI powered zhihu android 3rd-party client. 去广告、占用低、AI大模型的新时代知乎安卓端体验. The licence is AGPL-3.0.

When your agent uses it

  • Tasks that involve Android development
  • Tasks that involve Mobile UI design

Example prompts

  • “/background-ui-debug”

Requirements

  • A Bash shell

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. 先确认生产应用没有运行,并检查当前任务不会启动 macosApp。
  2. 用 scripts/start_background_ui_debug.sh 构建并启动离屏调试器。脚本只 exec 调试 kexe,不调用任何窗口 API;启动后的首个 ready 事件必须同时满足 windowHost=false 和 dataMode=isolated。
  3. 发送一行一个 JSON 命令。先用 state 再次确认 windowHost=false、dataMode=isolated 和临时 dataHome,随后 dump,再按语义节点执行 click、input、scroll、back、wait 或 screenshot。
  4. 对每个页面枚举所有可点击节点;逐项操作后检查目标页面、返回路径、异常输出和耗时。破坏性动作只验证到提交前状态。
  5. 发现卡死时保留最后一个命令、动作前后语义树、离屏截图、耗时和 stderr;先定位确定根因,再修改生产代码。
  6. 修改后重跑相同命令序列,随后构建 release,并验证 release 二进制不含协议标记 ZHPP_BACKGROUND_UI_DEBUG_V1。

What it can do on your machine

Read from SKILL.md and the folder at commit 2daa669. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Shell), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • gnu.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Background UI Debug loads about 657 tokens when it runs, and up to ~2k if it reads all its reference files. Until then it costs about 48 tokens; SKILL.md has 108 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~48
When it runs · the whole SKILL.md, loaded when a task matches
~657
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from zly2006/zhihu-plus-plus at commit 2daa669, republished under its AGPL-3.0 licence (© zly2006). 108 words, ~657 tokens.

Download SKILL.mdSave it as .claude/skills/background-ui-debug/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
background-ui-debug
description
在不创建、激活或切换任何前台窗口的前提下,通过项目的 debug-only 离屏 Compose UI 控制接口检查语义树、点击、输入、滚动、等待和截图。适用于 macOS Kotlin/Native UI 回归、页面卡死、导航完成度和逐按钮验收;禁止用 AppleScript、System Events、open、桌面截图或坐标点击替代。
<!--
Zhihu++ - Free & Ad-Free Zhihu client for all platforms.
Copyright (C) 2024-2026, zly2006 <i@zly2006.me>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation (version 3 only).

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
-->

后台 UI 调试

理念

UI 自动化的目标是证明用户可达状态,不是表演鼠标操作。调试器应直接驱动产品的 Compose 语义树,在内存中的离屏 Skia 画布完成布局和绘制,并留下可审计的输入、输出与截图。

必须遵守以下边界:

  • 严禁创建、显示、激活或切换应用窗口;严禁让 Dock 图标、菜单栏或焦点发生变化。
  • 严禁使用 open、osascript、AppleScript、System Events、桌面截图、全局键鼠注入和屏幕坐标。
  • 只能运行独立的 debug 调试二进制。正式应用和 release 二进制不得依赖、注册或包含控制协议。
  • 只能用 testTag、文本、content description 等语义选择器操作;找不到目标就是失败,不能退回坐标猜测。
  • 截图必须来自离屏 Compose 画布,不得捕获用户桌面或其他应用。
  • 每次动作前先读取当前语义状态,动作后等待明确终态并再次读取;超时、异常、空白画面和状态未变化都算失败。
  • 调试二进制必须在组合 UI 前创建唯一的临时数据根;默认账号、Cookie、设置、历史、数据库和下载文件只能读写该目录,退出后删除。只有用户明确授权真实账号验收时,才允许通过显式的 --use-real-account 将本机账号文件复制到该临时根;仍不得直接读写生产文件,且协议必须报告 dataMode=isolated。禁止增加默认使用生产数据的路径。
  • 纯 UI 布局和动画验收应优先提供 debug-only fixture 页面,不应为了进入目标页面要求真实登录;真实账号只用于必须验证认证、会话或线上数据契约的场景。
  • 默认不执行远端副作用。涉及发布、关注、投票、删除等动作时只能验证到提交前状态;即使任务授权了真实副作用,也必须换用独立测试账号和单独执行面,不能解除本调试器的数据隔离。

工作流

  1. 先确认生产应用没有运行,并检查当前任务不会启动 macosApp。
  2. 用 scripts/start_background_ui_debug.sh 构建并启动离屏调试器。脚本只 exec 调试 kexe,不调用任何窗口 API;启动后的首个 ready 事件必须同时满足 windowHost=false 和 dataMode=isolated。
  3. 发送一行一个 JSON 命令。先用 state 再次确认 windowHost=false、dataMode=isolated 和临时 dataHome,随后 dump,再按语义节点执行 click、input、scroll、back、wait 或 screenshot。
  4. 对每个页面枚举所有可点击节点;逐项操作后检查目标页面、返回路径、异常输出和耗时。破坏性动作只验证到提交前状态。
  5. 发现卡死时保留最后一个命令、动作前后语义树、离屏截图、耗时和 stderr;先定位确定根因,再修改生产代码。
  6. 修改后重跑相同命令序列,随后构建 release,并验证 release 二进制不含协议标记 ZHPP_BACKGROUND_UI_DEBUG_V1。

协议字段、选择器和命令示例见 references/protocol.md。

证据标准

一次有效验收至少包含:

  • 调试二进制的构建类型和进程路径;
  • ready 与 state 中一致的 dataMode=isolated、临时 dataHome,以及进程退出后该目录已删除;
  • 每个动作的请求 id、语义选择器、成功或失败响应及耗时;
  • 关键页面动作前后的语义树差异;
  • 来自离屏画布的 PNG;
  • 页面级超时与进程终态;
  • release 隔离检查。

进程存活、命令返回 ok 或生成非空 PNG 都不能单独证明页面可用。必须验证目标语义状态出现,且离屏图像包含真实绘制内容。

© zly2006, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts, references) in .agents/skills/background-ui-debug of zly2006/zhihu-plus-plus.

  • SKILL.md
  • agents/openai.yaml
  • references/protocol.md
  • scripts/start_background_ui_debug.sh

Open the folder on GitHubat commit 2daa669

Compare with similar skills

Background UI Debug next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Background UI Debug compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Background UI Debug this skillzly2006/zhihu-plus-plus4.2k—~657Automated safety check: PassAGPL-3.0
Jetpack Composedarriousliu/PiPixiv262—~1.5kAutomated safety check: PassApache-2.0
Ksafeioannisa/KSafe332—~17kAutomated safety check: PassApache-2.0
Xcodebuildmcp CLIc5inco/compose-pokedexer143—~415Automated safety check: PassMIT
Healthmd CLI QACodyBontecou/health-md230—~4kAutomated safety check: PassAGPL-3.0
Mobile Apps Createforcedotcom/sf-skills1.1k—~1.4kAutomated safety check: PassApache-2.0

Similar skills

  • Jetpack Compose

    darriousliu/PiPixiv

    Jetpack Compose expert skill for Android UI development. An agent skill from darriousliu/PiPixiv.

    262 GitHub stars~1.5k tokensUpdated today
    MobileAuto-check passed
  • Ksafe

    ioannisa/KSafe

    Required before any reply that touches KSafe (by ksafe(...), ksafe.get/put, :ksafe-compose, :ksafe-biometrics), even a 'can KSafe do X?' question or a one-line change that looks like plain Kotlin.

    332 GitHub stars~17k tokensUpdated 5 days ago
    MobileAuto-check passed
  • Xcodebuildmcp CLI

    c5inco/compose-pokedexer

    Official skill for the XcodeBuildMCP CLI. An agent skill from c5inco/compose-pokedexer.

    143 GitHub stars~415 tokensUpdated 5 days ago
    MobileAuto-check passed
  • Healthmd CLI QA

    CodyBontecou/health-md

    Test the standalone Health.md CLI, portable healthmd-mcp server, and direct mobile paths.

    230 GitHub stars~4k tokensUpdated today
    MobileAuto-check passed
  • Mobile Apps Create

    forcedotcom/sf-skills

    The entry point for building any Salesforce native mobile app on iOS or Android.

    1.1k GitHub stars~1.4k tokensUpdated yesterday
    MobileAuto-check passed
  • Checks whether Android hidden-API implementations and system callbacks survive R8 minification, and diagnoses Release-only failures such as AbstractMethodError.

    43k GitHub stars~1.5k tokensUpdated yesterday
    MobileAuto-check passed

More from zly2006/zhihu-plus-plus

All 11 skills in this repo
  • Zhihu Pp AI Slop Cleaner

    zly2006/zhihu-plus-plus

    A skill your agent uses for Zhihu++ maintenance work that scans Kotlin main sources for low-call functions, structurally similar function bodies, dead code, pure forwarding wrappers, pointless…

    4.2k GitHub stars~3.7k tokensUpdated yesterday
    Auto-check passed
  • Zhihu Instrument Test Governance

    zly2006/zhihu-plus-plus

    Audit, add, migrate, or remove Zhihu++ Android instrument tests under app/src/androidTest.

    4.2k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • GitHub PR Assets

    zly2006/zhihu-plus-plus

    Manage screenshots and other visual assets for GitHub pull requests.

    4.2k GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Launch On Device

    zly2006/zhihu-plus-plus

    Build, install, and launch the Zhihu++ Android app on a connected device using ADB.

    4.2k GitHub stars~3.1k tokensUpdated yesterday
    Auto-check passed
  • Picky User

    zly2006/zhihu-plus-plus

    以 subagent 启动的 UI 挑剔用户评审。Use when the user, AGENTS, or the current task requires “挑剔的用户”.

    4.2k GitHub stars~744 tokensUpdated yesterday
    Auto-check passed
  • Release Latex Fork

    zly2006/zhihu-plus-plus

    Release the LaTeX fork used by Zhihu++. An agent skill from zly2006/zhihu-plus-plus.

    4.2k GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Background UI Debug

What does Background UI Debug do?

在不创建、激活或切换任何前台窗口的前提下,通过项目的 debug-only 离屏 Compose UI 控制接口检查语义树、点击、输入、滚动、等待和截图。适用于 macOS Kotlin/Native UI 回归、页面卡死、导航完成度和逐按钮验收;禁止用 AppleScript、System Events、open、桌面截图或坐标点击替代。. Background UI Debug is an agent skill from zly2006/zhihu-plus-plus.

When should I use Background UI Debug?

Background UI Debug fits situations like: tasks that involve Android development; tasks that involve Mobile UI design.

How do I install Background UI Debug in Claude Code?

Run `npx skills add zly2006/zhihu-plus-plus --skill background-ui-debug -a claude-code`. Or copy the skill folder (.agents/skills/background-ui-debug in zly2006/zhihu-plus-plus) into .claude/skills/background-ui-debug in your project. Claude Code loads it when a task matches its description.

How do I install Background UI Debug in Codex?

Run `npx skills add zly2006/zhihu-plus-plus --skill background-ui-debug -a codex`. Or copy the skill folder (.agents/skills/background-ui-debug in zly2006/zhihu-plus-plus) into .agents/skills/background-ui-debug in your project. Codex loads it when a task matches its description.

Can I use Background UI Debug in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add zly2006/zhihu-plus-plus --skill background-ui-debug -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/background-ui-debug, .gemini/skills/background-ui-debug, .github/skills/background-ui-debug and .opencode/skills/background-ui-debug in your project.

What does Background UI Debug need to run?

Going by SKILL.md and its folder, Background UI Debug needs a shell for the scripts in its folder. Our summary lists: A Bash shell.

Does Background UI Debug access the network?

SKILL.md names 1 domain. As links in the text: gnu.org. This is read from the text; nothing was executed.

Is Background UI Debug safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Background UI Debug use?

Background UI Debug is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Background UI Debug use?

About 657 tokens (SKILL.md is roughly 2.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.4k tokens, read only when the agent opens those files.

What are the alternatives to Background UI Debug?

Skills that share tags, products or a category with Background UI Debug: Jetpack Compose (darriousliu/PiPixiv, 262 stars), Ksafe (ioannisa/KSafe, 332 stars), Xcodebuildmcp CLI (c5inco/compose-pokedexer, 143 stars) and Healthmd CLI QA (CodyBontecou/health-md, 230 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Background UI Debug?

zly2006 (a GitHub user) maintains it in zly2006/zhihu-plus-plus, which has 4,206 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 7, 2026.

Source: zly2006/zhihu-plus-plus on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.