Skip to main content
skill CX Codex

guide — Claude Code skill: what it does, how to install

Guides es-toolkit installation, import paths, and setup across Node.js, Bun, Deno, and browsers.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add toss/es-toolkit --skill guide -a claude-code
Open on GitHub

What guide does

The skill inspects project lockfiles like package-lock.json, yarn.lock, pnpm-lock.yaml, or bun.lock to pick the right package manager. When es-toolkit is already installed, the assistant resolves its package.json using require.resolve inside the target workspace. It reads real exports entries rather than relying on memorized lists.

Deno gets specific setup commands via jsr:@es-toolkit/es-toolkit. The skill flags namespace imports like import * as _ as anti-patterns because they break tree-shaking, steering users toward named imports instead. If you run this skill outside the official es-toolkit source repository, it cannot search local docs/ files and relies strictly on the installed package metadata.

What it helps with

  • install es-toolkit using the detected package manager
  • configure Deno imports from JSR using @es-toolkit/es-toolkit
  • switch to es-toolkit/compat for lodash drop-in replacements
  • replace wildcard imports with named imports to preserve tree-shaking

Example prompts for the agent

  • How do I install es-toolkit in a pnpm project?
  • What is the correct import path for lodash compatibility in es-toolkit?
  • How do I add es-toolkit to Deno using JSR?

How to install guide

1Skills CLI (Vercel)

npx skills add toss/es-toolkit --skill guide -a claude-code

2Manually: put the files in place

~/.claude/skills/guide/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/guide/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about guide

How do I install guide in Claude Code?

Run npx skills add toss/es-toolkit --skill guide -a claude-code. The skill file is placed in ~/.claude/skills/guide/SKILL.md.

What does the guide skill do?

It provides runtime-specific commands and import patterns for es-toolkit across Node.js, Bun, Deno, and browsers. It also guides users away from namespace imports that hurt tree-shaking.

How does the skill detect installed es-toolkit exports?

It runs node -e "console.log(require.resolve('es-toolkit/package.json'))" (or yarn node under Yarn PnP) and inspects the resolved package exports directly.

Source text

SKILL.md · MIT
---
name: guide
description: es-toolkit usage guide covering installation, import patterns, and setup for Node.js, Bun, Deno, and browsers. Use when the user asks how to install, import, or set up es-toolkit in their project.
argument-hint: '[topic: install, import, setup, bundle, performance]'
allowed-tools: Read, Grep, Glob, Bash
---

# es-toolkit Usage Guide

Provide guidance on installing, importing, and using es-toolkit across different runtimes.

## Input

$ARGUMENTS — A topic or question about es-toolkit usage.

## Why source-of-truth matters

Installation commands and import paths change across versions. When es-toolkit is already installed, verify its version and exports from the installed package. The skill may be installed as a standalone directory, so never assume the es-toolkit repository or a sibling `docs` directory is available.

## Workflow

### 1. Inspect the user's project

Detect the package manager from its lockfile:

- `package-lock.json` → npm
- `yarn.lock` → Yarn
- `pnpm-lock.yaml` → pnpm
- `bun.lock` or `bun.lockb` → Bun

If es-toolkit is installed, resolve its package metadata from the package that depends on it:

```bash
node -e "console.log(require.resolve('es-toolkit/package.json'))"
```

Run the command from the relevant workspace package, not automatically from a monorepo root. If the project uses Yarn Plug'n'Play, use `yarn node` instead of `node`. Read the resolved `package.json` to verify the installed version and its `exports`.

If the command fails because es-toolkit is not installed yet, continue with the installation guidance below; do not search for repository-relative files.

### 2. Answer based on the user's environment

Identify the runtime (Node.js, Bun, Deno, browser) and provide environment-specific guidance.

Stable setup facts:

- **Deno**: `deno add jsr:@es-toolkit/es-toolkit` (note the `jsr:` prefix)
- **Deno import path**: `'@es-toolkit/es-toolkit'` (extra scope vs npm)
- **npm/yarn/pnpm/bun**: Provide the command matching the detected package manager. If no lockfile exists, ask which package manager the user prefers or show the available commands.
- **Import path**: `'es-toolkit'` for strict, `'es-toolkit/compat'` for lodash-compatible
- **Browser/CDN**: jsdelivr and unpkg provide the UMD build (`_` global), while esm.sh provides ES modules. Link to the official usage page below for current snippets.

### 3. Cover these topics as relevant

- **Installation**: per-runtime commands
- **Import patterns**: named imports (recommended for tree-shaking), category imports, and compat imports. If the package is installed, list available subpath imports from the resolved package's `exports` instead of using a memorized list.
- **Anti-patterns to avoid**: Warn against namespace imports (`import * as _ from 'es-toolkit'`) as they defeat tree-shaking. Always prefer named imports (`import { chunk, debounce } from 'es-toolkit'`).
- **Bundle size and performance**: Link to the official pages below. Quote exact numbers only when the user supplied them or the current repository checkout contains the benchmark data; do not retain stale figures in the skill.
- **Type safety**: Built-in TypeScript declarations are included with the package.

### 4. Use repository documentation only when it exists

If the current project is the es-toolkit source repository, local files under `docs/` and `src/` are authoritative and can be searched. Otherwise, use the installed package metadata and declarations. Never expect a `docs` directory next to this skill.

### 5. Always include doc links

End responses with relevant links:

```
## Learn More
- Documentation: https://es-toolkit.dev/intro.html
- Usage: https://es-toolkit.dev/usage.html
- Bundle size: https://es-toolkit.dev/bundle-size.html
- Performance: https://es-toolkit.dev/performance.html
- GitHub: https://github.com/toss/es-toolkit
```

© toss · MIT · toss/es-toolkit

Similar skills

All skills for Programming languages →

From the same set3

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor