exec

GitHub

说明 exec 技能在 Linux 容器中的运行机制,涵盖环境配置、网络访问、文件同步及性能注意事项。

examples/container/src/skills/exec/SKILL.md cloudflare/computer

触发场景

需要了解命令执行环境 排查文件不同步问题

安装

npx skills add cloudflare/computer --skill exec -g -y
更多选项

非标准路径

npx skills add https://github.com/cloudflare/computer/tree/main/examples/container/src/skills/exec -g -y

不安装直接使用

npx skills use cloudflare/computer@exec

指定 Agent (Claude Code)

npx skills add cloudflare/computer --skill exec -a claude-code -g -y

安装 repo 全部 skill

npx skills add cloudflare/computer --all -g -y

预览 repo 内 skill

npx skills add cloudflare/computer --list

SKILL.md

Frontmatter
{
    "name": "exec",
    "description": "How exec works in this workspace. Commands run in bash in a real Linux container, with Node.js, git and network access, and the workspace is synced in and out around each call. Read this before running commands, installing packages, or debugging files that don't show up where you expect."
}

Running commands

Every exec call runs your command with bash in a Linux container. The durable object starts the container, and a small daemon in it, computerd, runs the command.

What's installed

  • Debian, with bash, git, curl and the usual core tools.
  • Node.js 22 and npm.
  • Anything else can be installed with apt-get or npm. It lasts until the container stops.

Network

The container has direct network access, so npm install, git clone and curl work.

Files

  • /workspace in the container is the workspace. cwd defaults to it.
  • The durable object's storage holds the authoritative copy. Before each call, changes made outside the container are pushed into /workspace. After the call, changes made in the container are pulled back. Something written outside /workspace stays in the container and isn't saved.
  • /workspace/.agents/skills (where this file lives) is a read-only copy of files shipped with the Worker. Changes you make there in the container are dropped when the call ends.

Things to know

  • The first call is slow, because the container has to boot. Later calls reuse it while it stays up.
  • A container that stops loses everything outside /workspace, including installed packages. Reinstall rather than assume they're still there.
  • Every file under /workspace is synced back to storage after each call. This example keeps no paths on the container's local disk, so a large node_modules or build folder under /workspace slows every call down. Put throwaway output in /tmp.

版本历史

  • 7415a44 当前 2026-10-18 18:09

同 Skill 集合

.agents/skills/capnweb/SKILL.md
.agents/skills/cloudflare/SKILL.md
.agents/skills/debugging-computerd-fuse/SKILL.md
.agents/skills/prose/SKILL.md
.agents/skills/pull-requests/SKILL.md
.agents/skills/test-driven-development/SKILL.md
.gardener/SKILL.md
examples/vite-bundle/src/skills/hello/SKILL.md
examples/worker-javascript/src/skills/exec/SKILL.md
examples/worker-shell/src/skills/exec/SKILL.md

元信息

文件数
0
版本
7415a44
Hash
14deb5fc
收录时间
2026-10-18 18:09

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-19 05:13
浙ICP备14020137号-1