bun-file-io

Automate Bun-based file reading, writing, scanning, and deletion tasks.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill simplifies and standardizes Bun-based file input/output tasks, covering common operations like reading, writing, scanning, and deleting files, and highlights patterns for filesystem interactions within the repository.

Core Features & Use Cases

  • Bun.file-based operations: read text and binary data, write data, check existence, and perform incremental writes.
  • Directory scans and safe deletions using Bun.Glob and Bun.file utilities for rapid repository maintenance.
  • Use cases include automated setup scripts, codegen asset management, and lightweight tooling for repository housekeeping.

Quick Start

Run a Bun script to read a file using Bun.file and log the content.

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 with Bun in my development workflow?

To read and write files with Bun, you use the Bun.file API to load text or binary data and perform writes, including incremental writes for safe filesystem operations. This standardizes common I/O tasks in your codebase.

What is the best way to scan directories and check file existence using Bun?

The best way to scan directories and check file existence using Bun is leveraging Bun.Glob and Bun.file utilities. These enable rapid repository maintenance through efficient directory scans and existence checks.

When should I fall back to node:fs instead of using Bun for file I/O?

You should fall back to node:fs for file I/O when specific filesystem operations exceed Bun.file capabilities or require specialized Node.js compatibility. The Skill provides guidance on structuring operations and when fallbacks are necessary.

Can I use Bun to safely delete files during automated setup scripts?

Yes, you can use Bun to safely delete files during automated setup scripts. The Skill applies Bun.file utilities to perform safe deletions, making it suitable for codegen asset management and lightweight repository housekeeping.

Does Bun support incremental writes for managing binary data?

Yes, Bun supports incremental writes for managing binary data through the Bun.file API. This allows developers to efficiently handle text and binary data streams during filesystem operations.