Fast JavaScript package management with Bun - install, add, remove, update dependencies with optimized CLI flags for agentic workflows.
/plugin marketplace add laurigates/claude-plugins/plugin install typescript-plugin@lgates-claude-pluginsThis skill is limited to using the following tools:
Bun's package manager is significantly faster than npm/yarn/pnpm:
# Standard install
bun install
# CI/reproducible (frozen lockfile)
bun install --frozen-lockfile
# Production only (no devDependencies)
bun install --production
# Force reinstall
bun install --force
# Dry run (preview)
bun install --dry-run
# Add dependency
bun add <package>
# Add dev dependency
bun add --dev <package>
bun add -d <package>
# Pin exact version (no ^)
bun add --exact <package>
bun add -E <package>
# Global install
bun add --global <package>
bun add -g <package>
# Add to specific workspace
bun add <package> --cwd packages/mylib
# Remove dependency
bun remove <package>
# Remove from devDependencies
bun remove --dev <package>
# Dry run
bun remove --dry-run <package>
# Update within semver ranges
bun update
# Update to latest (ignore ranges)
bun update --latest
# Interactive selection
bun update --interactive
# Update across workspaces
bun update --recursive
# Check outdated packages
bun outdated
# Why is package installed?
bun why <package>
# List installed packages
bun pm ls
# View package cache
bun pm cache
{
"name": "monorepo",
"private": true,
"workspaces": ["packages/*", "apps/*"]
}
# Install all workspace deps
bun install
# Add to specific workspace
bun add express --cwd apps/api
# Run in matching workspaces
bun run --filter 'package-*' build
# Run in all workspaces
bun run --workspaces test
{
"dependencies": {
"shared-utils": "workspace:*"
}
}
| Context | Command |
|---|---|
| CI install | bun install --frozen-lockfile |
| Prod deploy | bun install --production |
| Preview changes | bun add --dry-run <pkg> |
| Exact versions | bun add --exact <pkg> |
| Workspace target | bun add <pkg> --cwd <path> |
| Force refresh | bun install --force |
| Flag | Short | Description |
|---|---|---|
--frozen-lockfile | Fail if lockfile changes | |
--production | -p | Skip devDependencies |
--dev | -d | Add to devDependencies |
--exact | -E | Pin exact version |
--global | -g | Global install |
--dry-run | Preview without executing | |
--force | -f | Force reinstall all |
--cwd <path> | Target directory | |
--latest | Update to latest version | |
--recursive | Apply across workspaces |
Lockfile mismatch in CI:
# Use frozen lockfile
bun install --frozen-lockfile
Peer dependency conflicts:
# Force install anyway
bun install --force
Package not found:
# Check if package exists
bun why <package>
| Variable | Description |
|---|---|
BUN_OPTIONS | Global CLI flags |
BUN_INSTALL | Bun installation directory |
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.