用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/akiselev/desktop-cli --skill desktop-cli命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | desktop-cli |
| description | Semantic cross-platform desktop control CLI for agents |
Use the semantic interface by default. Packs project noisy native accessibility trees into app-specific interfaces; legacy commands remain compatibility/debugging tools.
desktop windows
desktop observe <window> [--pack altium]
desktop query <window> '@button[name="Save"]' [--pack altium]
desktop action <window> '$save' activate --pack altium
desktop observe <window> --pack altium
For multi-step work prefer desktop serve <window> --pack altium. It speaks one JSON object per line on stdin/stdout and keeps element references meaningful across observations.
observe as the default state representation; use the raw tree only for pack/selector debugging.$projects, $properties, or $save are the most stable interface.e_...) are session-scoped. If a ref is stale, observe/query again rather than guessing.--max-nodes, --max-items, and --max-text.Prefer semantics over native classes or coordinates:
@button[name="Save"]
@input:focused
@tree[name*="Projects"] > @treeitem
#SaveButton
:supports(action)
@panel:has(@input[name="Width"])
@input:labelled-by(@text[name="Username"])
@button:below(@text[name="Password"])
$properties @input
Selectors support semantic roles, stable IDs, property operators (=, *=, ^=, $=, ~=), tri-state states, capabilities, child/descendant combinators, :is, :not, :has, semantic relations, spatial relations, and pack aliases.
Use desktop action with the portable action vocabulary: activate, focus, set-value, toggle, select, expand, collapse, increment, decrement, show-menu, scroll-into-view, confirm, cancel, raise-window, set-text, and replace-text.
Accessibility is attempted first. Coordinate/input fallbacks are disabled unless explicitly requested or declared as a guarded pack fallback. Packs are observation policy, not authorization policy.
If the action string is not a built-in semantic action it is resolved as a pack-defined action.
desktop snapshot <window> --output tests/fixtures/my-app/state.json
desktop pack show ./packs/my-app
desktop pack validate <window> ./packs/my-app
desktop pack explain <window> ./packs/my-app '$properties'
A pack consists of pack.toml and views.dcss. Projection operations are keep, flatten, prune, and collapse. Prefer whitelist packs (default-projection: prune) for complex professional applications. Add native IDs or classes only from captured fixtures; never guess them.
Legacy commands remain for existing scripts and debugging: summary, click, type, keys, scroll, dump-tree, find-element, invoke, and do. They are not the preferred new agent protocol.