Communitygithub.com

jeremylongshore/tons-of-skills-marketplace

執行完整的發布工作流程:提交未暫存的變更、推送至遠端、建立並合併 PR、根據 Conventional Commits 決定下一個語意化版本,並建立帶註解的 Git 標籤與 GitHub Release。

tons-of-skills-marketplace 是什麼?

此技能可自動化將當前開發狀態推進至 GitHub 上已標記發布版本的完整流程。它能提交所有未暫存的變更、將其推送至遠端倉庫,並在功能分支上自動建立 PR 合併至 main 分支。透過解析 Conventional Commits 的提交訊息,技能會計算下一個正確的語意化版本號(major、minor 或 patch),然後建立帶註解的 Git 標籤以及自動產生發布說明的 GitHub Release。此外,它還能同步可選的外掛程式清單檔案、清理已合併的功能分支,並確認最終的倉庫狀態是乾淨且基於 main 分支的。這個技能對於任何在 GitHub 上使用 Conventional Commits 工作流程的專案都特別有用。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/HEAD/plugins/productivity/claude-workflow-skills/skills/promote

在你喜歡的 AI 中提問

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

說明文件

推送變更

從當前工作狀態執行完整的發布工作流程,最終在 main 分支上建立標籤化的 GitHub Release。

當前分支:!git branch --show-current 2>/dev/null || echo "unknown"

Git 狀態:!git status --short 2>/dev/null || echo "not a git repo"

最後一個標籤:!git describe --tags --abbrev=0 2>/dev/null || echo "none"

自最後一個標籤以來的最近提交:

!`git log $(git describe --tags --abbrev=0 2>/dev/null || echo "")..HEAD --oneline -10 2>/dev/null || git log --oneline -10`

下一個版本(根據上述提交計算):

!`(last=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0"); IFS='.' read -r ma mi pa <<< "${last#v}"; log=$(git log "${last}..HEAD" --format="%s" 2>/dev/null); if echo "$log" | grep -qE "^[a-z]+(\([^)]+\))?!:"; then echo "v$((ma+1)).0.0"; elif echo "$log" | grep -qE "^feat"; then echo "v${ma}.$((mi+1)).0"; else echo "v${ma}.${mi}.$((pa+1))"; fi)`

步驟 0:預檢檢查

gh auth status 2>&1 || { echo "錯誤:gh 未通過驗證。請執行:gh auth login"; exit 1; }

檢查可能被意外暫存的未追蹤 .env 檔案:

git status --short | grep -E '^\?\? .*\.env' && echo "警告:偵測到未追蹤的 .env 檔案 — 請在暫存前檢查"
cat .gitignore 2>/dev/null | grep -q '\.env' || echo "警告:.gitignore 未排除 .env 檔案"

如果有任何 .env 檔案即將被暫存:

if [ -t 0 ]; then
  # 互動模式 — 詢問是否繼續
  read -p "警告:偵測到 .env 檔案。是否繼續?(y/N) " confirm
  [[ "$confirm" =~ ^[Yy]$ ]] || { echo "已中止。"; exit 1; }
else
  # 非互動模式 — 強制停止;未經人工審查風險過高
  echo "錯誤:在非互動模式下偵測到未追蹤的 .env 檔案。正在中止。"
  exit 1
fi

步驟 1:提交任何未暫存的變更

如果上述 Git 狀態顯示有未暫存或未追蹤的變更:

  1. 檢視差異:git diff 和 git diff --cached
  2. 選擇性暫存變更 — 優先暫存已追蹤的檔案:git add -u,然後逐一檢查並新增任何 有意的全新檔案。除非使用者明確確認,否則避免使用 git add -A。
  3. 根據變更草擬 Conventional Commit 訊息 — 以類型前綴開頭 (feat:、fix:、docs:、chore: 等) 以及簡潔的摘要
  4. 使用 heredoc 提交,以確保多行訊息格式正確

如果沒有未提交的內容,則跳過此步驟,直接前往步驟 2。

