Rez 包管理核心概念解析

SKILL开发

原名 rez-core-concepts

开发 未标注权限 许可证不明确
安装这个技能

讲解 Rez 的核心概念,包括包、版本、请求、仓库、包搜索路径、隐式包与变体,可解释版本与请求如何工作、包从哪里查找、解析为何选中某个版本。

一句话选型结论

按资料字段整理

Rez 包管理核心概念解析是开发类的 Agent Skill,安装方式未标注,权限级别未标注,许可证不明确,有可直接复制的安装命令。技能本质是给模型读的说明书,效果取决于模型与客户端;装完先用一个小任务验证,再放进正式流程。

分类开发 安装方式未标注 权限级别未标注权限 许可证许可证不明确
累计安装 未标注 本周 未标注
GitHub 星标 未标注 仓库 未标注
下载量 未标注 技能市场下载数
权限级别 未标注权限 安装前请确认风险范围
许可证 许可证不明确 未说明

安装

未标注
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
skillhub install user_07c3fda9/rez-core-concepts
  1. 1
    确认客户端支持

    确认你的客户端支持 Skills(Claude、Codex、Cursor 等),并升级到较新的版本。

  2. 2
    拿到技能文件

    执行上面的命令安装;也可以把仓库里的 SKILL.md 手动放进客户端的 skills 目录。

  3. 3
    刷新技能列表

    重新打开客户端,或刷新技能列表,让新放进来的技能被加载。

  4. 4
    验证是否生效

    问一句「你有哪些技能」,确认列表里出现它,再拿一个小任务试跑。

技能档案

开发
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方user_07c3fda9仓库 未标注 · 版本 未标注
宿主客户端未标注技能可被这些客户端加载
安装方式未标注安装包 community
权限级别未标注权限安装前请确认风险范围
许可证未说明许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验2026-11-06上游最后核验时间 · 数据更新 2026-11-06
正文体量9.4 KBSKILL.md 原文大小,越大说明说明书写得越细

能做什么

0 项能力
上游给出的能力概览与适用场景
理解 Rez 包与版本解释依赖解析结果了解包搜索路径

典型使用场景

3 类
按分类整理的常见用法,具体以 SKILL.md 为准
写代码与改 bug

按需求补代码、定位并修掉报错。

读仓库与生成改动

让模型读懂项目结构,再给出可落地的改动。

跑测试与排查故障

按现象排查问题,补测试用例并复跑。

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有可直接复制的安装命令,不用自己翻文档找入口。

先想清楚的地方

  • 没有标注权限级别,实际能做什么要装好后确认。
  • 许可证不明确,商用或二次分发前先到仓库确认条款。
  • 没有做站内核验,内容以作者仓库为准。
  • 技能只是说明书,实际效果取决于模型与客户端,装完先用小任务试一遍。

更适合

  • 需要在开发场景里给模型补一套做法的人。
  • 愿意先读一遍 SKILL.md、确认它会让模型做什么的人。

不太适合

  • 对许可证要求很严、必须明确可商用的人。
  • 只想装完就自动变强、不打算看说明书的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
技能权限级别安装方式累计安装宿主客户端安装命令
Rez 包管理核心概念解析当前 未标注权限 未标注 未标注 未标注 有
技能审查员 浏览器控制 ClawHub 市场 877.9 万 OpenClaw 有
Vercel React 最佳实践 浏览器控制 GitHub 仓库 849.1 万 Codex、Claude、Cursor 有
GitHub 代码协作 联网访问 ClawHub 市场 763.3 万 OpenClaw 有
网页设计指南 联网访问 GitHub 仓库 668.6 万 Codex、Claude、Cursor 有
本体论 只读 ClawHub 市场 663.7 万 OpenClaw 有

SKILL.md 全文

9.4 KB
模型实际读到的说明书原文,来自技能仓库

Rez core concepts

> One-sentence summary: Rez takes a request (a list of package requests), runs a
> solver over packages found on a search path, and produces a resolve — a
> conflict-free list of concrete package versions.

Reference: Rez 3.4.0.
Skill scope: concepts only. For package.py authoring see rez-package-definition,
for commands() see rez-package-commands, for resolve mechanics see rez-resolve,
for resolve failures see rez-resolve-troubleshooting.

Mental model

request ──► solver ──► resolve ──► package commands concatenated ──► shell code ──► subshell
  • A package is a versioned piece of software with a single definition file (package.py).
  • A variant is a build flavor of one package version (e.g. one per Maya/Python version).
  • A resolve never contains two versions of the same package — that is a conflict.
  • Rez never mutates your current shell; rez-env puts you in a subshell.

Versions

