Communitygithub.com

ComeOnOliver/skillshub

確保提交訊息遵循 Conventional Commits、分支命名慣例和 PR 範本。在建立提交、分支或 PR,或用戶提及 Git 工作流程時使用。

skillshub 是什麼?

此技能強制實施一致的 Git 工作流程,包括提交訊息規範、分支命名慣例以及 Pull Request (PR) 流程。它會自動偵測專案中現有的慣例(例如 `.github/` 範本或 `CONTRIBUTING.md`),並引導使用者建立符合 Conventional Commits 格式的提交訊息。技能也提供分支命名驗證規則(例如使用前綴和連字號)、PR 範本產生功能,以及提交鉤子 (git hooks) 的實作範例。支援 GitHub 和 GitLab 平台,主要用於 Cursor、Claude Code 和 Codex 等 AI 代理工具。透過結構化的檢查清單和範例,此技能協助開發團隊維持一致且高品質的 Git 歷史記錄,減少程式碼審查時的溝通成本,並提升協作效率。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/aiskillstore/marketplace/crazydubya/git-workflow-enforcer

在你喜歡的 AI 中提問

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

說明文件

Git 工作流程強制執行器

強制執行一致的 Git 工作流程,包括提交訊息、分支命名和 PR 流程。

使用時機

  • 建立提交或分支時
  • 進行程式碼審查或建立 PR 時
  • 使用者提及「git 工作流程」、「提交訊息」、「分支命名」或「Pull Request」時

指令

1. 偵測現有慣例

檢查以下項目:

  • .github/ 或 .gitlab/ 範本
  • CONTRIBUTING.md
  • 現有的提交訊息模式
  • 分支命名模式

2. Conventional Commits

格式: type(scope): description

類型:

  • feat:新功能
  • fix:錯誤修正
  • docs:文件
  • style:格式調整、缺少分號
  • refactor:程式碼重構
  • perf:效能改善
  • test:新增測試
  • chore:維護、依賴項

範例:

feat(auth): 新增 OAuth2 登入支援
fix(api): 處理使用者端點中的空值回應
docs(readme): 更新安裝說明
refactor(utils): 簡化日期格式化邏輯

3. 分支命名

常見模式:

feature/user-authentication
bugfix/login-error-handling
hotfix/critical-security-patch
release/v1.2.0
chore/update-dependencies

驗證項目:

  • 使用小寫字母和連字號
  • 以類型為前綴
  • 敘述性名稱
  • 若適用,包含問題編號:feature/123-add-dark-mode

4. 提交訊息驗證

良好的提交範例:

feat(payments): 整合 Stripe 付款閘道

- 新增 Stripe SDK 設定
- 實作付款意圖建立
- 新增付款事件 Webhook 處理器
- 更新付款流程測試

關閉 #456

檢查項目:

  • 主旨行 ≤ 50 個字元
  • 內文在 72 個字元處換行
  • 主旨和內文之間有空白行
  • 使用祈使語氣(「新增」而非「已新增」)
  • 參考問題/工單編號

5. PR 範本

建立 .github/PULL_REQUEST_TEMPLATE.md:

## 說明
<!-- 此 PR 做了什麼? -->

## 變更類型
- [ ] 錯誤修正
- [ ] 新功能
- [ ] 重大變更
- [ ] 文件更新

## 測試方式
<!-- 如何測試? -->

## 檢查清單
- [ ] 程式碼符合專案風格指南
- [ ] 已完成自我審查
- [ ] 為複雜程式碼新增註解
- [ ] 文件已更新
- [ ] 測試已新增/更新
- [ ] 所有測試通過
- [ ] 無新警告

## 相關問題
關閉 #

6. 提交鉤子

預先提交鉤子:

#!/bin/sh
# .git/hooks/pre-commit

# 執行 lint
npm run lint

# 執行測試
npm test

# 檢查敏感資料
if git diff --cached | grep -i "password\|api_key\|secret"; then
  echo "錯誤:偵測到可能的敏感資料"
  exit 1
fi

提交訊息鉤子:

#!/bin/sh
# .git/hooks/commit-msg

commit_msg=$(cat "$1")

# 檢查 Conventional Commits 格式
if ! echo "$commit_msg" | grep -qE "^(feat|fix|docs|style|refactor|perf|test|chore)(\(.+\))?: .+"; then
  echo "錯誤:提交訊息必須遵循 Conventional Commits 格式"
  echo "範例:feat(auth): 新增登入功能"
  exit 1
fi

7. 驗證現有提交

檢查最近的提交是否符合模式:

git log --oneline -20 | grep -v "^[a-f0-9]\{7\} (feat|fix|docs|style|refactor|perf|test|chore)"

8. 產生變更日誌

從 Conventional Commits 產生:

# 使用 standard-version
npx standard-version

# 或手動按類型分組
git log --pretty=format:"%s" | grep "^feat" > features.txt
git log --pretty=format:"%s" | grep "^fix" > fixes.txt

9. 受保護分支

GitHub 設定:

  • 要求 PR 審查
  • 要求狀態檢查
  • 要求簽署提交
  • 限制誰可以推送
  • 要求線性歷史

10. 最佳實務

  • 原子提交:每個提交只包含一個邏輯變更
  • 具描述性的訊息:說明「為什麼」,而非「做什麼」
  • 頻繁提交:小而頻繁優於大而稀少
  • 乾淨的歷史:合併前進行壓縮 (squash) 或變基 (rebase)
  • 簽署提交:使用 GPG 簽章以確保安全
  • 參考問題:連結到問題追蹤系統

Git 提交範本

建立 .gitmessage:

<type>(<scope>): <subject>

<body>

<footer>

# 類型:feat, fix, docs, style, refactor, perf, test, chore
# 範圍:受影響的元件或檔案
# 主旨:使用祈使語氣、小寫、不加句號、長度不超過 50 字元
# 內文:說明「什麼」和「為什麼」,而非「如何」,在 72 字元處換行
# 頁尾:重大變更、問題參考

設定為範本:

git config --global commit.template ~/.gitmessage

支援檔案

  • templates/PULL_REQUEST_TEMPLATE.md
  • templates/commit-msg-hook.sh
  • templates/.gitmessage

Individual skills in this repo

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

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

相關技能