bun-file-io

Originally fromanomalyco/opencode
Installation
SKILL.md

Use this when

  • Editing file I/O or scans in packages/opencode
  • Handling directory operations or external tools

Bun file APIs (from Bun docs)

  • Bun.file(path) is lazy; call text, json, stream, arrayBuffer, bytes, exists to read.
  • Metadata: file.size, file.type, file.name.
  • Bun.write(dest, input) writes strings, buffers, Blobs, Responses, or files.
  • Bun.file(...).delete() deletes a file.
  • file.writer() returns a FileSink for incremental writes.
  • Bun.Glob + Array.fromAsync(glob.scan({ cwd, absolute, onlyFiles, dot })) for scans.
  • Use Bun.which to find a binary, then Bun.spawn to run it.
  • Bun.readableStreamToText/Bytes/JSON for stream output.

When to use node:fs

  • Use node:fs/promises for directories (mkdir, readdir, recursive operations).
Related skills
Installs
50
GitHub Stars
64
First Seen
Feb 9, 2026