add-npm-package

Generate and apply .nix derivation files for npm/pnpm packages.

1|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/rito528/dotfiles --skill add-npm-package
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-npm-package
Source: https://github.com/rito528/dotfiles/tree/main/.agents/skills/add-npm-package
Command: npx skills add https://github.com/rito528/dotfiles --skill add-npm-package

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires nix, fetchFromGitHub, pnpm, nodejs_22, makeWrapper, and includes scripts (resource) components.

What problem does it solve?

This Skill automates the process of adding new npm/pnpm packages to the nix/modules/npm/packages/ directory, simplifying package management for Nix-based systems.

Core Features & Use Cases

  • Package Version Checking: Ensures the correct version of a package is fetched.
  • Dependency Management: Automatically handles the dependencies for pnpm projects.
  • Building and Installing: Constructs and installs the package using the specified entrypoint.

Quick Start

Use the add-npm-package skill to add a new package, for example, by running: 'add-npm-package --name <package-name> --version <version-number>'.

Frequently Asked Questions about add-npm-package

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

FAQPage Schema
How do I add an npm package to a Nix environment?

To add an npm package to a Nix environment, you can generate and apply a .nix derivation file. This automates fetching the correct version and resolving dependencies for your Nix-based project.

How do I manage pnpm dependencies in a Nix project?

Managing pnpm dependencies in a Nix project is handled automatically during the derivation process. The system resolves and builds the specified package using your defined entrypoint.

Can I specify a version when adding npm packages to Nix?

Yes, you can specify a package version when adding npm packages to Nix. The process ensures the exact version you request is fetched and integrated into your Nix environment.

What is the best way to automate NPM package installation in Nix?

Automating NPM package installation in Nix is best achieved by generating dedicated .nix derivation files. This method provides precise version control and handles dependency resolution automatically.

Do I need Node.js to build npm packages in Nix?

Yes, you need Node.js to build npm packages in Nix. The environment relies on nodejs_22, pnpm, and makeWrapper to construct, install, and resolve dependencies for your packages.