golemcloud/golem/golem-file-io-effect

Claude Code and agent skill by golemcloud/golem

Trust tier 2
  • community
  • ext:[{"type":"plugin","description":"Custom plugin integration"}]
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Reading and writing files from Effect Golem agents with wasm-rquickjs Node filesystem modules, including provisioned Initial File System paths and large files. Use when an Effect agent must read, write, list, or checksum filesystem data.

Install

npx vskill@latest install golemcloud/golem/golem-file-io-effect

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as golemcloud/golem/golem-file-io-effect.

File I/O in Effect Golem Agents

Effect agents run in wasm-rquickjs, which implements Node's filesystem APIs on top of WASI. Import node:fs or node:fs/promises exactly as in an ordinary TypeScript Golem component. The component build keeps wasm-rquickjs-provided Node modules external, while installed third-party npm packages remain bundleable.

Read a Provisioned File

Load golem-add-initial-files to provision a local file through the agent's files: manifest section. Agent code reads the configured targetPath; it must not use the local sourcePath.

Use Effect.promise when failure is impossible by contract, or Effect.tryPromise when the method must model filesystem errors. Method handlers must return an Effect rather than being declared async:

typescript
import { readFile } from "node:fs/promises";
import { Effect, Schema } from "effect";
import { defineAgent, method } from "@golemcloud/effect-golem";
export const ProvisionedFileAgent = defineAgent({
name: "ProvisionedFileAgent",
mode: "durable",
id: {
name: Schema.String,
},
methods: {
readConfig: method({
input: {},
success: Schema.String,
}),
fileStats: method({
input: {},
success: Schema.String,
}),
},
}).implement({
init: () => Effect.void,
methods: () => ({
readConfig: () =>
Effect.promise(() => readFile("/data/config.json", "utf8")),
fileStats: () =>
Effect.promise(() => readFile("/data/large.bin")).pipe(
Effect.map((bytes) => {
let sum = 0n;
for (const byte of bytes) sum += BigInt(byte);
return `size=${bytes.byteLength},sum=${sum}`;
}),
),
}),
});

Register the implementation from the component entry point:

typescript
// src/main.ts
import "./provisioned-file-agent.js";

readFile returns a Buffer, which is a Uint8Array, and wasm-rquickjs performs the low-level chunked reads needed for files larger than the WASI per-read allocation limit. Do not truncate the result or replace a provisioned-file read with generated fixture bytes.

Other Node Filesystem Operations

Use the usual node:fs/promises operations (writeFile, mkdir, readdir, stat, unlink, and others) and wrap their Promises in Effect. The synchronous node:fs APIs are also available; wrap them in Effect.sync or Effect.try. Paths are inside the agent's sandboxed WASI filesystem, not the developer machine.

Use Blobstore instead when the data is logically object storage rather than filesystem data. A Blobstore key is not a mounted path and cannot read a file provisioned through golem.yaml.

Key Constraints

  • Import filesystem APIs from node:fs or node:fs/promises.
  • Return Effects from method handlers; do not use plain async functions.
  • Use the provisioned targetPath, such as /data/config.json, in application code.
  • Let Golem handle durable host-operation retries; do not add manual retry loops.
  • Use TypeScript camelCase for Effect method names and TypeScript syntax for CLI agent values.
  • Installed third-party npm packages are bundled normally, but native Node addons cannot run in

the WebAssembly component; choose pure JavaScript dependencies or wasm-rquickjs Node APIs.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
1,516
Repository forks
209
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • pluginCustom plugin integration

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/golemcloud/golem/golem-file-io-effect/badge)](https://verified-skill.com/skills/golemcloud/golem/golem-file-io-effect)

Something wrong with this skill or its page? Tell us.