agentleFS
sahildavesahildave/skilltopia/.agents/skills/change-package-manager/SKILL.md

change-package-manager

Skill0 starsChanged 3 months agoMITView on GitHub

Switch the project's package manager between npm, bun, and pnpm. Updates all config, scripts, documentation, CI workflows, and AI instructions. Use when initializing from template or switching package managers.

  • Installs packages

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 1

    1. dannysmith/tauri-template★ 31295% same

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository12 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 6 are distinctive, and 11 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 11

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If $ARGUMENTS is not exactly bun, pnpm, or npm, ask the user which package manager they want.

    line 11
  2. Very specific:

    Read package.json. Replace the current PM's run command with the target PM's in all script values.

    line 34
  3. Very specific:

    Read src-tauri/tauri.conf.json.

    line 38
  4. Very specific:

    Read .github/workflows/release.yml and apply the appropriate pattern:

    line 42
  5. Very specific:

    Add a step before Setup Node.js:

    line 55
  6. Very specific:

    Ensure standard actions/setup-node@v4 with cache: 'npm'

    line 65
  7. Very specific:

    Ensure npm ci for install step

    line 66
  8. Distinctive:

    Remove any pnpm/bun setup steps

    line 67
  9. Very specific:

    Delete the old lock file (whichever of package-lock.json, bun.lock, pnpm-lock.yaml exists)

    line 71
  10. Distinctive:

    Run the target PM's install command to generate the new lock file

    line 72
  11. Distinctive:

    Update these files, replacing PM commands contextually:

    line 76
  12. Very specific:

    AGENTS.md: Update rule 0 (the "Use npm only" line) to reflect the new PM.

    line 78
  13. Very specific:

    .Codex/settings.local.json: Update Bash(npm ...) permission patterns to use the new PM (e.g.

    line 82
  14. Distinctive:

    Use Grep to find all remaining references to the old PM across the codebase.

    line 86
  15. Very specific:

    All files under docs/developer/

    line 94
  16. Distinctive:

    Run a final search for any remaining references to the old PM:

    line 99
  17. Distinctive:

    If the target PM is already in use, inform the user and stop

    line 113

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Switch this project's package manager to $ARGUMENTS.

If $ARGUMENTS is not exactly bun, pnpm, or npm, ask the user which package manager they want.

Command Mapping Reference

Detect the current package manager from AGENTS.md or package.json scripts. Use this table for all replacements:

Contextnpmbunpnpm
Install depsnpm installbun installpnpm install
Run scriptnpm run Xbun run Xpnpm run X
CI frozen installnpm cibun install --frozen-lockfilepnpm install --frozen-lockfile
Add depnpm install pkgbun add pkgpnpm add pkg
Add dev depnpm install -D pkgbun add -D pkgpnpm add -D pkg
Remove depnpm uninstall pkgbun remove pkgpnpm remove pkg
Auditnpm auditbun auditpnpm audit
Global installnpm install -g pkgbun install -g pkgpnpm add -g pkg
Execute binarynpxbunxpnpm dlx
Lock filepackage-lock.jsonbun.lockpnpm-lock.yaml

Step 1: Functional Config

package.json scripts

Read package.json. Replace the current PM's run command with the target PM's in all script values. For example, npm run typecheck becomes bun run typecheck.

tauri.conf.json

Read src-tauri/tauri.conf.json. Update beforeDevCommand and beforeBuildCommand.

GitHub Actions CI

Read .github/workflows/release.yml and apply the appropriate pattern:

Target: bun

  • Replace the Setup Node.js step with:
    - name: Setup Bun
      uses: oven-sh/setup-bun@v2
  • Replace npm ci with bun install --frozen-lockfile

Target: pnpm

  • Add a step before Setup Node.js:
    - name: Setup pnpm
      uses: pnpm/action-setup@v4
  • Change cache: 'npm' to cache: 'pnpm' in the setup-node step
  • Replace npm ci with pnpm install --frozen-lockfile

Target: npm

  • Ensure standard actions/setup-node@v4 with cache: 'npm'
  • Ensure npm ci for install step
  • Remove any pnpm/bun setup steps

Step 2: Lock File

  • Delete the old lock file (whichever of package-lock.json, bun.lock, pnpm-lock.yaml exists)
  • Run the target PM's install command to generate the new lock file

Step 3: AI Instructions & Codex Config

Update these files, replacing PM commands contextually:

  • AGENTS.md: Update rule 0 (the "Use npm only" line) to reflect the new PM. For example: 0. **Use bun only**: This project uses \bun`, NOT `npm`. Always use `bun install`, `bun run`, etc.`
  • .Codex/skills/init/SKILL.md: Replace PM commands in verification/next-steps sections
  • .Codex/skills/check/SKILL.md: Replace PM commands
  • .Codex/agents/cleanup-analyzer.md: Replace PM commands
  • .Codex/settings.local.json: Update Bash(npm ...) permission patterns to use the new PM (e.g. Bash(bun run format:*))

Step 4: Documentation

Use Grep to find all remaining references to the old PM across the codebase. Update every documentation file, making sentences read naturally — don't do blind find-replace on prose.

Key files to check:

  • README.md
  • docs/USING_THIS_TEMPLATE.md
  • docs/CONTRIBUTING.md
  • docs/SECURITY.md
  • All files under docs/developer/
  • scripts/prepare-release.js (help text)

Step 5: Verify

Run a final search for any remaining references to the old PM:

grep -rn "OLD_PM_NAME" --include="*.md" --include="*.json" --include="*.yml" --include="*.js" --include="*.ts" . | grep -v node_modules | grep -v ".lock"

Review any remaining hits — some are intentional (.gitignore entries, .cursorignore patterns listing all PM artifacts).

Important Rules

  • Do NOT change .gitignore or .cursorignore — these intentionally list artifacts for all PMs
  • Do NOT change references to node_modules/ — all three PMs use this directory
  • Preserve natural prose in docs — make sentences read correctly, don't just swap words
  • npx → bunx (bun) or pnpm dlx (pnpm)
  • If the target PM is already in use, inform the user and stop

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.