Overview
Yarn package manager skills with dependency validation hooks for Claude Code.
Features
- Automatic dependency sync: Ensures
yarn installruns whenpackage.jsonoryarn.lockchanges - Smart caching: Only runs when relevant files have changed
- Frozen lockfile support: Tries
--frozen-lockfilefirst for CI-like behavior, falls back to regular install
Installation
han plugin install jutsu-yarn
Hooks
install (Stop hook)
Automatically runs when you stop Claude Code to ensure dependencies are in sync:
- Detects directories containing
yarn.lock - Only runs if
package.jsonoryarn.lockhave changed since last successful run - Attempts
yarn install --check-files --frozen-lockfilefirst - Falls back to
yarn installif lockfile needs updating
Configuration
You can customize the hook behavior in your project's han-config.yml:
jutsu-yarn:
hooks:
install:
enabled: true
# Override the command if needed
# command: "yarn install"
To disable the hook for a specific project:
jutsu-yarn:
hooks:
install:
enabled: false