Agent Skillsnubjs/nub › soak

soak

GitHub

管理仓库供应链安全等待期(SOAK_DAYS),确保依赖发布后经过规定时长才采用。支持统一调整窗口、为特定包添加临时豁免,并自动同步更新Cargo、pnpm、npm及外部工具的配置,防止恶意或已撤销版本被安装。

.claude/skills/soak/SKILL.md nubjs/nub

触发场景

任务涉及 minimumReleaseAge、min-release-age、min-publish-age 修改 external-tools.json 或 renovate.json 调整 taze cooldowns 排查新发布版本无法安装的原因

安装

npx skills add nubjs/nub --skill soak -g -y
更多选项

非标准路径

npx skills add https://github.com/nubjs/nub/tree/main/.claude/skills/soak -g -y

不安装直接使用

npx skills use nubjs/nub@soak

指定 Agent (Claude Code)

npx skills add nubjs/nub --skill soak -a claude-code -g -y

安装 repo 全部 skill

npx skills add nubjs/nub --all -g -y

预览 repo 内 skill

npx skills add nubjs/nub --list

SKILL.md

Frontmatter
{
    "name": "soak",
    "description": "Manages the repo's supply-chain soak window (SOAK_DAYS) — checks and fixes the derived surfaces, bumps or disables the window, adds dated per-package exclusions, and bumps pinned external tools. Use when a task touches minimumReleaseAge, min-release-age, min-publish-age, external-tools.json, renovate.json, or taze cooldowns, or when investigating why a freshly published version won't install."
}

The soak window

One rule: a release must be at least SOAK_DAYS old before this repo adopts it. The delay gives the ecosystem time to catch a malicious or yanked release before we ever install it. The window is defined exactly once — read the current value from scripts/soak/constants.mts and never hardcode it elsewhere. Every surface derives from or is parity-checked against it:

Surface Key Units
.cargo/config.toml global-min-publish-age "N days"
tools/pnpm-workspace.yaml minimumReleaseAge minutes
.npmrc min-release-age days
tools/taze.config.mts maturityPeriod imports SOAK_DAYS
external-tools.json soakBypass annotations days
.github/renovate.json minimumReleaseAge (explicit — an extends: preset doesn't count) "N days"

Commands (package.json scripts — the code lives in scripts/soak/)

  • pnpm run soak — parity-check every surface (CI-gated in docs-links)
  • pnpm run soak:fix — rewrite drifted windows, prune expired exclusions
  • pnpm run deps:update — bump npm (taze) + cargo deps through the window
  • pnpm run tools:check / tools:install — validate / install the SRI-pinned external tools (external-tools.json)
  • pnpm run test:scripts — the scripts' own unit tests

A soak change is done when pnpm run soak and pnpm run test:scripts both exit 0 — the same gates CI runs. Re-run them after every fix.

Change the window (one place)

  1. Edit SOAK_DAYS in scripts/soak/constants.mts.
  2. pnpm run soak:fix (rewrites cargo/npmrc/yaml; taze follows by import).
  3. pnpm run soak + pnpm run test:scripts — existing exclusion annotations encode the old window and will be flagged; re-date or remove them, then re-run until both pass.

Opt out entirely: set SOAK_DAYS = 0 and run the same two steps — cargo, pnpm/nub (minimumReleaseAge: 0), npm, and taze all treat zero as disabled. There is deliberately no env-var bypass: opting out is a committed, reviewable change, never a silent one.

Skip the soak for ONE package (dated, temporary)

Add to minimumReleaseAgeExclude in tools/pnpm-workspace.yaml with the annotation on the line above (block list only — flow [..] is rejected because a comment line can't attach to an inline entry):

# published: 2026-07-08 | removable: 2026-07-15
- 'name@1.2.3'

removable = published + SOAK_DAYS (this example assumes a 7-day window). published must be the real registry publish date. Once removable passes, pnpm run soak fails until the pin is pruned (soak:fix does it). Bare names / @scope/* globs are standing trust and need no annotation. External tools use the same shape via a soakBypass object in external-tools.json.

The cargo soak needs nightly — the repo still must not pin one

min-publish-age is an [unstable] cargo feature: a stable cargo ignores it silently. The repo deliberately ships no rust-toolchain.toml, because a repo-root toolchain file outranks rustup default and would silently redirect the version-pinned CI jobs (the MSRV Check legs) and build released binaries on nightly.

The nightly is instead requested per-invocation, at the only step that picks versions: scripts/soak/update-deps.mts runs cargo +nightly update. Everything else — every CI job, every shipped binary — builds on stable. If you need the cargo soak somewhere new, call cargo +nightly there; do not add a toolchain file.

Maintaining this skill

scripts/soak/ is the law; this file only documents it — when they disagree, fix this file. When editing, follow Anthropic's guidance:

Keep it concise (goal + constraints, not step enumeration), keep the description in third person with explicit "use when" triggers, and keep the window value in constants.mts rather than restating it here.

版本历史

  • f966b97 当前 2026-07-31 00:05

同 Skill 集合

.agents/skills/linux-vm-test/SKILL.md
.agents/skills/windows-vm-test/SKILL.md
.claude/skills/audit-thread/SKILL.md
.claude/skills/download-stats/SKILL.md
.claude/skills/git-archaeology/SKILL.md
.claude/skills/md-toc/SKILL.md
.claude/skills/plan-thread/SKILL.md
.claude/skills/pm-perf-tracing/SKILL.md
.claude/skills/todo/SKILL.md
skills/nub/SKILL.md
.agents/skills/agent-browser/SKILL.md
.claude/skills/ad-hoc-test/SKILL.md
.claude/skills/address-issue/SKILL.md
.claude/skills/aube-bump/SKILL.md
.claude/skills/aube-sync/SKILL.md
.claude/skills/ci-adhoc-test/SKILL.md
.claude/skills/ci-watch/SKILL.md
.claude/skills/cpu-reduction/SKILL.md
.claude/skills/dev-loop/SKILL.md
.claude/skills/impact-analysis/SKILL.md
.claude/skills/implementation-thread/SKILL.md
.claude/skills/prose-writing/SKILL.md
.claude/skills/release/SKILL.md
.claude/skills/remote-build/SKILL.md
.claude/skills/rust-build-hygiene/SKILL.md
.claude/skills/rust-build/SKILL.md
.claude/skills/visual-review/SKILL.md
.claude/skills/worktree/SKILL.md

元信息

文件数
0
版本
995b212
Hash
26289238
收录时间
2026-07-31 00:05

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-31 20:56
浙ICP备14020137号-1 $访客地图$