Skip to content
Back to skills

Source Command Setup Pm

ASecurity

Configure your preferred package manager (npm/pnpm/yarn/bun)

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 26, 2026
toolsshellbashnode

Security analysis

A100/100

Scanned November 26, 2026

npx -y skills add tangchunwu/skill-hub --skill source-command-setup-pm --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Source Command Setup Pm?

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

Security grade badge for Source Command Setup Pm
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tangchunwu-source-command-setup-pm/badge)](https://www.skillsdirectory.com/skills/tangchunwu-source-command-setup-pm)

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: "source-command-setup-pm"
description: "Configure your preferred package manager (npm/pnpm/yarn/bun)"
---

# source-command-setup-pm

Use this skill when the user asks to run the migrated source command `setup-pm`.

## Command Template

# Package Manager Setup

Configure your preferred package manager for this project or globally.

## Usage

```bash
# Detect current package manager
node scripts/setup-package-manager.js --detect

# Set global preference
node scripts/setup-package-manager.js --global pnpm

# Set project preference
node scripts/setup-package-manager.js --project bun

# List available package managers
node scripts/setup-package-manager.js --list
```

## Detection Priority

When determining which package manager to use, the following order is checked:

1. **Environment variable**: `CLAUDE_PACKAGE_MANAGER`
2. **Project config**: `.Codex/package-manager.json`
3. **package.json**: `packageManager` field
4. **Lock file**: Presence of package-lock.json, yarn.lock, pnpm-lock.yaml, or bun.lockb
5. **Global config**: `~/.Codex/package-manager.json`
6. **Fallback**: First available package manager (pnpm > bun > yarn > npm)

## Configuration Files

### Global Configuration
```json
// ~/.Codex/package-manager.json
{
  "packageManager": "pnpm"
}
```

### Project Configuration
```json
// .Codex/package-manager.json
{
  "packageManager": "bun"
}
```

### package.json
```json
{
  "packageManager": "pnpm@8.6.0"
}
```

## Environment Variable

Set `CLAUDE_PACKAGE_MANAGER` to override all other detection methods:

```bash
# Windows (PowerShell)
$env:CLAUDE_PACKAGE_MANAGER = "pnpm"

# macOS/Linux
export CLAUDE_PACKAGE_MANAGER=pnpm
```

## Run the Detection

To see current package manager detection results, run:

```bash
node scripts/setup-package-manager.js --detect
```

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.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.