npm
Use this skill for npm package operations with release-safe defaults.
Scope
- - OpenClaw packages in this monorepo (core + plugins)
- ClawHub CLI package/release checks when npm is involved
- npm publish, dist-tag, and version verification
Guardrails
- - Never publish from repo root unless explicitly requested for
openclaw. - For plugin-only releases, publish only changed plugins and keep
openclaw untouched. - For beta tags, publish matching beta versions (for example
2026.2.15-beta.1) with --tag beta. - Use
npm view <pkg> version --userconfig "$(mktemp)" for read-only verification. - If OTP is required, fetch it through the
1password skill in tmux before publish.
Quick Checks
CODEBLOCK0
OpenClaw Release-safe Flow
- 1. Verify target package and local version:
CODEBLOCK1
- 2. Publish from package directory only:
CODEBLOCK2
- 3. Verify published version:
CODEBLOCK3
- 4. For beta releases:
CODEBLOCK4
ClawHub Interop
- - Use npm only for ClawHub package version/auth concerns.
- Use
clawhub CLI for skill search/install/update/publish workflows. - If both are needed: publish npm package first, then run
clawhub publish/update commands.
Useful Commands
CODEBLOCK5
npm
使用此技能进行 npm 包操作,采用发布安全默认设置。
范围
- - 本单仓库中的 OpenClaw 包(核心 + 插件)
- 涉及 npm 时的 ClawHub CLI 包/发布检查
- npm 发布、dist-tag 和版本验证
安全护栏
- - 除非明确要求发布 openclaw,否则切勿从仓库根目录发布。
- 对于仅插件的发布,仅发布已更改的插件,保持 openclaw 不变。
- 对于 beta 标签,发布匹配的 beta 版本(例如 2026.2.15-beta.1),并使用 --tag beta。
- 使用 npm view version --userconfig $(mktemp) 进行只读验证。
- 如果需要 OTP,请在发布前通过 tmux 中的 1password 技能获取。
快速检查
bash
npm --version
npm whoami
npm view openclaw version --userconfig $(mktemp)
OpenClaw 发布安全流程
- 1. 验证目标包和本地版本:
bash
npm view version --userconfig $(mktemp)
node -p require(./package.json).version
- 2. 仅从包目录发布:
bash
cd
npm publish --access public --otp=
- 3. 验证已发布的版本:
bash
npm view version --userconfig $(mktemp)
- 4. 对于 beta 版本:
bash
npm publish --access public --tag beta --otp=
ClawHub 互操作
- - 仅将 npm 用于 ClawHub 包的版本/认证问题。
- 使用 clawhub CLI 进行技能搜索/安装/更新/发布工作流。
- 如果需要两者:先发布 npm 包,然后运行 clawhub 发布/更新命令。
常用命令
bash
检查包元数据
npm view
dist-tags --json --userconfig $(mktemp)
npm view versions --json --userconfig $(mktemp)
管理 dist-tags
npm dist-tag add @ beta
npm dist-tag add @ latest
验证当前认证上下文
npm whoami
npm profile get --json