Skip to main content

Module computer_use_skill

Module computer_use_skill 

Source
Expand description

Reading a skill from a folder, a git repository or a URL, for import. Reading a computer-use skill folder (docs/specs/SPEC_PACKS_2026_11_05.md §3): SKILL.md, the manifest computer-use.json, and the text files beside them. It only reads and checks; the caller shows the person what was found and writes only what they approve.

The checks are the public catalog’s (the agentmuxai/skills repo, in its lib module), so a folder that passes there reads here: the folder name is <publisher>-<id> and equals the SKILL.md name, the version is semver, the last changelog entry is the current version, the ladder names only api, mcp, shortcuts and desktop, and an MCP pointer names a catalog entry, never a command. The content hash is the catalog’s too: SHA-256 over path\0filehash\n in byte order of the path, leaving out skill.sig and verified.json.

Structs§

Bundle
A skill folder, read and checked.
SkillPointer
The computer-use skill for a window, as Desktop apps points at it.

Constants§

MANIFEST
SCHEMA
The manifest schema this build reads.
SIG_FILE
VERIFIED_FILE

Functions§

check_png
Check a reference crop’s bytes: a PNG within the size and pixel limits that carries no metadata chunk.
check_signature
The key that signed this bundle: Ok(None) for an unsigned one, an error for a signature that does not match its files. A publisher pinned to another key, or pinned and now unsigned, is refused (SPEC_PACKS §5): a different key than the one the person approved a script of is not an update, it is a different author.
content_hash
The catalog’s content hash of files (path to bytes), without skill.sig and verified.json.
info_from_manifest
The manifest’s own fields. Strict about what an installed skill needs, quiet about extra fields.
install
Write an approved bundle’s computer-use part for the catalog skill skill_id: the manifest, the files, and the pass records its folder carried. A script lands unapproved. Call after the skill row itself is written. signer is what check_signature returned for this bundle: the caller checks first and a refusal never gets here.
matches_executable
Whether exe (an executable name as Desktop apps lists it) is one this skill’s app runs as on platform. Compared by file name, ignoring case and a folder part, never by window title alone.
read_folder
Read and check the skill folder dir. The folder’s name must be <publisher>-<id>.
script_infos
What each listed script is for and needs, for the approval prompt.
sibling_files
The files an agent’s launch writes beside each computer-use skill’s SKILL.md (.claude/skills/<slug>/<path>), for the skills build_config_files gave a folder. A script is written only once a person has approved it. A reference crop is not written at all: an image is read with Skills get and file, so it costs nothing until a step points at it. Raw text: unlike SKILL.md, no {{VARIABLE}} is expanded, since a script or a reference file may hold {{ of its own. The .claude/skills/ prefix makes them managed files, so the launch’s stale-file cleanup removes the ones a skill no longer has.
skill_for_executable
The skill whose app runs as exe on platform, if the catalog has one. No grant is implied by the pointer.
stash
Keep bundle for the commit that follows its preview.
stashed
The bundle a preview read, by its content hash, if it is still kept. It stays, so a failed commit can be retried.
valid_rel_path
A path beside SKILL.md that can be stored and written under an agent’s skill folder: relative, forward slashes, no ./../empty part, no drive or stream marker, at most four parts.