Skip to content
Back to skills

Bun

ASecurity

Bun runtime patterns and best practices. Use when running scripts with bun, using bunx, writing Bun shell scripts, managing bun.lock, or running bun test.

  • 17 stars
  • 0 votes
  • 0 copies
  • 8 views
  • Added February 7, 2026
developmenttypescriptshellangularnodetesting

Works with

  • cli

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add bendrucker/claude --skill bun --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Bun?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Bun
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bendrucker-bun/badge)](https://www.skillsdirectory.com/skills/bendrucker-bun)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: bun
description: >-
  Bun runtime patterns and best practices. Use when running scripts with bun,
  using bunx, writing Bun shell scripts, managing bun.lock, or running bun test.
user-invocable: false
---

# Bun

## bunx

Use `--bun` before the executable name to force the Bun runtime over Node shebangs. Use `-p`/`--package` when the binary name differs from the package name (e.g., `bunx -p @angular/cli ng`).

See [references/bunx.md](references/bunx.md)

## Lockfile

`bun.lock` is a text-based lockfile. Resolve merge conflicts by deleting it and running `bun install` to regenerate from scratch — never attempt to merge lockfile contents.

See [references/lockfile.md](references/lockfile.md)

## Resolution

Runtime flags must precede the script path: `bun --cwd ./packages/app run dev`. Never use `.js` extensions in TypeScript imports — Bun resolves them natively.

See [references/resolution.md](references/resolution.md)

## Shell

`Bun.$` is a tagged template for shell execution. Use `.text()` for string output, `.nothrow()` to handle failures without exceptions.

See [references/shell.md](references/shell.md)

## Testing

Bun runs tests in a single process. Set `AGENT=1` to suppress passing test output. Use `--bail` to stop after first failure, `-t` for name filtering.

See [references/testing.md](references/testing.md)

Files in this skill

  • SKILL.md1.3 KB
  • references/bunx.md276 B
  • references/lockfile.md460 B
  • references/resolution.md376 B
  • references/shell.md507 B
  • references/testing.md431 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.