Bun Bytecode Caching
Speed up JavaScript execution with bytecode caching in Bun's bundler
Install
npx skills add jarle/bun-skills --skill Bun Bytecode Cachinggit clone --depth 1 https://github.com/jarle/bun-skills.git /tmp/bun-skills
mkdir -p ~/.claude/skills
cp -r /tmp/bun-skills/skills/bun-bundler-bytecode ~/.claude/skills/Bun-Bytecode-CachingPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Bytecode Caching
> Speed up JavaScript execution with bytecode caching in Bun's bundler
Bytecode caching is a build-time optimization that dramatically improves application startup time by pre-compiling your JavaScript to bytecode. For example, when compiling TypeScript's `tsc` with bytecode enabled, startup time improves by **2x**.
## Usage
### Basic usage (CommonJS)
Enable bytecode caching with the `--bytecode` flag. Without `--format`, this defaults to CommonJS:
```bash terminal icon="terminal" theme={"theme":{"light":"github-light","dark":"dracula"}}
bun build ./index.ts --target=bun --bytecode --outdir=./dist
```
This generates two files:
* `dist/index.js` - Your bundled JavaScript (CommonJS)
* `dist/index.jsc` - The bytecode cache file
At runtime, Bun automatically detects and uses the `.jsc` file:
```bash terminal icon="terminal" theme={"theme":{"light":"github-light","dark":"dracula"}}
bun ./dist/index.js # Automatically uses index.jsc
```
### With standalone executables
When creating executables with `--compile`, bytecode is embedded into the binary. Both ESM and CommonJS formats are supported:
```bash terminal icon="terminal" theme={"theme":{"light":"github-light","dark":"dracula"}}
# ESM (requires --compile)
bun build ./cli.ts --compile --bytecode --format=esm --outfile=mycli
# CommonJS (works with or without --compile)
bun build ./cli.ts --compile --bytecode --outfile=mycli
```Details
- Skill name
Bun Bytecode Caching- Repository
- jarle/bun-skills
- Path
skills/bun-bundler-bytecode/SKILL.md- License
- MIT
- Repo updated
- 24 February 2026
FAQ
What does the Bun Bytecode Caching skill do?
Speed up JavaScript execution with bytecode caching in Bun's bundler
How do I install the Bun Bytecode Caching skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add jarle/bun-skills --skill Bun Bytecode Caching. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Bun Bytecode Caching popular?
It lives in jarle/bun-skills, which has 9 GitHub stars and 1 forks.
Related skills
Bun Archive
9jarle/bun-skills
Create and extract tar archives with Bun's fast native implementation
Bun Auto Install
9jarle/bun-skills
Bun's automatic package installation feature for standalone script execution
Bun Bun Add
9jarle/bun-skills
Add packages to your project with Bun's fast package manager
Bun C Compiler
9jarle/bun-skills
Compile and run C from JavaScript with low overhead
Bun Bundler
9jarle/bun-skills
Bun's fast native bundler for JavaScript, TypeScript, JSX, and more
Bun Code Coverage
9jarle/bun-skills
Learn how to use Bun's built-in code coverage reporting to track test coverage and find untested areas in your codebase
Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.