bun-file-io

Manage file I/O, directory operations, and glob-based scanning using Bun APIs.

77|23|Updated Jul 16, 2025
One-click install
npx skills add https://github.com/groeimetai/snow-flow --skill bun-file-io-groeimetai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: bun-file-io
Source: https://github.com/groeimetai/snow-flow/tree/main/.snowcode/skill/bun-file-io
Command: npx skills add https://github.com/groeimetai/snow-flow --skill bun-file-io-groeimetai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies and standardizes file input/output, directory management, and file scanning operations within the project, ensuring consistency and leveraging efficient Bun APIs.

Core Features & Use Cases

  • File Reading/Writing: Efficiently read file content (text, JSON, binary) and write data to files using Bun's optimized APIs.
  • File Scanning: Utilize Bun.Glob for powerful and flexible directory and file searching.
  • Directory Operations: Employ node:fs/promises for robust directory creation and traversal.
  • Use Case: When modifying the file handling logic in packages/opencode, use this Skill to ensure you're using the preferred Bun file APIs for reading, writing, and scanning, falling back to node:fs for directory tasks.

Quick Start

Use the bun-file-io skill to read the text content of the file located at '/path/to/your/file.txt'.

Frequently Asked Questions about bun-file-io

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I read and write files efficiently in Bun?▼

Bun file I/O prioritizes native Bun APIs for reading and writing text, JSON, and binary content, falling back to node:fs only for robust directory creation and traversal to ensure optimized file access.

What is the best way to scan directories using Bun.Glob?▼

Using Bun.Glob for directory scanning allows you to perform flexible, pattern-based file searches across your project structure, efficiently locating matching files within directories.

Can I use node:fs/promises for directory operations in a Bun project?▼

Yes, you can use node:fs/promises for directory operations in a Bun project; it is explicitly employed for robust directory creation and traversal tasks alongside Bun's native file APIs.

How do I perform incremental writes to a file in Bun?▼

Incremental writes are supported through the Skill's file I/O management, allowing you to progressively append or update file content using Bun's optimized APIs alongside path manipulation.

Does this approach support finding and spawning external binaries?▼

Yes, the approach supports finding and spawning external binaries; alongside managing file I/O and directory operations, it includes functionality to locate and execute external binary files.

Why use path.join and resolve for file path manipulation in Bun?▼

Using path.join and resolve standardizes path construction and prevents resolution errors when managing file I/O and directory operations across different environments using Bun APIs and node fs.