Version numbers are alphanumeric token lists separated by . or -.
Examples: 1, 1.0.0, 3.2.build_13, 4.rc1, 10a-5.

Ordering rules (tokens compared left to right):

Order Rule
1 letters before numbers (a < 1)
2 among letters: A–Z < _ < a–z (A < a, and _ sits between them)
3 zero-padded numbers before less-padded (02 < 2, 002 < 02)
4 mixed tokens split into letter/number groups and compared with the same rules

Alpha sub-tokens are compared with Python's native string comparison, so ordering follows ASCII
code points: A–Z (65–90) < _ (95) < a–z (97–122). That makes the full ordering:

sorted([&#x27;_&#x27;, &#x27;A&#x27;, &#x27;Z&#x27;, &#x27;a&#x27;, &#x27;z&#x27;, &#x27;0&#x27;, &#x27;9&#x27;], key=Version)
-&gt; [&#x27;A&#x27;, &#x27;Z&#x27;, &#x27;_&#x27;, &#x27;a&#x27;, &#x27;z&#x27;, &#x27;0&#x27;, &#x27;9&#x27;]

_ is not before everything — it comes after uppercase but before lowercase, so
1.0.rc_1 &gt; 1.0.RC1 while 1.0.rc_1 &lt; 1.0.rca.

Gotchas that matter in practice:

  • The delimiter is ignored for comparison: 1.0.0 == 1-0.0.
  • Longer shared-prefix wins: 1.0.0 > 1.0.
  • No special meaning for alpha/beta/rc. Semver is encouraged but not enforced, and
    semver ordering does not apply: foo-1.0.0 &lt; foo-1.0.0-beta.1 in Rez.

> Trust the code over the docs here. The ordering table in Rez's own basic_concepts.rst has
> one error: it claims a < A, but A < a in reality. Its other twelve rows — including
> 13 < 043 — are correct. The same mistake appears in the AlphanumericVersionToken docstring
> in src/rez/version/_version.py, which states alphas compare "_, then A-Z, then a-z". Since a
> source docstring gets this wrong too, treat the class itself as the only reliable benchmark
> and verify any ordering question that matters:
>
> bash &gt; python -c &quot;from rez.version._version import Version; print(sorted([&#x27;_&#x27;,&#x27;A&#x27;,&#x27;a&#x27;], key=Version))&quot; &gt;

Package requests

A request is a string matching a range of versions. Used in requires, variants and on the CLI.

Request Meaning
foo any version
foo-1 any foo-1[.x.x…]
foo-1+ foo-1 or greater
foo-1.2+&lt;2 &gt;=1.2, &lt;2
foo&lt;2 any version less than 2
foo==2.0.0 exactly 2.0.0
foo-1.3\|5+ OR'd requests

Two operators deserve special attention:

  • Conflict ! — !maya-2015.6 means no maya within 2015.6 (includes 2015.6.1).
  • Weak reference ~ — constrains the version if the package is present, but does not
    require it. Maya's package.py uses ~python-2.7.3 so that any python-using package picks
    the python compatible with Maya, without Maya actually depending on python.

Quote requests on the shell — &lt;, &gt;, | and ! are shell metacharacters:

rez-env &#x27;python-2.6+&#x27; &#x27;my_py_utils-5.4+&lt;6&#x27;

Repositories and the search path

Packages live in package repositories; Rez finds them via packages_path (a search path,
like PYTHONPATH). Inspect it with:

rez-config packages_path

Typical layout of the filesystem repository plugin:

/packages/inhouse/foo/1.1/package.py
                       /python/&lt;FILES&gt;
                       /bin/&lt;EXECUTABLES&gt;
/packages/inhouse/foo/1.2/
/packages/inhouse/foo/1.3/

Only the definition file location is fixed (root of the version dir); the rest is up to the build.

Shadowing rules — these cause most "wrong version" surprises:

  • Earlier paths on packages_path win, at version level: local foo-1.0.0 hides released
    foo-1.0.0, but not foo-1.2.0.
  • Rez does not merge variants of the same package version across repositories.
  • Rez does not fall back to a later repository when the earlier package has no compatible
    variant — a local Linux-only foo-1.0.0 hides a released Windows variant even on Windows.
  • Use rez-env --no-local to exclude locally installed packages from a resolve.

Typical setup: local_packages_path (~/packages) first so developers can test before release,
then central released repositories later in the path.

Implicit packages

Every request automatically gets implicit_packages appended. The default:

implicit_packages = [
    &quot;~platform=={system.platform}&quot;,
    &quot;~arch=={system.arch}&quot;,
    &quot;~os=={system.os}&quot;,
]

Rez models platform/arch/OS as packages. These are weak requirements, so a
platform-dependent package is constrained to the current system without forcing those packages in.
rez-env and rez-context print the implicits that were used.

Variants

A variant is a sub-build of one package version that differs by dependencies.
Each variant entry's requirements are appended to requires:

name = &quot;my_maya_plugin&quot;
version = &quot;1.0.0&quot;
requires = [&quot;openexr-2.2&quot;]
variants = [[&quot;maya-2016.sp2&quot;], [&quot;maya-2017&quot;]]

On disk, variants are subdirectories of the package version:

/rez/packages/my_maya_plugin/1.0.0/maya-2016.sp2/&lt;PAYLOAD&gt;
                                   /maya-2017/&lt;PAYLOAD&gt;
  • root = root of the current variant; base = the directory containing variants.
    For a package without variants, root == base.
  • hashed_variants = True installs variants under a hash instead, avoiding long paths and
    escaping problems with !/&lt;. use_variant_shortlinks adds symlinks under _v/.
  • Only one variant of a package is ever used in a given environment.

Variant selection

Default variant_select_mode = &quot;version_priority&quot;:

  1. Priority to packages that appear in the request list.
  2. Then priority to packages listed earlier in the variant.
  3. Prefer the higher version.

The other mode, intersection_priority, prefers the variant with the most packages present in
the request, with version priority secondary.

Undefined behavior: if variants are not mutually exclusive (e.g. [[&quot;maya-2016&quot;], [&quot;houdini-14&quot;]])
and the discriminating package is not in the request, Rez gives no guarantee which variant is
chosen. It is deterministic, just not predictable. Add the discriminator to the request to make it
predictable.

You cannot add variants to a package that has none without bumping the version — so adding a
single variant now is a common future-proofing move.

Ephemeral packages

Names starting with . are ephemerals: requests for packages that do not exist. They
participate in the solve (their ranges intersect, conflicts occur) but contribute no payload and
no commands(). Useful for passing resolved intent through an environment.

rez-env python .foo-1 .bah-2
echo $REZ_EPH_FOO_REQUEST   # 1
echo $REZ_USED_EPH_RESOLVE  # .foo-1 .bah-2

Environment variables set by Rez

Variable Meaning
REZ_USED_RESOLVE full resolved package list
REZ_USED_REQUEST the original request
REZ_USED_LOCAL_RESOLVE subset resolved from the local repository
REZ_USED_EPH_RESOLVE ephemerals in the resolve
REZ_USED_IMPLICIT_PACKAGES implicits used
REZ_USED_VERSION / REZ_USED_TIMESTAMP rez version / resolve time
REZ_&lt;PKG&gt;_ROOT root of the current variant of &lt;PKG&gt;
REZ_&lt;PKG&gt;_BASE base of &lt;PKG&gt; (parent of its variants)
REZ_&lt;PKG&gt;_VERSION version of &lt;PKG&gt;
REZ_RXT_FILE path to the context (.rxt) file when one was saved

Package names are upper-cased and non-alphanumerics become _: my_utils → REZ_MY_UTILS_ROOT.

Reading a resolve

rez-env foo bah

Output lists requested packages (with (implicit) and (ephemeral) labels) and
resolved packages (with (local) for local installs). The &gt; prompt prefix is the visual cue
that you are inside a Rez-configured environment.

Use rez-context for non-interactive inspection — see the rez-cli skill.

Agent workflow

  1. Inspect before guessing: rez-config packages_path, rez-search &lt;pkg&gt;, rez-status.
  2. Narrow the read — rez-context --so, rez-search &lt;pkg&gt; --latest — instead of dumping everything.
  3. Reproduce a resolve without entering a shell: rez-env &lt;reqs&gt; --output context.rxt.
  4. If a resolve fails, go to the rez-resolve skill; do not guess at the cause.

常见问题

5 问
答案由本站依据条目字段整理
Rez 包管理核心概念解析怎么安装?

在支持 Skills 的客户端里执行:skillhub install user_07c3fda9/rez-core-concepts。安装方式为未标注。装完刷新技能列表或重开客户端。

Rez 包管理核心概念解析支持哪些客户端?

资料没有标注宿主客户端,但只要客户端支持 Skills(Claude、Codex、Cursor 等),一般都能加载。

Rez 包管理核心概念解析权限高吗,安全吗?

权限级别为未标注权限。安装前先看它会读取或写入哪些内容。

Rez 包管理核心概念解析收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于技能本身和所用的模型或客户端,正式使用前按作者说明确认。

Rez 包管理核心概念解析用什么许可证?

许可证标注为 未说明(许可证不明确)。商用或二次分发前请到仓库确认条款原文。

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 2026-11-06。