bun-file-io

Automate Bun-based file I/O operations for reading, writing, scanning, and deleting files.

Updated Jan 23, 2026
One-click install
npx skills add https://github.com/Noisemaker111/Jonsoc --skill bun-file-io-noisemaker111
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bun-file-io
Source: https://github.com/Noisemaker111/Jonsoc/tree/main/.opencode/skill/bun-file-io
Command: npx skills add https://github.com/Noisemaker111/Jonsoc --skill bun-file-io-noisemaker111

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill standardizes and simplifies Bun-based file input/output tasks across a codebase, reducing boilerplate and preventing common mistakes.

Core Features & Use Cases

  • Bun.file APIs: Efficient lazy file access and versatile read methods (text, json, arrayBuffer, etc.).
  • Deterministic I/O Patterns: Clear guidance on when to read, write, scan or delete files using Bun and, if needed, node:fs for directories.
  • Use Case: When configuring tooling, use this skill to safely read configuration files, apply updates, and prune obsolete scripts in a repeatable workflow.

Quick Start

Use bun-file-io to read config.json, modify a field, and write the changes back, for example: set "debug" to true.

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 in Bun safely?

Scan directories in Bun using Bun.Glob to match file patterns efficiently. For directory-specific operations that require node:fs fallbacks, this approach ensures deterministic file scanning and safe manipulation across packages and complex project structures.

When should I use node:fs instead of Bun APIs for file operations?

Use node:fs instead of Bun APIs when handling specific directory manipulation tasks that fall outside Bun.file and Bun.write scope. This fallback ensures safe, consistent behavior and deterministic file management across packages and directories.

How do I automate config file updates with Bun.file?

Automate config file updates with Bun.file by reading the configuration as JSON, modifying the desired fields, and writing changes back using Bun.write. This creates a repeatable workflow for safely applying updates to project tooling configurations.

What is the best way to delete obsolete files in a Bun project?

The best way to delete obsolete files in a Bun project is using established deterministic I/O patterns. This approach safely prunes scripts and files during project maintenance, ensuring consistent and reliable file deletion behavior across packages.

Can I use Bun for cross-package file manipulation in tooling?

Yes, you can use Bun for cross-package file manipulation in tooling. It applies deterministic I/O patterns using Bun.file and Bun.write to safely read, write, scan, and delete files across multiple directories and packages with consistent behavior.