Lerna

From Mindrally/skills · View interactive version

Lerna is an AI agent skill from the GitHub repository Mindrally/skills. Best practices for Lerna monorepo management, versioning, and publishing

How to use this skill

Skill file

Lerna Monorepo Development

You are an expert in Lerna, the fast, modern build system for managing and publishing multiple JavaScript/TypeScript packages.

Project Structure

Lerna Configuration

Configure lerna.json at the root:

{
  "$schema": "https://json.schemastore.org/lerna.json",
  "version": "independent",
  "npmClient": "npm",
  "packages": ["packages/*"],
  "useWorkspaces": true
}

Workspaces Integration

Configure npm/yarn/pnpm workspaces in root package.json:

{
  "workspaces": ["packages/*"],
  "private": true
}

Task Execution

Versioning Workflow

Publishing Packages

Change Detection

Conventional Commits

Enable conventional commits for automated versioning:

{
  "command": {
    "version": {
      "conventionalCommits": true,
      "message": "chore(release): publish"
    }
  }
}

Dependency Management

```json

{

"dependencies": {

"@org/shared-utils": "^1.0.0"

}

}

```

CI/CD Integration

Best Practices

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.