Communitygithub.com

reyalka/astro

撰寫與更新 Astro 的 Pull Request,產生審閱者友善的標題與高資訊量的內容。當使用者要求建立 PR、開啟 PR、草擬 PR、更新 PR 標題/內文,或撰寫 PR 筆記/摘要/描述時觸發。

astro 是什麼?

此技能專為 Astro 專案的 Pull Request 撰寫與更新而設計,確保每個 PR 具備審閱者友善的標題與高資訊量的主體。它遵循明確的核心原則:描述「變更內容」、「運作方式」和「為何重要」,並透過結構化的區段(Changes、Testing、Docs)來組織內容。技能支援多種平台與情境,包括建立/開啟 PR、草擬 PR、更新標題/內文,以及撰寫 PR 筆記/摘要。其特別強調簡潔性,預設使用簡短條列,讓審閱者能在 30 秒內掌握典型修補程式的全貌。此外,技能會自動檢查變更集(changeset)是否存在,若缺少則要求立即建立,確保所有套件修改都有對應變更集。整體而言,此技能協助開發者產出高品質、審閱者友善的 PR,加速程式碼審查流程。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/reyalka/astro/tree/HEAD/.agents/skills/astro-pr-writer

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Astro PR 寫手

撰寫 Astro Pull Request 描述,幫助審閱者快速了解意圖、行為變更與驗證方式。

每當使用者要求任何 PR 撰寫任務時使用此技能,包括:

  • 建立/開啟 pull request
  • 建立/開啟草稿 pull request
  • 更新 PR 標題
  • 更新 PR 內文/描述
  • 撰寫 PR 筆記/摘要

核心原則

描述變更內容、運作方式以及為何重要。

  • Changes 說明修復/功能做了什麼。
  • Testing 列出新增或修改了哪些測試程式碼。
  • Docs 說明是否需要更新面向使用者的文件。

請勿將 PR 區段當作任務日誌使用。

PR 標題規則

使用人性化、審閱者友善的標題。

  • 以平實用語描述結果。
  • 保持簡潔且具體。
  • 優先使用審閱者在審查佇列中自然會看到的措辭。

請勿使用:

  • 約定式提交前綴(fix:、feat:、docs: 等)
  • 限定範圍的提交風格標題(fix(cloudflare): ...)

內文規則

使用以下結構:

## Changes

- <行為變更及其重要性>
- <實作細節與影響>

## Testing

- <新增或修改的測試及其涵蓋範圍>
- <現有斷言為何變更>

## Docs

- <無需更新文件,因為 ...>

Changes

聚焦於行為、實作方式與影響。

包含:

  • 之前無法運作,現在可以運作的功能
  • 修復/功能的運作方式(對審閱者有幫助的程度)
  • 面向使用者的可靠性/相容性/效能行為變更

請勿包含:

  • 「新增測試」或「更新 fixture」(應屬於 Testing)
  • 「新增 changeset」
  • 不影響行為的內部流程記錄

Testing

列出新增或修改了哪些測試程式碼及其原因。審閱者會閱讀此區段以了解測試涵蓋範圍的變更,而不是聽你說你執行了測試套件。

包含:

  • 新增的測試檔案或測試案例,附帶簡短說明其涵蓋內容
  • 已更新的現有測試,以及斷言變更的原因

請勿包含:

  • 測試通過(CI 會顯示,這是雜訊)
  • 你執行了哪些指令
  • 有多少測試通過

Docs

清楚說明對文件的影響。

  • 如果不需要文件更新,請用一句話說明原因。
  • 如果需要文件更新,請連結文件 PR。

簡潔性指引

預設使用簡短說明。每個區段 1-2 個條列是正常的 — 只有在變更確實複雜時才增加更多內容。審閱者在掃視 PR 佇列時,應該能在 30 秒內讀完整個典型修補程式的內文。