步驟 2:推送

將當前分支推送至遠端:

git push -u origin HEAD

步驟 3:合併至 main (僅限功能分支)

如果已經在 main(或倉庫的預設分支)上,則跳過此步驟。

如果在功能分支上:

  1. 掃描自最後一個標籤以來的提交,尋找 Issue 參考:

    git log $(git describe --tags --abbrev=0 2>/dev/null || echo "")..HEAD --format="%B"
    

    尋找 Closes #N、Fixes #N、Resolves #N(不區分大小寫)。收集所有找到的 Issue 編號。 如果沒有找到:

    if [ -t 0 ]; then
      # 互動模式 — 詢問使用者
      read -p "此項目解決了哪些 GitHub Issues?(例如 12 15 — 或直接按 Enter 略過) " issues
    else
      # 非互動模式 — 靜默略過
      issues=""
    fi
    
  2. 建立一個以 main 為目標的 PR,並在主體中包含關閉關鍵字,讓 GitHub 在合併時自動關閉 Issue:

    gh pr create --title "<類型>: <摘要>" --body "$(cat <<'EOF'
    ## 摘要
    <來自提交的要點>
    
    Closes #N, Closes #N
    
    🤖 由 [claude-workflow-skills:promote](https://github.com/ali5ter/claude-workflow-skills) 代表 [Alister](https://github.com/ali5ter) 產生
    EOF
    )"
    

    如果未識別到任何 Issue,則省略 Closes 行。

  3. 啟用自動合併(偏好 squash 合併):

    gh pr merge --auto --squash
    
  4. 輪詢直到合併完成:

    gh pr view --json state --jq '.state'
    
  5. 切換到 main 並拉取:

    git checkout main && git pull
    

步驟 4:確認下一個版本

下一個版本已在上述上下文區塊中根據以下語意化版本規則預先計算:

  • 提交主題包含 !:(例如 feat!:、fix!:)→ major 版本提升
  • 提交主題以 feat 開頭 → minor 版本提升
  • 所有其他提交 → patch 版本提升

確認計算出的版本對於給定的提交列表是否正確。如果沒有先前的標籤,則使用 v1.0.0。僅在計算出的版本明顯錯誤時(例如內嵌指令返回錯誤或空輸出)才進行覆寫。

步驟 5:同步外掛程式清單(如果存在)

如果 .claude-plugin/plugin.json 存在,則將其 version 欄位更新為 <next-version>(不加 v 前綴 — 外掛程式清單使用裸語意化版本,例如 1.2.3):

node -e "
const fs = require('fs');
const f = '.claude-plugin/plugin.json';
const d = JSON.parse(fs.readFileSync(f, 'utf8'));
d.version = '<next-version>';
fs.writeFileSync(f, JSON.stringify(d, null, 2) + '\n');
"

然後提交並推送:

git add .claude-plugin/plugin.json
git commit -m "chore: 將 plugin.json 版本同步至 v<next-version>"
git push

如果 .claude-plugin/plugin.json 不存在,則完全跳過此步驟。

步驟 6:建立標籤與發布

git tag -a v<next-version> -m "Release v<next-version>"
git push origin v<next-version>
gh release create v<next-version> \
  --generate-notes \
  --title "v<next-version>"

步驟 7:關閉已解決的 Issue(僅限 main 分支)

如果在步驟 3 中已建立 PR,則跳過此步驟——GitHub 將會透過 PR 主體中的 Closes #N 關鍵字在 PR 合併時自動關閉這些 Issue。

如果發布直接在 main 上進行(沒有 PR),則立即關閉任何已識別的 Issue:

gh issue close <N> --comment "已在 $(gh release view v<next-version> --json url --jq '.url') 中解決"

步驟 8:清理已合併的功能分支

如果在步驟 3 中合併了功能分支,則在本地和遠端將其刪除:

git branch -d <feature-branch>
git push origin --delete <feature-branch>

步驟 9:確認乾淨狀態

git status
git log --oneline -5

回報來自 gh release view v<next-version> --json url --jq '.url' 的 GitHub Release URL。

Individual skills in this repo

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

jeremylongshore/tons-of-skills-marketplace

Use when asked to structure a landing page for positioning, plan a conversion-optimized page layout, or design a launch page. Examples: "landing page for product launch", "conversion-optimized layout for SaaS

jeremylongshore/tons-of-skills-marketplace

Use when asked to design growth-optimized landing pages, activation funnel layouts, or experiment-friendly page structures. Examples: "growth-optimized landing", "activation funnel layout", "A/B testable page

jeremylongshore/tons-of-skills-marketplace

Use when asked to structure a landing page, design page layout for conversion, or plan landing page information architecture. Examples: "landing page structure for SaaS", "conversion-optimized layout

jeremylongshore/tons-of-skills-marketplace

Generate polished demo videos from a single prompt. Use when the user asks to create a demo video, product walkthrough, feature showcase, or animated presentation. Trigger with "make a demo video", "create a product video", "demo walkthrough", or "feature showcase video".

jeremylongshore/tons-of-skills-marketplace

Track cryptocurrency portfolio with real-time valuations, allocation analysis, and P&L tracking. Use when checking portfolio value, viewing holdings breakdown, analyzing allocations, or exporting portfolio data. Trigger with phrases like "show my portfolio", "check crypto holdings", "portfolio allocation", "track my crypto", or "export portfolio".

jeremylongshore/tons-of-skills-marketplace

Agent skill at plugins/productivity/content-multiplier/skills/channel-formats/SKILL.md

jeremylongshore/tons-of-skills-marketplace

Operate an evidence-backed editorial queue, balance topic and format coverage, schedule approved drafts, and reconcile backlog state with the publishing system. Use when choosing or scheduling the next blog work. Trigger with "show the editorial calendar" or "pick the next topic".

jeremylongshore/tons-of-skills-marketplace

Configure CI/CD pipeline for AppFolio property management integrations. Trigger: "appfolio CI".

jeremylongshore/tons-of-skills-marketplace

Diagnose and fix common AppFolio API integration errors. Trigger: "appfolio error".

jeremylongshore/tons-of-skills-marketplace

Build property management dashboard with AppFolio API data. Trigger: "appfolio property dashboard".

jeremylongshore/tons-of-skills-marketplace

Automate tenant management and lease operations with AppFolio. Trigger: "appfolio tenant management".

jeremylongshore/tons-of-skills-marketplace

Collect AppFolio API debug evidence for support tickets. Trigger: "appfolio debug".

jeremylongshore/tons-of-skills-marketplace

Deploy AppFolio integration service to cloud infrastructure. Trigger: "deploy appfolio".

jeremylongshore/tons-of-skills-marketplace

Query AppFolio properties, units, and tenants via REST API. Trigger: "appfolio hello world".

jeremylongshore/tons-of-skills-marketplace

Configure AppFolio Stack API authentication with OAuth 2.0. Use when setting up property management API access, registering as an AppFolio Stack partner, or configuring client credentials for API calls. Trigger: "install appfolio", "setup appfolio", "appfolio auth", "appfolio API key".

jeremylongshore/tons-of-skills-marketplace

Set up local development for AppFolio property management API integration. Trigger: "appfolio local dev".

jeremylongshore/tons-of-skills-marketplace

Production readiness checklist for AppFolio integrations. Trigger: "appfolio production checklist".

jeremylongshore/tons-of-skills-marketplace

Handle AppFolio API rate limits with throttling and backoff. Trigger: "appfolio rate limit".

jeremylongshore/tons-of-skills-marketplace

Reference architecture for AppFolio property management integration. Trigger: "appfolio architecture".

jeremylongshore/tons-of-skills-marketplace

Apply production-ready patterns for AppFolio REST API integration. Trigger: "appfolio patterns".

相關技能