🎯

Npm

v1.3.1

NPM package manager skills with dependency validation hooks.

Installation

Install han binary (required for hooks to work):

curl -fsSL https://han.guru/install.sh | bash

Then install this plugin:

han plugin install jutsu-npm

Overview

NPM package manager skills with dependency validation hooks for Claude Code.

Features

  • Automatic dependency sync: Ensures npm install runs when package.json or package-lock.json changes
  • Smart caching: Only runs when relevant files have changed
  • CI-like behavior: Tries npm ci first for reproducible installs, falls back to npm install

Installation

han plugin install jutsu-npm

Hooks

install (Stop hook)

Automatically runs when you stop Claude Code to ensure dependencies are in sync:

  • Detects directories containing package-lock.json
  • Only runs if package.json or package-lock.json have changed since last successful run
  • Attempts npm ci first for faster, reproducible installs
  • Falls back to npm install if lockfile needs updating

Configuration

You can customize the hook behavior in your project's han-config.yml:

jutsu-npm:
  hooks:
    install:
      enabled: true
      # Override the command if needed
      # command: "npm install"

To disable the hook for a specific project:

jutsu-npm:
  hooks:
    install:
      enabled: false

Note

If your project uses yarn instead of npm, consider using jutsu-yarn instead.

Hooks

⚠

Token Usage Notice

Hooks run automatically during Claude Code sessions and their output is sent to the model for processing. This may increase token usage and associated costs. Consider disabling hooks you don't need via han-config.yml.

🛑

Stop

Runs when the main Claude Code agent has finished responding. Can verify task completion, check quality gates, or ensure documentation requirements are met before the session ends.

🛑

SubagentStop

Runs when a Claude Code subagent (Task tool call) has finished responding. Can validate subagent outputs, enforce quality standards, or trigger additional workflows after delegated tasks complete.