過於冗長:

  • 將 server 設定屬性中的 .optional().prefault({}) 移出 z.preprocess(),包括 base.ts 和 relative.ts,與 #16531 中的 integrations 修復一致。Zod 4.4.0 會拒絕在 z.preprocess() 中包裹的遺漏屬性,因為預處理器或內部預設值無法先執行 — 將 .optional().prefault({}) 移到預處理呼叫之外可解決此問題。修復了 @rururux 回報的 server 屬性問題。
  • 為 Zod 4.4.0 相容性,在 Astro 和 DB 錯誤對應中新增了 invalid_key、invalid_element 和判別聯集 options 處理器。Zod 4.4.0 將記錄鍵細化失敗(例如環境變數名稱)顯示為結構化的 invalid_key 問題,並附帶巢狀錯誤,而非單一訊息。這些處理器提取實際的細化訊息,以提供清晰的使用者錯誤資訊。
  • 所有變更均與 Zod 4.3.x 向下相容。新的錯誤對應分支僅在 4.4.0 開始發出的問題碼上啟用。

較佳:

  • 將 server 設定中的 .optional().prefault({}) 移出 z.preprocess(),與 #16531 中的 integrations 修復一致。修復了 @rururux 回報的問題。
  • 為 Zod 4.4.0 相容性,在兩個錯誤對應中新增了 invalid_key、invalid_element 和判別聯集 options 處理器。
  • 與 Zod 4.3.x 向下相容。

變更集

每個修改套件的 PR 都需要一個變更集。只有 examples/* 的變更可以豁免。

載入 changeset 技能以建立變更集檔案並撰寫訊息。它涵蓋檔案建立、格式、升級類型和訊息慣例。

撰寫 PR 內文時:

  • 在發佈前,檢查變更集是否存在。如果 PR 修改了套件但沒有變更集,立即使用 changeset 技能建立它 — 不要發佈缺少變更集的 PR。
  • 請勿在 Changes 區段中提到「新增 changeset」 — 這是流程雜訊,不是行為變更

發佈前的自我檢查

  • 標題對審閱者友善(不是提交風格)
  • Changes 條列描述了行為/實作/影響
  • Testing 列出了新增/修改的測試程式碼,而不是測試執行結果
  • Docs 的決策是明確的
  • 對於任何修改套件的 PR,.changeset/ 中存在變更集檔案 — 如果缺少,請在發佈前建立它

Individual skills in this repo

This repo contains 7 individual skills — each has its own dedicated page.

reyalka/astro

Analyze recent GitHub Actions workflow runs to identify patterns, mistakes, and improvements. Use when asked to "analyze workflow logs", "review action runs", or "analyze GitHub Actions".

reyalka/astro

Independently implement and validate an alternative solution for an Astro pull request. Use only for Factory's adversary blue team.

reyalka/astro

Qualify and compare red and blue solutions for an Astro pull request using Astro-specific merge and tie-break criteria. Use only for Factory's adversary purple team.

reyalka/astro

Perform a static, read-only code review of an Astro pull request or of a local branch, commit range, diff, patch, or working tree being prepared as a pull request. Determine whether the change satisfies its stated business requirements and is good enough to merge, using the PR description, linked requirement issues and roadmap items, and PR or issue discussions when available. Use this skill only for PR review or self-review, not issue triage or bug investigation. It reports only merge-relevant findings and never edits code or runs project code, tests, builds, checks, or scripts.

reyalka/astro

Comprehensive guide for developing in the Astro monorepo. Covers architecture, debugging, testing, and critical constraints. Use when working on features, fixes, tests, or understanding the codebase structure.

reyalka/astro

Handle main-to-next merge tasks including conflict resolution, changeset cleanup, and CI fix-ups. Use when merging main into next.

reyalka/astro

How to write JSDoc (/** */) and inline (//) comments in the Astro codebase, for contributors reading the source — not end users. Use whenever writing or editing comments in .ts/.js source, including comments added incidentally while fixing bugs or building features. Does not cover the @docs-generated config/error reference.

相關技能