pnpm-upgrade

bởi openai

Giữ pnpm hiện tại: chạy pnpm self-update/corepack prepare, đồng bộ packageManager trong package.json, và nâng cấp pnpm/action-setup cùng các phiên bản pnpm đã ghim trong…

npx skills add https://github.com/openai/openai-agents-js --skill pnpm-upgrade

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.

Thêm skills từ openai

user-context
openai
Tải hoặc quản lý các tùy chọn định tuyến nguồn bền vững, logic giới thiệu, tiến trình thiết lập và sổ đăng ký lớp ngữ nghĩa của plugin Phân tích Dữ liệu.
official
notion-research-documentation
openai
Nghiên cứu nội dung Notion và tổng hợp thành các bản tóm tắt có cấu trúc, báo cáo hoặc so sánh kèm trích dẫn. Tìm kiếm và truy xuất các trang Notion bằng truy vấn mục tiêu, sau đó sắp xếp kết quả theo chủ đề với trích dẫn nguồn trong văn bản và phần tài liệu tham khảo. Chọn từ bốn định dạng đầu ra (tóm tắt nhanh, tổng hợp nghiên cứu, so sánh, báo cáo toàn diện) dựa trên phạm vi và mục tiêu của người dùng. Tạo và cập nhật các trang Notion bằng mẫu có sẵn; liên kết trực tiếp nguồn và theo dõi thay đổi khi
official
rcsb-pdb-skill
openai
Gửi yêu cầu RCSB PDB nhỏ gọn để lấy siêu dữ liệu cốt lõi, truy vấn API Tìm kiếm và tải xuống FASTA. Sử dụng khi người dùng muốn tóm tắt RCSB ngắn gọn; lưu JSON thô hoặc…
official
pdf
openai
Đọc, tạo và xác thực PDF với kết xuất trực quan và tạo theo chương trình. Kết xuất các trang PDF sang PNG để kiểm tra trực quan bố cục, khoảng cách và kiểu chữ trước khi bàn giao bằng Poppler (pdftoppm). Tạo PDF theo chương trình với reportlab để định dạng đáng tin cậy; trích xuất văn bản và siêu dữ liệu bằng pdfplumber hoặc pypdf. Thực thi các tiêu chuẩn chất lượng: không có văn bản bị cắt, phần tử chồng lấn, bảng bị hỏng hoặc hiện vật kết xuất; chỉ sử dụng dấu gạch nối ASCII, trích dẫn dễ đọc cho con người. Sử dụng...
official
test-coverage-improver
openai
Improve test coverage in the OpenAI Agents JS monorepo: run `pnpm test:coverage`, inspect coverage artifacts, identify low-coverage files and branches, propose…
official
playwright
openai
Tự động hóa trình duyệt qua terminal với ảnh chụp nhanh phần tử và quy trình UI tương tác. Hoạt động thông qua script wrapper playwright-cli (yêu cầu npx); hỗ trợ chế độ headless và headed để gỡ lỗi trực quan. Quy trình cốt lõi: mở trang, chụp nhanh để tham chiếu phần tử ổn định, tương tác bằng refs, chụp lại sau khi điều hướng hoặc thay đổi DOM. Bao gồm điền biểu mẫu, nhấp chuột, gõ văn bản, quản lý nhiều tab, chụp ảnh màn hình/PDF và ghi lại trace để gỡ lỗi luồng. Tham chiếu phần tử (ví dụ: e3, e15)...
official
ukb-topmed-phewas-skill
openai
Lấy các bản tóm tắt PheWAS UKB-TOPMed nhỏ gọn cho các biến thể đơn lẻ bằng cách chấp nhận đầu vào rsID, GRCh37 hoặc GRCh38 và phân giải thành truy vấn GRCh38 cần thiết. Sử dụng khi một…
official
code-review-context
openai
Ngữ cảnh hiển thị của mô hình
official