bun-shell-src

Execute shell commands in src/ using Bun Shell with safe interpolation.

14|1|Updated Dec 29, 2011
One-click install
npx skills add https://github.com/doitian/dotfiles-public --skill bun-shell-src
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bun-shell-src
Source: https://github.com/doitian/dotfiles-public/tree/main/.claude/skills/bun-shell-src
Command: npx skills add https://github.com/doitian/dotfiles-public --skill bun-shell-src

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensures all scripts under src/ run using Bun Shell, providing a consistent, safe, and fast runtime for shell commands and avoiding less predictable Node subprocess usage.

Core Features & Use Cases

  • Enforce Bun Shell for executing commands in src/ and subdirectories to improve reliability and performance.
  • Use Bun's $ template and .nothrow(), .quiet(), and .text() to capture outputs and handle errors gracefully.
  • Promote safe command construction by escaping interpolated values and avoiding external shells.

Quick Start

Start writing shell-enabled scripts in src/ by importing { $ } from 'bun' and invoking commands using Bun's template syntax with interpolated variables.

Frequently Asked Questions about bun-shell-src

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

FAQPage Schema
How do I run shell commands safely within my src scripts using Bun?

Bun Shell provides safe command execution in src scripts by using the $ template tag to escape interpolated variables, ensuring reliable captures and preventing injection risks without external shells.

Can I use Bun Shell to capture command output and handle errors gracefully?

Yes, Bun Shell supports capturing output and handling errors gracefully by chaining modifiers like .nothrow(), .quiet(), and .text() onto the $ template invocation for controlled execution results.

Does this approach avoid using Node's child_process for subprocess execution?

Yes, this approach limits shell usage strictly to the Bun runtime, explicitly avoiding Node's child_process and external shells to ensure a consistent, fast, and predictable subprocess execution environment.

What is the best way to interpolate variables in Bun shell scripts?

The best way to interpolate variables in Bun shell scripts is the await $`cmd ${var}` pattern, which automatically escapes the interpolated values to promote safe command construction within your code.

Why should I enforce Bun Shell for all subprocess automation in my project?

Enforcing Bun Shell for subprocess automation improves reliability and performance by providing a consistent runtime for shell commands, avoiding the unpredictable behavior of Node subprocess usage across your project.