rule-package-management

Enforce pnpm-only installs with exact versions and Node >= 22.

1|Updated Apr 17, 2025
One-click install
npx skills add https://github.com/carrot-foundation/schemas --skill rule-package-management
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rule-package-management
Source: https://github.com/carrot-foundation/schemas/tree/main/.agents/skills/rule-package-management
Command: npx skills add https://github.com/carrot-foundation/schemas --skill rule-package-management

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents dependency drift and bloat by enforcing pnpm-only installs, exact versions, and a Node >= 22 requirement, ensuring consistent, secure builds.

Core Features & Use Cases

  • Enforces pnpm-only usage via preinstall checks to block npm or yarn
  • Forces exact versioning for production and development dependencies with clear guidance
  • Validates Node engine compatibility (Node >= 22) in engines and CI checks
  • Minimizes production dependencies to reduce footprint across consumer projects

Quick Start

Install dependencies with pnpm and apply the exact-version rules outlined in this guide.

Frequently Asked Questions about rule-package-management

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent dependency drift when using pnpm in CI workflows?

Prevent pnpm dependency drift in CI by enforcing exact version installs and validating the pnpm-lock.yaml file across development and release workflows. This blocks npm or yarn and requires strict versioning for consistent builds.

How do I block npm or yarn and enforce pnpm-only installs in a Node project?

Enforce pnpm-only installs by using a preinstall script that checks the active package manager and aborts the process if it detects npm or yarn. This secures the dependency environment across all workflows.

Can I use this package management approach with Node versions older than 22?

No, this package management approach requires Node >= 22. Engine constraints and CI checks actively validate Node compatibility to ensure the environment meets the minimum version requirement before proceeding.

Why should I use exact versions for production dependencies in pnpm?

Use exact versions for production dependencies to minimize your project footprint and prevent unexpected updates. This approach reduces dependency bloat and ensures consistent behavior across consumer projects by locking specific package versions.

What is the best way to minimize production dependencies and prevent bloat?

Minimize production dependencies and prevent bloat by enforcing strict pnpm-only rules with exact version checks. Applying preinstall scripts and engine constraints keeps the production footprint small and secure across consumer projects.