Communitygithub.com

ComeOnOliver/skillshub

确保提交遵循约定式提交、分支命名约定和PR模板。在创建提交、分支或PR,或用户提及Git工作流时使用。

skillshub 是什么?

该技能是一个Git工作流强制执行器,旨在帮助开发团队保持一致的提交消息、分支命名和拉取请求(PR)流程。它适用于多种AI代理平台(如Claude Code、Cursor等),通过检测现有约定、验证提交消息格式、强制分支命名模式以及生成标准化的PR模板来工作。技能的核心功能包括:验证提交消息是否遵循约定式提交格式(如 `type(scope): description`),确保分支名称使用小写、连字符分隔并带有类型前缀(如 `feature/user-authentication`),并提供预提交和提交消息挂钩脚本以自动在本地强制执行规则。此外,它还能从现有提交生成变更日志,并指导GitHub分支保护的最佳实践。通过使用该技能,团队可以减少工作流错误,提高代码审查效率,并维护清晰的项目历史记录。

兼容平台~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 Workflow Enforcer)

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

何时使用

  • 创建提交或分支时
  • 进行代码审查或 PR 创建时
  • 用户提及“git workflow”、“commit message”、“branch naming”或“pull request”时

指令

1. 检测现有约定

检查是否存在:

  • .github/ 或 .gitlab/ 模板
  • CONTRIBUTING.md
  • 现有提交消息模式
  • 分支命名模式

2. 约定式提交(Conventional Commits)

格式: type(scope): description

类型:

  • feat: 新功能
  • fix: 错误修复
  • docs: 文档
  • style: 格式整理、缺失分号
  • refactor: 代码重构
  • perf: 性能提升
  • test: 添加测试
  • chore: 维护、依赖项

示例:

feat(auth): add OAuth2 login support
fix(api): handle null response in user endpoint
docs(readme): update installation instructions
refactor(utils): simplify date formatting logic

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): integrate Stripe payment gateway

- Add Stripe SDK configuration
- Implement payment intent creation
- Add webhook handler for payment events
- Update tests for payment flow

Closes #456

检查以下内容:

  • 标题行 ≤50 个字符
  • 正文每行 72 个字符自动换行
  • 标题和正文之间有一个空行
  • 祈使语气(使用“add”而非“added”)
  • 引用问题/工单

5. PR 模板

创建 .github/PULL_REQUEST_TEMPLATE.md:

## Description
<!-- What does this PR do? -->

## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update

## Testing
<!-- How was this tested? -->

## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-review completed
- [ ] Comments added for complex code
- [ ] Documentation updated
- [ ] Tests added/updated
- [ ] All tests passing
- [ ] No new warnings

## Related Issues
Closes #

6. 提交挂钩(Commit Hooks)

预提交挂钩:

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

# Run linter
npm run lint

# Run tests
npm test

# Check for sensitive data
if git diff --cached | grep -i "password\|api_key\|secret"; then
  echo "Error: Possible sensitive data detected"
  exit 1
fi

提交消息挂钩:

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

commit_msg=$(cat "$1")

# Check conventional commit format
if ! echo "$commit_msg" | grep -qE "^(feat|fix|docs|style|refactor|perf|test|chore)(\(.+\))?: .+"; then
  echo "Error: Commit message must follow Conventional Commits format"
  echo "Example: feat(auth): add login feature"
  exit 1
fi

7. 验证现有提交

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

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

8. 生成变更日志(Changelog)

从约定式提交生成:

# 使用 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>

# Type: feat, fix, docs, style, refactor, perf, test, chore
# Scope: component or file affected
# Subject: imperative, lowercase, no period, ≤50 chars
# Body: explain what and why, not how, wrapped at 72 chars
# Footer: breaking changes, issue references

设置为模板:

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

相关技能