Bun Auto Install

Bun's automatic package installation feature for standalone script execution

9 stars 1 forksOther

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add jarle/bun-skills --skill Bun Auto-install
Manual install
git clone --depth 1 https://github.com/jarle/bun-skills.git /tmp/bun-skills
mkdir -p ~/.claude/skills
cp -r /tmp/bun-skills/skills/bun-runtime-auto-install ~/.claude/skills/Bun-Auto-install

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Auto-install

> Bun's automatic package installation feature for standalone script execution

If no `node_modules` directory is found in the working directory or higher, Bun will abandon Node.js-style module resolution in favor of the **Bun module resolution algorithm**.

Under Bun-style module resolution, all imported packages are auto-installed on the fly into a [global module cache](/pm/global-cache) during execution (the same cache used by [`bun install`](/pm/cli/install)).

```ts index.ts icon="https://mintcdn.com/bun-1dd33a4e/nIz6GtMH5K-dfXeV/icons/typescript.svg?fit=max&auto=format&n=nIz6GtMH5K-dfXeV&q=85&s=5d73d76daf7eb7b158469d8c30d349b0" theme={"theme":{"light":"github-light","dark":"dracula"}}
import { foo } from "foo"; // install `latest` version

foo();
```

The first time you run this script, Bun will auto-install `"foo"` and cache it. The next time you run the script, it will use the cached version.

***

## Version resolution

To determine which version to install, Bun follows the following algorithm:

1. Check for a `bun.lock` file in the project root. If it exists, use the version specified in the lockfile.
2. Otherwise, scan up the tree for a `package.json` that includes `"foo"` as a dependency. If found, use the specified semver version or version range.
3. Otherwise, use `latest`.

***

## Cache behavior

Once a version or version range has been determined, Bun will:

1. Check the module cache for a compatible version. If one exists, use it.
Read the full skill on GitHub

Details

Skill name
Bun Auto-install
Path
skills/bun-runtime-auto-install/SKILL.md
License
MIT
Repo updated
24 February 2026

FAQ

What does the Bun Auto Install skill do?

Bun's automatic package installation feature for standalone script execution

How do I install the Bun Auto Install skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add jarle/bun-skills --skill Bun Auto-install. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Bun Auto Install popular?

It lives in jarle/bun-skills, which has 9 GitHub stars and 1 forks.

Related skills

Browse the most popular Claude skills, all other skills, or write your own with the skills generator.