Lerna
v1.3.1Lerna monorepo management skills with bootstrap validation hooks.
Installation
Install han binary (required for hooks to work):
curl -fsSL https://han.guru/install.sh | bashThen install this plugin:
han plugin install jutsu-lernaOverview
Lerna monorepo management skills with bootstrap validation hooks for Claude Code.
Features
- Automatic dependency bootstrapping: Ensures
lerna bootstrapruns when package dependencies change - Smart caching: Only runs when relevant files have changed
- CI-like behavior: Tries
--ciflag first for faster installs, falls back to regular bootstrap
Installation
han plugin install jutsu-lerna
Hooks
bootstrap (Stop hook)
Automatically runs when you stop Claude Code to ensure monorepo dependencies are properly linked:
- Detects directories containing
lerna.json - Only runs if
package.json,lerna.json, or lockfiles have changed since last successful run - Attempts
lerna bootstrap --cifirst for faster, reproducible installs - Falls back to
lerna bootstrapif needed
Configuration
You can customize the hook behavior in your project's han-config.yml:
jutsu-lerna:
hooks:
bootstrap:
enabled: true
# Override the command if needed
# command: "npx lerna bootstrap"
To disable the hook for a specific project:
jutsu-lerna:
hooks:
bootstrap:
enabled: false
Note
For modern Lerna (v7+) using npm/yarn/pnpm workspaces, the bootstrap command links local packages and installs remaining dependencies. Consider using jutsu-npm or jutsu-yarn alongside this plugin for complete dependency management.
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.