Token导航 LogoToken导航TokenDH.com
运维和基础设施需要联网github未标认证来源可访问clear审计通过

lernalerna 命令行

Agent Skill

lerna 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

5,655

周安装

231

GitHub Stars

87

下载量

1,811
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:lerna(lerna 命令行)
来源仓库:https://github.com/mindrally/skills
仓库路径:skills/lerna
安装命令:
npx skills add https://github.com/mindrally/skills --skill lerna
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/mindrally/skills --skill lerna

简介

lerna 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合围绕仓库状态、代码变更或协作事项进行整理和分析。
  • 通过 npx 命令从指定 GitHub 仓库安装,需结合原始 README 确认具体用法。
  • 安装前建议确认权限范围和维护状态,注意可能触发联网或命令执行操作。
  • lerna 属于运维和基础设施类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Lerna Monorepo Development

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

Project Structure

  • Organize packages following Lerna conventions:

- packages/ - All package directories (default) - Can customize with multiple directories in lerna.json

  • Each package should be self-contained with its own:

- package.json - Source code - Tests - Build configuration

Lerna Configuration

Configure lerna.json at the root:

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

- "version": "independent" - Each package versioned separately - "version": "1.0.0" - Fixed/locked mode, all packages same version

  • Enable workspaces integration with useWorkspaces: true

Workspaces Integration

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

{
  "workspaces": ["packages/*"],
  "private": true
}
  • Let the package manager handle hoisting and linking
  • Use Lerna for versioning, publishing, and running scripts

Task Execution

  • Run scripts across packages:

- lerna run build - Run build in all packages - lerna run test --scope=@org/package - Run in specific package - lerna run lint --since main - Run only in changed packages

  • Use --stream for real-time output
  • Use --parallel for concurrent execution

Versioning Workflow

  • Update versions with lerna version:

- lerna version patch - Bump patch version - lerna version minor - Bump minor version - lerna version major - Bump major version - lerna version - Interactive version selection

  • Lerna automatically:

- Updates package.json versions - Updates internal dependency versions - Creates git tags - Pushes to remote

Publishing Packages

  • Publish with lerna publish:

- lerna publish - Publish packages changed since last release - lerna publish from-git - Publish packages tagged in git - lerna publish from-package - Publish packages with unpublished versions

  • Configure npm registry in .npmrc or lerna.json
  • Use --dist-tag for pre-release versions

Change Detection

  • Use --since flag for changed packages:

- lerna run test --since main - lerna changed - List packages changed since last tag - lerna diff - Show diff since last release

  • Leverage affected commands in CI for efficiency

Conventional Commits

Enable conventional commits for automated versioning:

{
  "command": {
    "version": {
      "conventionalCommits": true,
      "message": "chore(release): publish"
    }
  }
}
  • Commits determine version bumps:

- fix: - Patch version - feat: - Minor version - BREAKING CHANGE: - Major version

  • Automatic changelog generation

Dependency Management

  • Use internal package references: {"dependencies": {"@org/shared-utils": "^1.0.0"}}
  • Lerna keeps internal dependencies in sync during versioning
  • Hoist common dependencies to root with workspaces

CI/CD Integration

  • Install dependencies once at root level
  • Use lerna run with --since for efficient CI
  • Publish from CI with proper npm authentication
  • Use --yes flag for non-interactive publishing

Best Practices

  • Keep packages focused and single-purpose
  • Use consistent package naming: @org/package-name
  • Maintain clear dependency boundaries between packages
  • Document package APIs and usage
  • Use TypeScript with project references for type checking
  • Implement proper testing at package and integration levels
  • Consider Nx integration for advanced caching and task execution

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenCode

28.54%
按下载量换算517

Claude Code

22.61%
按下载量换算409

Antigravity

16.45%
按下载量换算298

Codex

12.83%
按下载量换算232

Gemini CLI

8.03%
按下载量换算145

github-copilot

3.1%
按下载量换算56

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills