Communitygithub.com

釋出助手

通用的釋出輔助工具 — 分析專案的釋出規則,快取於 .omc/RELEASE_RULE.md,再引導你完成釋出流程。

釋出助手 是什麼?

此技能是一個通用的釋出輔助工具,透過分析專案結構與 CI 設定來推導釋出規則,並將規則快取在 `.omc/RELEASE_RULE.md` 中。支援多種語言生態(Node.js、Python、Rust、Java 等)與 CI 平台(GitHub Actions、CircleCI、Travis CI、Jenkins、Bitbucket Pipelines、GitLab CI)。首次執行時,它會完整掃描版本來源檔案、註冊/套件管理平台、觸發條件、測試關卡、更新日誌策略等,產出結構化的規則檔。後續執行則會透過增量差異檢查,只重新分析有變動的 CI 工作流程檔案。整個流程涵蓋版本決定、釋出前核對清單、釋出備註撰寫建議、版本號更新與推送、以及首次設定協助。對於 monorepo 或多套件工作區也有對應的適應邏輯。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Yeachan-Heo/oh-my-claudecode/tree/main/skills/release

在你喜歡的 AI 中提問

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

說明文件

釋出技能

一個輕量、感知專案的釋出輔助工具。首次執行時會檢查專案與 CI 以推導釋出規則,將其儲存在 .omc/RELEASE_RULE.md 供後續使用,然後依照這些規則逐步引導你完成釋出。

使用方式

/oh-my-claudecode:release [version]
  • version 為選填。若省略,技能會詢問你。接受 patch、minor、major 或明確的 semver 版本,例如 2.4.0。
  • 加上 --refresh 可強制重新分析專案,即使已有快取的規則檔。

執行流程

步驟 0 — 載入或建立釋出規則

檢查 .omc/RELEASE_RULE.md 是否存在。

如果不存在(或已傳入 --refresh): 執行下列完整的專案分析,然後寫入該檔案。

如果存在: 讀取該檔案。接著進行快速差異檢查 — 掃描 .github/workflows/(或同等 CI 目錄:.circleci/、.travis.yml、Jenkinsfile、bitbucket-pipelines.yml、gitlab-ci.yml)中是否有任何修改時間晚於規則檔中的 last-analyzed 時間戳記。如果相關的工作流程檔案有變更,則重新分析那些部分並更新檔案。回報有哪些變更。


步驟 1 — 專案分析(首次執行或 --refresh)

檢查專案並回答以下問題。將答案寫入 .omc/RELEASE_RULE.md。

1a. 版本來源

  • 找出所有包含與目前版本相符版本字串的檔案(package.json / pyproject.toml / Cargo.toml / build.gradle / VERSION 檔案等)。
  • 列出每個檔案以及用來尋找版本的欄位或正規表示式模式。
  • 偵測是否有釋出自動化腳本(例如 scripts/release.*、Makefile release 目標、bump2version、release-it、semantic-release、changesets、goreleaser)。

1b. 註冊 / 散佈

  • npm(package.json 含 publishConfig 或 CI 中的 npm publish)、PyPI(pyproject.toml + twine/flit)、Cargo(Cargo.toml)、Docker(Dockerfile + push 步驟)、GitHub Packages、其他。
  • 是否有 CI 步驟會在標籤推送時自動發布?是哪個工作流程檔案和工作?

1c. 釋出觸發條件

  • 識別什麼會啟動釋出:標籤推送(v*)、手動觸發(workflow_dispatch)、合併到 main/master、合併到釋出分支、提交訊息模式。

1d. 測試關卡

  • 識別測試指令以及在 CI 中何處執行。
  • 測試是否必須在發布前通過?註明任何跳過標誌。

1e. 釋出備註 / 更新日誌

  • 是否存在 CHANGELOG.md 或 CHANGELOG.rst?
  • 使用什麼慣例:Keep a Changelog、Conventional Commits、GitHub 自動產生、無?
  • 是否有在標籤前就已提交的釋出內容檔案(例如 .github/release-body.md)?

1f. 初次使用者檢查

  • 釋出工作流程是否存在於 .github/workflows/(或同等位置)?如果沒有,標記並提議建立一個骨架。
  • 是否有 .gitignore 項目阻止建置成品被提交?如果沒有,標記。
  • 是否使用了 git 標籤?執行 git tag --list 檢查。如果沒有標籤,標記並解釋最佳實踐。

步驟 2 — 寫入 .omc/RELEASE_RULE.md

建立或覆寫該檔案,結構如下:

# 釋出規則
<!-- last-analyzed: YYYY-MM-DDTHH:MM:SSZ -->

## 版本來源
<!-- 檔案 + 模式列表 -->

## 釋出觸發條件
<!-- 什麼會啟動釋出 -->

## 測試關卡
<!-- 指令 + CI 工作名稱 -->

## 註冊 / 散佈
<!-- npm、PyPI、Docker 等 + 發布的 CI 工作 -->

## 釋出備註策略
<!-- 慣例 + 檔案 -->

## CI 工作流程檔案
<!-- 相關工作流程檔案的路徑 -->

## 首次設定缺口
<!-- 分析時發現的任何缺少項目,或「無」 -->

步驟 3 — 決定版本

如果使用者提供了版本引數,則使用它。否則:

  1. 顯示目前版本(來自主要版本檔案)。
  2. 顯示 patch、minor、major 會產生的版本。
  3. 詢問使用者要使用哪一個。

驗證所選版本是否為有效的 semver 字串。


步驟 4 — 釋出前核對清單

根據釋出規則呈現一份核對清單。至少應包含:

  • 此次釋出相關的所有變更都已提交並推送
  • CI 在目標分支上為綠色
  • 測試在本機通過(執行測試關卡指令)
  • 版本號更新已套用到所有版本來源檔案
  • 釋出備註 / 更新日誌已準備好(請參閱步驟 5)

要求使用者確認後再繼續,或如果他們說「繼續」,則執行每個步驟。


步驟 5 — 釋出備註撰寫指引

協助使用者撰寫良好的釋出備註。套用專案所使用的慣例。若未偵測到慣例時的預設指引:

什麼是良好的釋出備註:

  • 以使用者會看到什麼改變為開頭,而非內部實作細節。
  • 按類型分組:新功能、錯誤修正、重大變更、棄用、內部 / 雜項。
  • 每個項目:一句話,附上 PR 或 issue 的連結,如果是外部貢獻者請標註其名稱。
  • 重大變更要放在最前面,且必須包含遷移路徑。
  • 省略使用者永遠看不到的變更(重構、CI 調整、僅測試相關的變更),除非它們影響建置再現性。

項目格式範例:

### 錯誤修正
- 修正工作階段在權杖過期時被中斷的問題 (#123) — @contributor

如果專案使用 Conventional Commits,則從 git log <prev-tag>..HEAD --no-merges --format="%s" 依提交類型分組產生一份草稿更新日誌。呈現給使用者,讓他們編輯。


步驟 6 — 執行釋出

使用所發現的規則,逐步進行:

  1. 更新版本 — 套用到每個版本來源檔案。
  2. 執行測試 — 執行測試關卡指令。
  3. 提交 — git add <版本檔案> CHANGELOG.md,並以 chore(release): bump version to vX.Y.Z 提交。
  4. 標籤 — git tag -a vX.Y.Z -m "vX.Y.Z"(優先使用附註標籤而非輕量標籤)。
  5. 推送 — git push origin <分支> && git push origin vX.Y.Z。
  6. CI 接手 — 如果釋出觸發條件是標籤推送,提醒使用者 CI 會處理其餘部分(發布、建立 GitHub Release)。顯示預期的 CI 工作流程檔案。
  7. 手動發布 — 如果沒有 CI 自動化,列出手動發布指令(例如 npm publish --access public、twine upload dist/*)。

步驟 7 — 首次設定建議

如果在步驟 1f 中發現了缺口,提供具體的協助:

沒有釋出工作流程:

你的專案沒有釋出 CI 工作流程。最常見的最佳實務是以 v* 標籤推送觸發的 GitHub Actions 工作流程。它可以:

  • 執行測試
  • 發布到 npm/PyPI 等
  • 使用你的釋出備註建立 GitHub Release

要我為你的技術堆疊建立一個 .github/workflows/release.yml 骨架嗎?

沒有 git 標籤:

這看起來是首次釋出。Git 標籤讓 GitHub、npm 和其他工具能理解你的版本歷史。我們會在步驟 6 建立你的第一個標籤。

建置成品未 gitignore:

建置成品存在於 git 歷史中或未被 gitignore。這會導致儲存庫大小膨脹並產生合併衝突。要將它們加入 .gitignore 嗎?


步驟 8 — 驗證

推送之後:

  • 檢查 CI 狀態:gh run list --workflow=<釋出工作流程> --limit=3(如果 gh 可用)。
  • 幾分鐘後檢查註冊平台(npm、PyPI)是否有新版本。
  • 確認已建立 GitHub Release:gh release view vX.Y.Z。

回報成功或標記任何失敗。


備註

  • 此技能不會硬編碼任何專案特定的版本檔案或指令。所有內容皆由專案檢查推導得出。
  • .omc/RELEASE_RULE.md 是本地快取。如果要與團隊共用推導出的規則,請將它提交到你的專案;如果希望它保留在本機,則將它加入 .gitignore。
  • 對於複雜的 monorepo 或多套件工作區,技能會偵測工作區模式(npm workspaces、pnpm workspaces、Cargo workspace)並相應調整。

Individual skills in this repo

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

agent-doc-discipline

Writing-time discipline for documents agents consume (the five surfaces, specs, tickets, .omc/skills/) — every rule checkable and carrying a why, steps before reference, one meaning in one home, no restating what the environment already says. Mandatory at drydock seed generation and the launch C5 sediment pass; opt-in for any other agent-facing doc edit. The companion of minimal-code-discipline: that one disciplines code, this one disciplines papers.

ai-slop-cleaner

Clean AI-generated code slop with a regression-safe, deletion-first workflow and optional reviewer-only mode

ask

Process-first advisor routing for Claude, Codex, Gemini, Antigravity, Grok, or Cursor via `omc ask`, with artifact capture and no raw CLI assembly

ask-navigator

Shipyard

autopilot

Full autonomous execution from idea to working code

autoresearch

Stateful single-mission improvement loop with strict evaluator contract, markdown decision logs, and max-runtime stop behavior

cancel

Cancel any active OMC mode (autopilot, ralph, ultragoal, swarm, ultrapilot, pipeline, team) and clean up retired legacy state

configure-notifications

Configure notification integrations (Telegram, Discord, Slack) via natural language

debug

Diagnose the current OMC session or repo state using logs, traces, state, and focused reproduction

deepinit

Deep codebase initialization with hierarchical AGENTS.md documentation

deep-interview

Socratic deep interview with mathematical ambiguity gating before explicit execution approval

drydock

Lay the keel of the shipyard harness in any repo — the 4-pillar shared environment (Context, Rules, Tools, Standards) across 5 surfaces (CLAUDE.md, skills, design-system, mcp/cli, shared context) so that every human and agent inherits the same design language and anyone can ship. Run once per repo; re-run with --check to audit drift.

execute

Carry an approved task through to working, verified code

external-context

Invoke parallel document-specialist agents for external web searches and documentation lookup

graph

Deterministic orchestration graph runtime - declarative DAG pipelines with journal-based crash recovery

harbor

Harbor intake for external work — the captain only handles unresolved decisions. Sweeps incoming issues and PRs, verifies every claim before disposition, reuses every decision already made, and hands the maintainer a docket whose pending items each carry one question with options, recommendation, impact and evidence. Agent-autonomous for facts and for actions covered by standing authorization; signed for every new judgment. Never merges.

hud

Configure HUD display options (layout, presets, display elements)

launch

Shipyard

loft

Loft the shape before cutting steel — answer a design question that prose cannot settle by building a throwaway artifact: a pure logic module in a clickable shell, or structurally different UI variants behind one route. The captain reacts to the artifact; the answer folds into the decision; the artifact never docks. Use when a design question stalls in words, when a navigator map carries a loft ticket, or when a spec discussion reaches

minimal-code-discipline

YAGNI-ladder coding discipline for writing changes — existence-first, reuse before writing, dependency ladder, shortest correct diff, with non-negotiables that must never be minimized away

相關技能