跳到正文
cccskills
Codex 官方免费在 GitHub 公开

pnpm-upgrade

Update pnpm locally and align package.json with GitHub Actions settings. Check the published package and CI installation paths first, then record package integrity and pin the setup action to a specific commit.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Keep pnpm current: preflight the published package and pnpm/action-setup self-installer, update pnpm locally, align packageManager in package.json, and refresh CI pins. Use this when refreshing the pnpm toolchain manually or in automation.

集成工具GitHub
查看安装方法

适用场景

  • Updating pnpm across local development and CI
  • Checking installation paths before an upgrade
  • Refreshing GitHub Actions commit pins

包含的文件(3)

  • SKILL.md4.3 KB
  • agents/openai.yaml290 B
  • scripts/preflight.mjs5.5 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

pnpm Upgrade

Use these steps to update pnpm and CI pins without blunt search/replace.

Steps (run from repo root)

  1. Resolve the target pnpm release

    • Query the npm registry before changing the local toolchain: PNPM_VERSION=$(curl -fsSL https://registry.npmjs.org/pnpm/latest | jq -r .version).
    • Abort if the version is missing.
    • Resolve the exact package integrity: curl -fsSL "https://registry.npmjs.org/pnpm/${PNPM_VERSION}" | jq -r .dist.integrity.
    • Store the result as PNPM_INTEGRITY.
    • Abort if the integrity is missing or does not start with sha512-.
    • Convert the base64 digest after sha512- to lowercase hex, for example:
      printf '%s' "${PNPM_INTEGRITY#sha512-}" | base64 -d | xxd -p -c 256
      
    • Store the result as PNPM_SHA512_HEX.
  2. Find the target pnpm/action-setup release

    • Query GitHub API: curl -fsSL https://api.github.com/repos/pnpm/action-setup/releases/latest | jq -r .tag_name.
    • Use GITHUB_TOKEN/GH_TOKEN if available for higher rate limits.
    • Store as ACTION_TAG (e.g., v4.2.0). Abort if missing.
  3. Resolve the action tag to an immutable commit SHA

    • Run git ls-remote https://github.com/pnpm/action-setup "refs/tags/${ACTION_TAG}^{}" and capture the SHA as ACTION_SHA.
    • If the dereferenced tag is missing, fall back to git ls-remote https://github.com/pnpm/action-setup "refs/tags/${ACTION_TAG}".
    • Abort if ACTION_SHA is empty.
  4. Preflight the release and CI installation path

    • Run node .agents/skills/pnpm-upgrade/scripts/preflight.mjs --version "${PNPM_VERSION}" --action-ref "${ACTION_SHA}".
    • The script first rejects published pnpm manifests with non-empty dependencies or devDependencies. pnpm bundles its runtime dependencies, so these fields indicate a broken publication such as pnpm@11.12.0.
    • It then reproduces both pnpm/action-setup installation paths in separate temporary directories: install the regular pnpm bootstrap from pnpm-lock.json and the standalone @pnpm/exe bootstrap from exe-lock.json, set isolated PNPM_HOME directories, and self-update each bootstrap to PNPM_VERSION.
    • Abort the upgrade on any failure. Do not bypass this check with a direct local install; the preflight exists to exercise the CI-only bootstrap path.
  5. Update pnpm locally

    • Run pnpm self-update "${PNPM_VERSION}".
    • If pnpm is missing or self-update fails only because the current installation cannot update itself, run corepack prepare "pnpm@${PNPM_VERSION}" --activate. Do not use this fallback to bypass a failed preflight.
    • Confirm pnpm -v exactly matches PNPM_VERSION.
  6. Align package.json

    • Open package.json and set packageManager to pnpm@${PNPM_VERSION}+sha512.${PNPM_SHA512_HEX} (preserve trailing newline and formatting).
  7. Update workflows carefully (no broad regex)

    • Files: everything under .github/workflows/ that uses pnpm/action-setup.
    • For each file, edit by hand:
      • Set uses: pnpm/action-setup@${ACTION_SHA}.
      • If a with: version: field exists, set it to ${PNPM_VERSION} (keep quoting style/indent).
    • Do not touch unrelated steps. Avoid multiline sed/perl one-liners.
  8. Verify

    • Run pnpm -v and confirm it matches the version portion of packageManager.
    • Confirm packageManager keeps the exact +sha512.${PNPM_SHA512_HEX} suffix.
    • git diff to ensure only intended workflow/package.json changes.
  9. Follow-up

    • If runtime code/build/test config was changed (not typical here), run $code-change-verification; otherwise, a light check is enough.
    • Commit with chore: upgrade pnpm toolchain and open a PR (automation may do this).

Notes

  • Tools needed: curl, jq, base64, xxd, node, npm, and pnpm/corepack. Install if missing.
  • Keep edits minimal and readable—prefer explicit file edits over global replacements.
  • GitHub Actions must stay pinned to commit SHAs, not tags. Use the latest release tag only to discover the commit SHA to pin.
  • If GitHub API is rate-limited, retry with a token or bail out rather than guessing the tag.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

changeset-validation

Codex 官方免费

Check package changes against changesets, the files describing release updates, to assess summaries and required version increases. Use it to review pull requests or uncommitted changes and obtain a structured verdict with errors, warnings, and the required bump.

中文简介正在准备中。当前显示英语简介。

  • Reviewing changeset compliance in a pull request
  • Checking release notes against uncommitted changes
  • Choosing the appropriate version bump
openai/openai-agents-js39352026年10月21日 更新

code-change-verification

Codex 官方免费

Run final checks after reviewed SDK changes, covering dependency installation, builds, types, generated declarations, linting, tests, and formatting. The workflow requires every check to pass before the work is marked complete.

中文简介正在准备中。当前显示英语简介。

  • Final verification after SDK code changes
  • Checking changes to tests or build configuration
  • Rechecking the full validation sequence after fixes
openai/openai-agents-js39352026年10月21日 更新

credit-note-fixer

Codex 官方免费

Fix a small formatting bug in a credit note shell script while keeping the output label as credit and the amount positive. Run the specified targeted test and summarize the bug, fix, and verification command.

中文简介正在准备中。当前显示英语简介。

  • Fix a credit note output formatting bug
  • Check the credit label and positive amount
  • Run the specified test and report the fix
openai/openai-agents-js39352026年10月21日 更新

csv-workbench

Codex 官方免费

Analyze CSV files with Python and get concise numerical summaries. The skill checks column structure before calculating requested aggregates, includes units when available, and explains assumptions when data is missing or incorrectly formatted.

中文简介正在准备中。当前显示英语简介。

  • Quick summaries of CSV data
  • Calculating requested aggregates
  • Reporting assumptions about missing or malformed data
openai/openai-agents-js39352026年10月21日 更新

docs-sync

Codex 官方免费

Compare English SDK documentation with source code to find missing features, incorrect defaults, and outdated explanations. Produce evidence-backed findings or update the requested pages, with verification matched to the scope of the documentation changes.

中文简介正在准备中。当前显示英语简介。

  • Audit documentation for a specific SDK feature
  • Check documentation against branch changes
  • Correct outdated option names and defaults
openai/openai-agents-js39352026年10月21日 更新

examples-run-analysis

Codex 官方免费

Analyze existing logs and source files from a completed example run to verify that intended actions actually occurred. Review every entry, classify failures and skips, and report evidence without running examples, controlling processes, or modifying files.

中文简介正在准备中。当前显示英语简介。

  • Verify behavior after a completed example run
  • Check whether exit-zero examples performed their intended actions
  • Separate repository failures from environment restrictions
openai/openai-agents-js39352026年10月21日 更新

查看 openai 的全部技能

报告此技能的问题