agentleFS
CloudflareKnown publishercloudflare/computer/examples/codemode/src/skills/exec/SKILL.md

exec

Skill9.9k starsChanged 3 months agoMITView on GitHub

How exec works in this workspace. The command is the source of an ECMAScript module, evaluated in a fresh Dynamic Worker, not a shell command. Read this before running code, and when a run fails with "Disallowed operation called within global scope" or returns nothing.

4 other projects use a version of this.

Adopted by

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Sep 13: 0 new projectsWeek of Sep 20: 0 new projectsWeek of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projectsWeek of Oct 25: 0 new projectsWeek of Nov 1: 0 new projects
Sep 2026Oct 2026Nov 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Most recently taken up by

Who's talking about cloudflare/computer

The biggest 5 of 64 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 64

Talked about on GitHub, Bluesky, the web and Hacker News (64 times).

On GitHub · 50

45 more on GitHub

On Bluesky · 10

5 more on Bluesky

On Hacker News · 1

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every exec call takes JavaScript module source, not a shell command.

    line 8
  2. Distinctive:

    Put the work inside the default export, and return what you want back:

    line 15
  3. Very specific:

    No direct network access. fetch to the internet fails.

    line 55

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Running code

Every exec call takes JavaScript module source, not a shell command. The durable object builds a module graph from it, starts a fresh Dynamic Worker, and evaluates the module there. Nothing is shared between calls.

The shape of a module

Put the work inside the default export, and return what you want back:

import { readdir, readFile } from "node:fs/promises";

export default async function (input) {
  const names = await readdir(input.dir);
  const first = await readFile(`${input.dir}/${names[0]}`, "utf8");
  return { count: names.length, first };
}
  • The default export gets the call's input value.
  • Its return value comes back as the result's value. It must be JSON-compatible.
  • console.log and console.info go to standard output. console.warn and console.error go to standard error.
  • A thrown error ends the run with a non-zero exit code and the message on standard error. So does a promise that rejects with nothing handling it, so await everything you start.
  • Code at the top level runs before the call is set up. A file read or a fetch there fails with Disallowed operation called within global scope. Imports at the top are fine.

What code can import

  • node:fs/promises (also node:fs): the workspace's files. The supported calls are readFile, writeFile, mkdir, rm, readdir, stat, lstat, readlink, symlink, chmod and access. All of them are async.
  • Node.js built-ins such as node:path, node:crypto, node:zlib and node:buffer, with subpaths like node:stream/promises. Bare names such as path work too.
  • Relative imports resolve from cwd in the workspace, so you can write a helper module with one call and import it in the next.
  • There is no node_modules lookup and no npm. Beyond the modules above, only the ones the host configures are available.

Limits

  • No direct network access. fetch to the internet fails.
  • Each run has a time limit: one minute by default, three at most.
  • Source, input and the returned value are capped at 1 MiB each.

Files

  • cwd defaults to /workspace.
  • File operations go straight to the durable object's storage. There's nothing to sync, so a write is visible to the next call right away.
  • /workspace/r2 is a read-only copy of an R2 bucket.
  • /workspace/.agents/skills (where this file lives) is a read-only copy of files shipped with the Worker. Writing under either one fails with EROFS.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.