一键导入
updating-zstd
Updates zstd submodule to match Node.js deps version. Use after Node.js updates or when zstd version drifts from Node.js deps.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Updates zstd submodule to match Node.js deps version. Use after Node.js updates or when zstd version drifts from Node.js deps.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Regenerates Node.js patches against pristine upstream source so each applies independently. Use after a Node.js version bump, when patches fail to apply, or when restructuring the patch chain.
Opt-in flow to rebuild + republish all 8 platform smol_stub artifacts via the stubs.yml GitHub Actions workflow (e.g. after the SEA footer integrity changed sha256→sha512, so the 7 downloaded prebuilts must be rebuilt to match). The model drives the automatable steps (prereq checks, dispatch, watch, verify) and PAUSES at the one human gate — the operator types the release-workflow-dispatch bypass phrase to opt in — then clicks the emitted GitHub Actions + Release browser links to watch / authenticate if gh prompts. Use when a stub-affecting source change (footer format, compression, platform metadata) needs every platform's prebuilt republished.
Orchestrates LIEF and stubs updates in correct dependency order (LIEF first, then stubs). Use after Node.js updates, before releases, or when binary tools need refresh.
Updates cJSON submodule to latest stable version, bumps binject and node-smol caches. Use when cJSON has security patches, JSON parsing bugs, or as part of binject updates.
Updates curl and mbedtls submodules to latest stable versions, bumps curl/stubs/binpress/node-smol caches. Use for TLS security patches, HTTP client fixes, or periodic maintenance.
Vendors fast-webstreams from npm to additions/, converting ESM to CommonJS with primordials for Node.js bootstrap. Use when the WebStreams version needs update or builds fail with streams errors.
name: updating-zstd description: Updates zstd submodule to match Node.js deps version. Use after Node.js updates or when zstd version drifts from Node.js deps. user-invocable: true allowed-tools: Bash(pnpm:), Bash(npm:), Bash(git:), Bash(node:), Bash(rg:), Bash(grep:), Bash(find:), Bash(ls:), Bash(cat:), Bash(head:), Bash(tail:), Bash(wc:), Bash(diff:*), Read, Edit, Grep---
Update the zstd submodule to match the version in Node.js deps.
packages/bin-infra/upstream/zstd (facebook/zstd)packages/node-smol-builder/upstream/node/deps/zstd/lib/zstd.hpackages/bin-infra/upstream/zstd/lib/zstd.hZSTD_VERSION_MAJOR, ZSTD_VERSION_MINOR, ZSTD_VERSION_RELEASEstubs, binflate, binject, binpress, node-smolzstd version is driven by Node.js deps. Update Node.js first (updating-node), then run this skill. Do not update zstd independently — the version must match what Node.js bundles to avoid compression format mismatches.
Extract version from Node.js deps header and compare with our vendored copy:
# Helper to extract version from zstd.h
get_zstd_version() {
local header="$1"
local major=$(awk '/ZSTD_VERSION_MAJOR/{print $3}' "$header")
local minor=$(awk '/ZSTD_VERSION_MINOR/{print $3}' "$header")
local release=$(awk '/ZSTD_VERSION_RELEASE/{print $3}' "$header")
echo "${major}.${minor}.${release}"
}
NODE_ZSTD=$(get_zstd_version packages/node-smol-builder/upstream/node/deps/zstd/lib/zstd.h)
OUR_ZSTD=$(get_zstd_version packages/bin-infra/upstream/zstd/lib/zstd.h)
echo "Node.js deps: $NODE_ZSTD, Vendored: $OUR_ZSTD"
Exit if already matching. If they differ, update to match Node.js deps.
If versions differ:
cd packages/bin-infra/upstream/zstd
git fetch --tags
git checkout vX.Y.Z
cd ../../../..
Update .gitmodules version comment: # zstd-X.Y.Z
Bump these in .github/cache-versions.json:
stubs (stubs embed zstd for decompression)binflate (links vendored zstd)binject (links vendored zstd)binpress (links vendored zstd)node-smol (uses Node.js built-in zstd, but cache should refresh)# Verify submodule matches Node.js deps
NODE_ZSTD=$(grep 'ZSTD_VERSION_RELEASE' packages/node-smol-builder/upstream/node/deps/zstd/lib/zstd.h | awk '{print $3}')
OUR_ZSTD=$(grep 'ZSTD_VERSION_RELEASE' packages/bin-infra/upstream/zstd/lib/zstd.h | awk '{print $3}')
[ "$NODE_ZSTD" = "$OUR_ZSTD" ] && echo "Aligned" || echo "MISMATCH"
git add packages/bin-infra/upstream/zstd .gitmodules .github/cache-versions.json
git commit -m "chore(zstd): update to vX.Y.Z (align with Node.js deps)"