Skip to content
Back to skills

Installing Npm Packages

BSecurity

npm、yarn、pnpm、bun で適切なバージョンのパッケージをインストールします。npm、yarn、pnpm、bun を使ってパッケージをインストールするときに必ず使用してください。

  • 666 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added February 9, 2026
toolsbash

Security analysis

B76/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies
  • mediumInstalls packages at runtime which could introduce malicious dependencies
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill installing-npm-packages --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Installing Npm Packages?

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

Security grade badge for Installing Npm Packages
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-installing-npm-packages/badge)](https://www.skillsdirectory.com/skills/majiayu000-installing-npm-packages)

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: personal-installing-npm-packages
description: npm、yarn、pnpm、bun で適切なバージョンのパッケージをインストールします。npm、yarn、pnpm、bun を使ってパッケージをインストールするときに必ず使用してください。
---

# パッケージインストール

## ワークフロー

### 1. パッケージマネージャーの検出

#### 1-1. `packageManager` フィールドを確認

```bash
grep '"packageManager"' package.json
```

#### 1-2. lock ファイルを確認(`packageManager` フィールドがない場合)

```bash
ls package-lock.json yarn.lock pnpm-lock.yaml bun.lockb 2>/dev/null
```

### 2. 最新バージョンを取得

```bash
npm view <pkg> version
```

### 3. インストール

| 種類            | npm                        | yarn                    | pnpm                    | bun                    |
| --------------- | -------------------------- | ----------------------- | ----------------------- | ---------------------- |
| dependencies    | `npm install <pkg>@<v>`    | `yarn add <pkg>@<v>`    | `pnpm add <pkg>@<v>`    | `bun add <pkg>@<v>`    |
| devDependencies | `npm install -D <pkg>@<v>` | `yarn add -D <pkg>@<v>` | `pnpm add -D <pkg>@<v>` | `bun add -d <pkg>@<v>` |

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.