rigc
Author, build and validate Spine 4.3 skeleton data (skeleton.json plus its .atlas) from loose part PNGs with rigc, the rig compiler that verifies its own output with named assertions before writing it. Use for any request to make a Spine rig or Spine animation from PNG parts, or where the source is a Live2D, Unity or video model whose pictures you can render, to run or read rigc build, validate, render, preview, check or vote, or to write or fix a *.rig.json or *.motion.json spec; it says which shipped guide to open for the need at hand. Not for Live2D conversion, cutting an illustration into parts, or real-time face tracking.
rig-c · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add rig-c/core --skill rigc技能说明
name: rigc description: Author, build and validate Spine 4.3 skeleton data (skeleton.json plus its .atlas) from loose part PNGs with rigc, the rig compiler that verifies its own output with named assertions before writing it. Use for any request to make a Spine rig or Spine animation from PNG parts, or where the source is a Live2D, Unity or video model whose pictures you can render, to run or read rigc build, validate, render, preview, check or vote, or to write or fix a *.rig.json or *.motion.json spec; it says which shipped guide to open for the need at hand. Not for Live2D conversion, cutting an illustration into parts, or real-time face tracking. license: MIT compatibility: Requires Bun 1.4 or later. The canonical npm package is @rig-c/core (bunx @rig-c/core, or bun add -d @rig-c/core); the command it installs is rigc. rig-c is the convenience install name; spine-rigc is the legacy install name.
rigc — a rig compiler for agents
rigc compiles a rig spec and a motion spec into Spine 4.3 skeleton data and an
atlas, runs its named assertions — rigc's own validator in the published package,
held to a @esotericsoftware/spine-core round trip's verdicts in its CI, all but
the parse itself — and writes only if every one is green. You cannot see the
rig you are authoring. The validator's messages and the shipped guides are the
whole interface, and this skill only says which of them to open.
📖 A failure line ends with the command that prints its row of the guide —
(see rigc guide <RULE>). Run that command first, before reading anything else:
it prints that rule's row of the shipped guide and nothing else. rigc guide §<n>
(and §<n>.<m>, §<n>.<m>.<k>) prints the section's heading, own prose and
subsection index from docs/AUTHORING.md; add --all to include subsection
bodies. A leaf prints its full text either way. Sizes describe full ledger spans;
--all with a rule name is refused, exit 2. A compile error points at its stable
CE_ code row. rigc guide §5.1.<k> prints a numbered compile-error group of
at most 30,000 UTF-8 bytes, and rigc guide §5.1 prints the introduction and
index within that same limit; only legacy uncoded library errors point at §5.1.
Non-negotiables
- Validation is never bypassed.
buildwrites nothing on a red gate; there is no flag to skip it, and none may be added — AUTHORING §0 says so in as many words. Correctness is the whole of the reason: the assertions are what make the output trustworthy, and they are held to the official parser's verdicts in the repository's CI — all but the parse itself, which runs only where the runtime is installed and is reported as a SKIP elsewhere. - The compiler never invents a value. A field the spec leaves out is a
CompileErrornaming that field. Fill the spec; do not expect a default read off the art — AUTHORING §2 and §5. - The validator's messages are the instructions. Each names the object, the value found and the value required, and AUTHORING §5 maps every named failure to the file that has to change.
- A green gate cannot see a wrong animation. If you were given pictures,
checkis the half of the loop that can; if not,renderorpreviewand look — AUTHORING §0 and §9.
Install
bunx @rig-c/core --help # run it without installing
bun add -d @rig-c/core # or pin it in the project; the command is `rigc`
bun rigc skills install # link this package's and every installed @rig-c/* package's skills into .agents/skills
bunx @rig-c/core skills install --copy # in a consumer without @rig-c/core installed (for example, only @rig-c/play)
Codex, Gemini CLI and Antigravity read skills from .agents/skills/ in the
workspace and none of them reads node_modules; rigc skills install scans this
package's skills/ and every node_modules/@rig-c/*/skills/<name>/SKILL.md (and
rig-c alias package) in the project, and rigc skills --help says what it refuses.
In a consumer without @rig-c/core installed, run bunx @rig-c/core skills install --copy:
it reaches the project's node_modules from the working directory and writes plain
folders instead of linking @rig-c/core's own skills into a temporary .bunx cache
that can be emptied.
The package links no Spine runtime. build writes skeleton.json,
skeleton.atlas and skeleton.model.json. preview, vote, bench and bonedist
run through @esotericsoftware/spine-core: install it beside
the package (bun add -d @esotericsoftware/spine-core) and the same rigc runs
them, and build runs the round trip as well. Without it those commands are refused
by name, while build, validate, explain, diff, render, check and inspect
(--poser core|spine) run on rigc's own core over skeleton.model.json —
rigc --version names the entry that ran (AUTHORING §0). In the parse's place that
build runs two rules of its own over rigc's model document, A00_MODEL_READ and
A00_MODEL_REGIONS_ON_PAGES; they are not registry assertions, so its summary
counts two more, and AUTHORING §5.2 has a row for each.
The loop
rigc build --rig <spec> --motion <spec> --images <dir> --out <dir>compiles, gates (under--profile spine, the default, or--profile rig-play), and writesskeleton.json,skeleton.atlasandskeleton.model.jsononly on green.- Read the report. Every red line names the file to change; fix the spec and build again.
rigc explain --rig <spec> --motion <spec> --out <dir>when the red line is not enough — the compiled rig as a table: every bone with its resolved parent, the slots in draw order, every timeline key by key, and aDEFORMblock per deform key. It takes no--profile, it never gates, and it writes nothing, so the figures are readable on a build the gate is refusing — AUTHORING §0 and §4.11.2.rigc render --candidate <out>or `rigc preview --candidate <ou