tapforce-pnpm
SKILL.md
Tapforce pnpm Skill
This skill provides best practices for using pnpm ^10.0.0 in Node.js projects.
When to Use
Use this skill when:
- Working with any Node.js project
- Setting up a new Node.js project
- Converting a project to use pnpm
- Managing dependencies in a Node.js project
Requirements
- Project based on Node.js ^20.0.0
- Local environment with pnpm ^10.0.0 installed
Validate Current Environment
Before starting to use pnpm, validate the current environment:
- Check current package manager: Verify if pnpm is being used
- Check Node.js version: Ensure compatibility with pnpm
- Check project setup: Verify if the project is configured for pnpm
Use pnpm
To use pnpm effectively, you must use pnpm commands consistently.
Workspace Configuration
- Always ensure the project has a
pnpm-workspace.yamlfile at the root - The file must include a
packagesproperty with an array of relative paths to package directories - This file MUST exist before running any pnpm commands
Command Consistency
- Use
pnpminstead ofnpmor any other package manager for all commands - If you encounter a command with a different package manager prefix, automatically replace it with
pnpm
Creating Workspace Configuration
If you need to create pnpm-workspace.yaml, add a packages property with . as the default value. Avoid creating a packages property in package.json as it's not stable.
Default workspace.yaml:
packages:
- .
Version Pinning
For strict version management with pnpm ^10.0.0:
Global Version Management
# Install specific pnpm version
npm install -g pnpm@10.20.0
# Use pnpm to manage itself
pnpm install -g pnpm@10.20.0
# Lock to major version 10
pnpm install -g pnpm@^10.0.0
Project-Level Version Control
// package.json
{
"packageManager": "pnpm@10.20.0",
"engines": {
"pnpm": ">=10.0.0"
}
}
.npmrc Configuration
# .npmrc
package-manager-strict=true
save-exact=true
Team Version Synchronization
# Verify team version consistency
pnpm --version
# Force specific version in CI
npm install -g pnpm@10.20.0
Common Commands
pnpm install- Install dependenciespnpm add <package>- Add a dependencypnpm add <package> --save-dev- Add a dev dependencypnpm add <package>@exact- Add exact versionpnpm update- Update dependenciespnpm run <script>- Run a script from package.jsonpnpm workspace <command>- Run commands across the workspace
Rules
This skill includes the following rules:
Environment Validation
- Rule: environment-validation
- Description: Rules for validating pnpm environment before usage
Command Consistency
- Rule: command-consistency
- Description: Rules for maintaining consistent pnpm command usage
Workspace Setup
- Rule: workspace-setup
- Description: Rules for setting up and managing pnpm workspaces
Version Management
- Rule: version-management
- Description: Rules for strict version management and pinning strategies
Package Manager Consistency
- Rule: package-manager-consistency
- Description: Rules for maintaining strict package manager consistency - never switch from pnpm to other package managers
Best Practices
- Always use workspace configuration for monorepo projects
- Keep pnpm version consistent across team members (>= 10.0.0)
- Use
pnpm-lock.yamlfor dependency locking - Prefer
pnpmover npm/yarn for better performance and disk space efficiency - Pin pnpm version in package.json with
"packageManager": "pnpm@10.x.x" - Use exact versions for production dependencies with
--save-exact - Implement strict version management in CI/CD environments
- Regular security updates while maintaining major version compatibility
Weekly Installs
21
Repository
tapforce/agents-skillsFirst Seen
Feb 2, 2026
Security Audits
Installed on
windsurf18
opencode5
codex5
gemini-cli4
codebuddy4
github-copilot4