plugins/smedjen/skills/package-managers/SKILL.md
pnpm workspaces, npm scripts, lockfile management, peer dependencies, and node version management. Covers package manager selection, monorepo setup, lockfile discipline, peer dep resolution, and version pinning strategy.
npx skillsauth add hjemmesidekongen/ai package-managersInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Reproducible installs depend on three things: the right package manager for the project shape, a committed lockfile, and a pinned Node version. Get all three right before writing a line of application code.
Default to pnpm for monorepos. Its content-addressable store saves disk, its strict hoisting mode blocks phantom dependency access, and workspace filtering (--filter) is first-class. Use npm for single-package libraries where contributor friction matters more than disk efficiency. Avoid yarn classic (v1) on new projects — it's in maintenance mode. yarn berry works but the PnP linking model creates friction with many tools.
pnpm workspaces require pnpm-workspace.yaml at the root listing package globs. npm workspaces use a workspaces array in the root package.json. Both resolve cross-workspace deps as symlinks. Shared dev tooling (eslint, typescript, vitest) belongs in the root devDependencies — don't repeat it per-package unless versions must differ.
Commit the lockfile. Always. Floating installs are a reproducibility failure waiting to happen.
pnpm install --frozen-lockfile (or npm ci) in CI — never install without the flag.install, not by hand-editing.pnpm install after dependency changes, not as a side effect of other commands.Libraries declare what the host application must provide via peerDependencies. Applications resolve those by listing the actual version in dependencies. Mark optional peers with peerDependenciesMeta: { "<pkg>": { optional: true } } to avoid install warnings when the peer is not needed. pnpm auto-installs missing peers by default (configurable via auto-install-peers).
Pin Node via .nvmrc (nvm/fnm) or a volta key in package.json. Also set engines.node in package.json so npm install warns on mismatches. fnm is the fastest switcher on macOS (Rust-based, shell hook auto-switches on .nvmrc). volta pins per-project without shell hooks, useful in team environments where nvm adoption is inconsistent.
npm install --legacy-peer-deps to silence errors — fix the actual conflict.devDependencies in libraries should not bleed into consumer bundles; verify with npm pack --dry-run.files field in package.json to control what gets published — default publishes everything, which leaks source maps and test fixtures.exports map beats main/module for dual CJS/ESM packages — it controls subpath imports and blocks deep internal imports.See references/process.md for workspace filtering commands, script lifecycle hooks, cross-platform script patterns, dependency resolution internals, publishing workflow, security audit commands, and monorepo anti-patterns.
development
Creates a brand from scratch through market research and interactive sparring. Runs competitive research via Perplexity, then guides the user through positioning, audience, voice, values, and content pillars. Produces the full brand guideline set at .ai/brand/{name}/. Use when building a new brand, defining brand strategy for a product, or when /våbenskjold:create is invoked.
testing
Loads brand guidelines from .ai/brand/{name}/ and makes them available to the current context. Progressive disclosure: L1 confirms brand exists, L2 loads summary, L3 loads specific files on demand. Use when a downstream skill or user needs brand context, or when /våbenskjold:apply is invoked.
documentation
Guided reinvention of an existing brand guideline. Loads current brand from .ai/brand/{name}/, identifies what to keep vs change, and walks the user through targeted evolution. Preserves brand equity while updating positioning, voice, or values. Use when refreshing a brand or when /våbenskjold:evolve is invoked.
development
Codifies an existing brand from materials, samples, and references. Analyzes provided content to extract voice patterns, values, and positioning. Produces the same guideline format as brand-strategy. Use when a brand already exists but isn't documented, or when /våbenskjold:audit is invoked.