Install
openclaw skills install typescript-package-managerExpert 10x Software engineer specializing in TypeScript with deep knowledge of all popular package management tools including npm, yarn, pnpm, bun, and deno. Use when asked to configure package managers, manage dependencies, set up workspaces, resolve package conflicts, optimize package.json files, troubleshoot installation issues, or work with monorepos. Dependency, installer, and helper-script actions require explicit user approval and diff review before execution.
openclaw skills install typescript-package-managerAn expert skill for managing TypeScript projects with comprehensive knowledge of modern package management tools and ecosystem best practices. The skill defaults to read-only guidance; any action that installs packages, mutates package.json or a lockfile, runs a remote installer, or executes a bundled helper script must be proposed first and run only after the user explicitly approves it.
scripts/ (notably bun-workflow.js.txt and health-check.js.txt) shell out to local tools via child_process.execSync. They ship with a .js.txt extension so they are not directly executable; open and read each one, rename it back to .js only inside a trusted project working directory you control, and run it only after confirming the exact command.curl -fsSL https://bun.sh/install | bash or powershell -c "irm bun.sh/install.ps1 | iex") executes whatever the upstream serves at that moment. Confirm the URL, prefer the official downloaded installer or your OS package manager, and pin to a known version when stricter review is required.--fix, and lockfile regenerations as mutating actions. Surface the exact command and the expected package.json / lockfile diff first, then proceed only after the user confirms.Keywords to trigger this skill quickly:
openPrompt = ["typescript-package-manager", "ts-pkg", "pkg-manager"]
Use these shorthand commands for quick invocation:
ts-pkg --install <package>pkg-manager --compare-toolsts-pkg migrate to pnpmpkg-manager --optimize workspaceThis skill provides deep knowledge across all major JavaScript/TypeScript package managers:
All of the following are mutating operations: propose the exact command, show the expected package.json and lockfile diff, and execute only after explicit user approval.
--fix flags require approval)Understanding version constraints in package.json:
Lock files ensure reproducible installations across environments:
Best Practice: Always commit lock files to version control.
Manage multiple packages in a single repository:
{
"workspaces": ["packages/*", "apps/*"]
}
Benefits:
Choose the Right Tool: Understand trade-offs between package managers for your project needs
Lock File Discipline: Always commit lock files to ensure reproducible builds across environments
Semantic Versioning: Use appropriate version constraints
^ (caret) for most dependencies (recommended)~ (tilde) for conservative updatesSecurity First: Regularly audit dependencies for vulnerabilities
npm audit # npm
yarn audit # yarn
pnpm audit # pnpm
bun pm audit # bun
Workspace Optimization: Leverage workspaces for monorepo efficiency and shared dependencies
Script Consistency: Use cross-platform compatible scripts (avoid shell-specific commands)
Minimal Dependencies: Avoid unnecessary packages to reduce complexity, security surface, and bundle size
Documentation: Document package manager choice, special configurations, and setup instructions in README.md
CI/CD Optimization: Use frozen lockfiles in CI for deterministic builds
npm ci # npm
yarn install --frozen-lockfile # yarn
pnpm install --frozen-lockfile # pnpm
bun install --frozen-lockfile # bun
Version Management: Use packageManager field in package.json to enforce consistency
{
"packageManager": "pnpm@8.15.0"
}
npm (Default Choice)
yarn (Enhanced Features)
pnpm (Recommended for Most Projects)
bun (Cutting Edge)
deno (Security-First)
# npm
npm install
# yarn
yarn install
# pnpm
pnpm install
# bun
bun install
# Production dependency
npm install package-name
yarn add package-name
pnpm add package-name
bun add package-name
# Development dependency
npm install --save-dev package-name
yarn add --dev package-name
pnpm add --save-dev package-name
bun add --dev package-name
# All package managers support npm scripts
npm run script-name
yarn script-name
pnpm script-name
bun run script-name
Installation Failures:
Version Conflicts:
Performance Issues:
Lock File Conflicts:
See the references/ folder for detailed documentation:
See the scripts/ folder for workflow guides and automation. The helper sources ship with a .js.txt extension so they are inert until a user explicitly renames them to .js; they execute local shell commands through child_process.execSync (for example bun-workflow.js.txt line 45 and health-check.js.txt line 47 to detect tool versions). Read each helper before renaming, run it only inside a trusted project directory, and prefer the .md walkthroughs when you only need reference material.
.js before running with Node).js before running). The documented Bun installer one-liners (curl … | bash, irm … | iex) fetch and execute remote code; verify the source URL and prefer a pinned, downloaded installer when stricter review is required..js before running)See the assets/ folder for templates and reference materials: