Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问许可证需确认审计通过

git-workflowGit 工作流

Agent Skill

git-workflow 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

727

周安装

30

GitHub Stars

12

下载量

238
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:git-workflow(Git 工作流)
来源仓库:https://github.com/claude-dev-suite/claude-dev-suite
仓库路径:skills/git-workflow
安装命令:
npx skills add https://github.com/claude-dev-suite/claude-dev-suite --skill git-workflow
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/claude-dev-suite/claude-dev-suite --skill git-workflow

简介

用于团队协作与版本控制流程规范化管理。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

  • 支持分支策略、PR 审查清单与冲突解决指南。
  • 提供 rebase 与 merge 策略选择建议,保持提交历史清晰。
  • 敏感操作前应创建备份分支,避免误推送破坏主分支。
  • git-workflow 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Git Workflow Core Knowledge

Deep Knowledge: Use mcp__documentation__fetch_docs with technology: git-workflow for comprehensive documentation.

When NOT to Use This Skill

This skill focuses on Git workflow and collaboration. Do NOT use for:

  • Git command syntax - Use Git official documentation or man git
  • CI/CD pipelines - Use ci-cd or GitHub Actions specific skills
  • Code quality review - Use code-reviewer agent or clean-code skill
  • Deployment strategies - Use DevOps or infrastructure skills
  • Project management - Use issue tracking and planning tools documentation

Anti-Patterns

Anti-PatternWhy It's BadBest Practice
Giant commitsHard to review, risky to revertAtomic commits with single purpose
Vague commit messages"fix", "update"Conventional commits with context
Committing directly to mainNo review, breaks buildsFeature branches + PR workflow
Force push to shared branchesDestroys history, breaks othersUse --force-with-lease, communicate
Merge commits everywhereCluttered historyRebase feature branches before merge
No PR descriptionReviewers don't know contextClear description with why/what/how
Large PRs (1000+ lines)Impossible to reviewSmall, focused PRs
Mixing refactor + featureHard to review, hard to revertSeparate refactor and feature PRs
WIP commits in mainUnprofessional historySquash before merge

Quick Troubleshooting

IssueCheckSolution
Accidental commit to maingit statusgit reset --soft HEAD~1, create branch, commit there
Need to undo last commitKeep changes?git reset --soft HEAD~1 (keep) or --hard (discard)
Merge conflictConflicting changesResolve manually, git add, git commit
Pushed wrong codeAlready pushed?git revert <commit> (safe) or coordinate force push
Lost commitsDeleted branch?git reflog, find SHA, git cherry-pick or checkout
Want to change commit messageLast commit?git commit --amend (if not pushed)
PR too large> 500 linesSplit into multiple PRs with dependencies

Branch Naming

feature/add-user-authentication
bugfix/fix-login-redirect
hotfix/critical-security-patch
release/v1.2.0
chore/update-dependencies
docs/api-documentation

Conventional Commits

<type>(<scope>): <description>

feat: add user authentication
fix: resolve login redirect issue
docs: update API documentation
style: format code with prettier
refactor: extract validation logic
test: add user service tests
chore: update dependencies
perf: optimize database queries

Common Commands

# Branch operations
git checkout -b feature/new-feature
git branch -d feature/merged-branch
git push -u origin feature/new-feature

# Stashing
git stash
git stash pop
git stash list
git stash drop

# History
git log --oneline -20
git log --graph --oneline
git reflog

# Undo changes
git checkout -- file.txt           # Discard file changes
git reset HEAD file.txt            # Unstage file
git reset --soft HEAD~1            # Undo last commit, keep changes
git reset --hard HEAD~1            # Undo last commit, discard changes
git revert <commit>                # Create undo commit

Rebase vs Merge

# Rebase (clean history)
git checkout feature
git rebase main
git push --force-with-lease

# Merge (preserve history)
git checkout main
git merge feature

# Interactive rebase
git rebase -i HEAD~3  # Squash, reorder, edit

Pull Request Best Practices

DoDon't
Small, focused PRsGiant PRs with unrelated changes
Clear descriptionEmpty description
Self-review before requestingPush broken code
Respond to feedback promptlyIgnore comments
Squash fixup commitsLeave WIP commits

Protected Branch Rules

- Require pull request reviews
- Require status checks to pass
- Require branches to be up to date
- No force pushes
- No deletions

Production Readiness

Branch Strategy

main (production)
  └── develop
        ├── feature/user-auth
        ├── feature/payment
        └── bugfix/login-issue

Release Flow:
develop → release/v1.2.0 → main (tag v1.2.0)

Hotfix Flow:
main → hotfix/critical-fix → main + develop

Commit Hooks

# .husky/commit-msg
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit $1
// commitlint.config.js
export default {
  extends: ['@commitlint/config-conventional'],
  rules: {
    'type-enum': [2, 'always', [
      'feat', 'fix', 'docs', 'style', 'refactor',
      'test', 'chore', 'perf', 'ci', 'revert'
    ]],
    'subject-max-length': [2, 'always', 72],
    'body-max-line-length': [2, 'always', 100],
  },
};

Automated Changelog

// release.config.js (semantic-release)
export default {
  branches: ['main'],
  plugins: [
    '@semantic-release/commit-analyzer',
    '@semantic-release/release-notes-generator',
    '@semantic-release/changelog',
    '@semantic-release/npm',
    '@semantic-release/github',
    ['@semantic-release/git', {
      assets: ['CHANGELOG.md', 'package.json'],
      message: 'chore(release): ${nextRelease.version}'
    }]
  ]
};

Code Review Checklist

## PR Review Checklist

### Code Quality
- [ ] Follows project conventions
- [ ] No unnecessary complexity
- [ ] Proper error handling
- [ ] No security vulnerabilities

### Testing
- [ ] Unit tests for new code
- [ ] Integration tests if needed
- [ ] All tests passing

### Documentation
- [ ] Code is self-documenting
- [ ] Complex logic has comments
- [ ] API changes documented

### Performance
- [ ] No N+1 queries
- [ ] No memory leaks
- [ ] Appropriate caching

GitHub Actions Integration

# .github/workflows/pr-check.yml
name: PR Check

on: pull_request

jobs:
  lint-commits:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Lint commits
        uses: wagoid/commitlint-github-action@v5

  validate-pr:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Check PR title
        uses: amannn/action-semantic-pull-request@v5
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Git Configuration

# ~/.gitconfig
[user]
    name = Your Name
    email = your.email@example.com
    signingkey = YOUR_GPG_KEY

[commit]
    gpgsign = true

[pull]
    rebase = true

[fetch]
    prune = true

[init]
    defaultBranch = main

[alias]
    co = checkout
    br = branch
    ci = commit
    st = status
    lg = log --oneline --graph --decorate
    undo = reset --soft HEAD~1

Monitoring Metrics

MetricTarget
PR merge time< 24h
Review turnaround< 4h
Failed CI on PR< 10%
Commit message compliance100%

Checklist

  • Branch naming convention
  • Conventional commits
  • Commit message linting
  • Pre-commit hooks
  • PR template
  • Code review checklist
  • Branch protection rules
  • Automated changelog
  • Semantic versioning
  • GPG commit signing

Reference Documentation

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.23%
按下载量换算84

Claude

29.97%
按下载量换算71

Cursor

16.68%
按下载量换算40

Gemini CLI

8.78%
按下载量换算21

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills