pnpm-dependencies
Manage npm/pnpm dependencies via CLI and pnpm catalogs only—never hand-edit manifests or invent versions. Use when adding, updating, removing, or pinning packages; editing package.json or pnpm-workspace.yaml dependencies; or when the user mentions pnpm, catalog, install, or deps.
- License 许可
- MIT
- 所属仓库
- Sdju/bapm
- 最近更新
- 2026-11-13
- Stars
- ★ 7
- Forks
- 1
01 前言 Front Matter
- name
- pnpm-dependencies
- description
- Manage npm/pnpm dependencies via CLI and pnpm catalogs only—never hand-edit manifests or invent versions. Use when adding, updating, removing, or pinning packages; editing package.json or pnpm-workspace.yaml dependencies; or when the user mentions pnpm, catalog, install, or deps.
03 SKILL.md 正文
pnpm Dependencies
Rules
- CLI only — add, update, and remove dependencies with the package manager CLI. Do not hand-edit
dependencies/devDependencies/peerDependencies/optionalDependenciesinpackage.json, or catalog version entries inpnpm-workspace.yaml. - No guessed versions — never invent a version from memory. Use
latest(or another explicit tag), or look up the current version first (pnpm view <pkg> version, npm registry, or docs), then install that. - pnpm catalog — shared dependency versions live in the workspace catalog. Prefer catalog-backed installs so packages use
catalog:and versions are defined inpnpm-workspace.yaml.
Workflow
Add a dependency
Prefer saving into the default catalog:
pnpm add <pkg> --save-catalog
pnpm add -D <pkg> --save-catalog
Filter to a workspace package when needed:
pnpm add <pkg> --save-catalog --filter <package-name>
Named catalogs (only if the repo uses them):
pnpm add <pkg> --save-catalog-name <catalog-name>
Version selection
| Intent | Approach |
|---|---|
| Current release | pnpm add <pkg>@latest --save-catalog or omit the range and let the CLI resolve |
| Specific release | First: pnpm view <pkg> version (or pnpm view <pkg> versions), then pnpm add <pkg>@<version> --save-catalog |
| Already in catalog | pnpm add <pkg> --save-catalog (reuses / prefers catalog under catalogMode: prefer) |
Do not write ^x.y.z into manifests by hand.
Update / remove
pnpm update <pkg>
pnpm update <pkg> --latest
pnpm remove <pkg>
pnpm remove <pkg> --filter <package-name>
pnpm update updates catalog: entries in pnpm-workspace.yaml when applicable — still use the CLI, do not patch the catalog by hand.
Install after clone / lockfile sync
pnpm install
Forbidden
- Editing dependency version strings or
catalog:entries directly inpackage.json/pnpm-workspace.yaml - Hardcoding versions from training data or “I think it’s 4.x”
- Adding the same shared dep with divergent literal versions across packages when a catalog entry should exist
Allowed exceptions
- Non-dependency manifest fields (scripts,
name,bin, exports, etc.) may be edited normally - Workspace protocol deps (
workspace:) follow the same CLI-first rule when adding package links - If the CLI cannot express a rare catalog/override edge case, say so and ask before any manual edit
04 同仓库更多 Skills
fixture-skill
暂无简介
orchestrate
Оркестратор реализации только через субагентов orch-*: OpenSpec plan, acceptance RED, apply GREEN, accept, promote, merge+ship (ветка/PR); self-commit внутри фазы. Использовать при /orchestrate, «оркестратор», «через субагентов».
openspec-update-change
Update an OpenSpec change by revising its existing planning artifacts and keeping them coherent with one another. Use when the user wants to revise a change's plan, fold new decisions into it, or reconcile its artifacts after an edit. Never edits code.
openspec-sync-specs
Sync delta specs from a change to main specs. Use when the user wants to update main specs with changes from a delta spec, without archiving the change.
openspec-propose
Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.
openspec-explore
Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.