Bun File I/O
Bun provides a set of optimized APIs for reading and writing files.
Install
npx skills add jarle/bun-skills --skill Bun File I/Ogit clone --depth 1 https://github.com/jarle/bun-skills.git /tmp/bun-skills
mkdir -p ~/.claude/skills
cp -r /tmp/bun-skills/skills/bun-runtime-file-io ~/.claude/skills/Bun-File-I-OPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# File I/O
> Bun provides a set of optimized APIs for reading and writing files.
<Note>
The `Bun.file` and `Bun.write` APIs documented on this page are heavily optimized and represent the recommended way to perform file-system tasks using Bun. For operations that are not yet available with `Bun.file`, such as `mkdir` or `readdir`, you can use Bun's [nearly complete](/runtime/nodejs-compat#node-fs) implementation of the [`node:fs`](https://nodejs.org/api/fs.html) module.
</Note>
***
## Reading files (`Bun.file()`)
`Bun.file(path): BunFile`
Create a `BunFile` instance with the `Bun.file(path)` function. A `BunFile` represents a lazily-loaded file; initializing it does not actually read the file from disk.
```ts theme={"theme":{"light":"github-light","dark":"dracula"}}
const foo = Bun.file("foo.txt"); // relative to cwd
foo.size; // number of bytes
foo.type; // MIME type
```
The reference conforms to the [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) interface, so the contents can be read in various formats.
```ts theme={"theme":{"light":"github-light","dark":"dracula"}}
const foo = Bun.file("foo.txt");
await foo.text(); // contents as a string
await foo.json(); // contents as a JSON object
await foo.stream(); // contents as ReadableStream
await foo.arrayBuffer(); // contents as ArrayBuffer
await foo.bytes(); // contents as Uint8Array
```Details
- Skill name
Bun File I/O- Repository
- jarle/bun-skills
- Path
skills/bun-runtime-file-io/SKILL.md- License
- MIT
- Repo updated
- 24 February 2026
FAQ
What does the Bun File I/O skill do?
Bun provides a set of optimized APIs for reading and writing files.
How do I install the Bun File I/O skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add jarle/bun-skills --skill Bun File I/O. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Bun File I/O popular?
It lives in jarle/bun-skills, which has 9 GitHub stars and 1 forks.
Related skills
Bun Archive
9jarle/bun-skills
Create and extract tar archives with Bun's fast native implementation
Bun Auto Install
9jarle/bun-skills
Bun's automatic package installation feature for standalone script execution
Bun Bun Add
9jarle/bun-skills
Add packages to your project with Bun's fast package manager
Content Creator
5Dreydrey9000/claude-skills
Create SEO-optimized marketing content with consistent brand voice. Includes brand voice analyzer, SEO optimizer, content frameworks, and social media templates. Use when writing blog posts, creati...
Bootstrapping From Templates
5tomada1114/tomada-claude-plugins
Cut a new GitHub repository from one of the user's template repositories and bring it to a clean first commit: create it from the template (public by default) with scripts/create_from_template.py, clone it under ghq, follow the template's own starting-an-app procedure for the rename or bootstrap (a script, a just recipe, or a placeholder inventory), write AGENTS.md's Product section from signed-off requirements, copy kickoff drafts into docs/, run the template's checks, sync its labels, and push. Use when creating a repository from a template, running a template's bootstrap or rename, a placeh
Greeting Generator
5tomada1114/tomada-claude-plugins
Write a greeting in a target language at a specified register, with the usage constraints a dictionary entry omits — time-of-day window, seniority assumptions, regional variation. Use when drafting localized welcome copy, onboarding strings, or greetings for an international audience.
Browse the most popular Claude skills, all writing & content skills, or write your own with the skills generator.