Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计通过

git-workflowGit 工作流

Agent Skill

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

总安装

259

周安装

11

GitHub Stars

2

下载量

91
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/pfangueiro/claude-code-agents --skill git-workflow

简介

用于查找、检索和筛选相关信息。git-workflow 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

  • 适合在关键词搜索、任务场景或来源线索下快速定位候选结果。
  • 可结合仓库、安装命令和 README 核验具体用法。
  • 安装前建议确认权限范围和维护状态及是否触发联网或文件操作。
  • 注意避免误执行命令或越权访问敏感数据。

SKILL.md

Git Workflow

Overview

This skill provides comprehensive git workflow best practices, branching strategies, and collaboration patterns. Use it to ensure consistent, professional git usage across your projects.

When to Use This Skill

  • Creating commits with proper messages
  • Establishing branching strategies (Git Flow, GitHub Flow, Trunk-Based)
  • Handling pull requests and code reviews
  • Managing releases and hotfixes
  • Resolving merge conflicts
  • Setting up git hooks and automation

Core Workflows

Commit Message Guidelines

Follow the Conventional Commits specification for clear, semantic commit messages:

Format:

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

<body>

<footer>

Types:

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation changes
  • style: Formatting, missing semicolons, etc.
  • refactor: Code restructuring without behavior changes
  • perf: Performance improvements
  • test: Adding or updating tests
  • chore: Build process, dependencies, tooling
  • ci: CI/CD pipeline changes

Examples:

feat(auth): add JWT token refresh mechanism

Implement automatic token refresh before expiration.
Tokens are refreshed 5 minutes before expiry.

Closes #123
fix(api): handle null responses in user service

Add defensive null checks to prevent NPE when
external API returns unexpected null values.

Fixes #456

Branching Strategies

Git Flow (Traditional)

Best for: Scheduled releases, multiple version support

Branches:

  • main: Production-ready code
  • develop: Integration branch for features
  • feature/*: New features
  • release/*: Release preparation
  • hotfix/*: Emergency production fixes

Workflow:

# Start new feature
git checkout develop
git checkout -b feature/user-authentication

# Finish feature
git checkout develop
git merge feature/user-authentication
git branch -d feature/user-authentication

# Create release
git checkout -b release/1.2.0
# Bump version, final testing
git checkout main
git merge release/1.2.0
git tag -a v1.2.0 -m "Release 1.2.0"
git checkout develop
git merge release/1.2.0

GitHub Flow (Simplified)

Best for: Continuous deployment, web applications

Branches:

  • main: Always deployable
  • feature/*: All changes

Workflow:

# Start work
git checkout -b feature/add-dark-mode

# Make changes, commit often
git commit -m "feat(ui): add dark mode toggle"

# Push and create PR
git push origin feature/add-dark-mode
# Create pull request on GitHub
# After review and CI passes, merge to main
# Deploy from main

Trunk-Based Development

Best for: High-frequency releases, mature CI/CD

Key principles:

  • All work on main or very short-lived feature branches (<1 day)
  • Feature flags for incomplete features
  • Rigorous automated testing

Pull Request Best Practices

PR Description Template:

## Summary
Brief description of changes

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

## Testing Done
- [ ] Unit tests added/updated
- [ ] Integration tests pass
- [ ] Manual testing completed

## Screenshots (if applicable)

## Related Issues
Closes #123

Review Checklist:

  1. Code follows project conventions
  2. Tests cover new functionality
  3. Documentation is updated
  4. No sensitive data committed
  5. CI/CD pipeline passes
  6. Performance impact considered

Handling Merge Conflicts

Process:

# Update your branch with latest main
git checkout feature/my-feature
git fetch origin
git merge origin/main

# If conflicts occur
# 1. Open conflicted files
# 2. Look for conflict markers: <<<<<<< ======= >>>>>>>
# 3. Resolve manually, keeping appropriate changes
# 4. Remove conflict markers
# 5. Test the resolved code
git add <resolved-files>
git commit -m "chore: resolve merge conflicts with main"

Conflict Resolution Tips:

  • Communicate with the other developer if unsure
  • Prefer rebasing for cleaner history (if branch not shared)
  • Use git mergetool for complex conflicts
  • Always test after resolution

Git Hooks and Automation

Common hooks to consider:

pre-commit:

# Run linters, formatters
npm run lint
npm run format

# Run fast tests
npm run test:unit

commit-msg:

# Validate commit message format
# Ensure conventional commits compliance

pre-push:

# Run full test suite
npm run test

# Run build
npm run build

Advanced Patterns

Rebasing vs Merging

Use Rebase When:

  • Working on personal feature branch
  • Want linear history
  • Need to incorporate upstream changes
git fetch origin
git rebase origin/main

Use Merge When:

  • Working on shared branches
  • Want to preserve complete history
  • Merging pull requests
git merge origin/main

Cherry-Picking

Use to apply specific commits to another branch:

# Find commit hash
git log

# Apply to current branch
git cherry-pick <commit-hash>

Interactive Rebase

Clean up commit history before pushing:

# Rebase last 3 commits
git rebase -i HEAD~3

# Options: pick, reword, squash, fixup, drop

Common Scenarios

Undo Last Commit (Not Pushed)

git reset --soft HEAD~1  # Keep changes staged
git reset HEAD~1         # Keep changes unstaged
git reset --hard HEAD~1  # Discard changes

Undo Pushed Commit

# Create new commit that reverses changes
git revert <commit-hash>
git push origin main

Stash Changes

# Save work in progress
git stash save "WIP: feature description"

# List stashes
git stash list

# Apply stash
git stash apply stash@{0}

# Apply and remove
git stash pop

Update Commit Message

# Last commit (not pushed)
git commit --amend -m "new message"

# Older commit
git rebase -i HEAD~n  # Use 'reword'

Resources

references/

This skill includes reference documentation for deeper dives:

  • git-best-practices.md: Comprehensive git guidelines
  • branching-models.md: Detailed branching strategy comparisons
  • conflict-resolution.md: Advanced merge conflict patterns

Quick Reference

Daily Commands:

git status                    # Check status
git add <file>               # Stage file
git commit -m "message"      # Commit with message
git push origin <branch>     # Push to remote
git pull origin <branch>     # Pull from remote
git checkout -b <branch>     # Create and switch branch
git merge <branch>           # Merge branch

Inspection:

git log --oneline --graph    # Visual commit history
git diff                     # See unstaged changes
git diff --staged            # See staged changes
git show <commit>            # Show commit details
git blame <file>             # See who changed each line

Cleanup:

git branch -d <branch>       # Delete local branch
git push origin :<branch>    # Delete remote branch
git clean -fd                # Remove untracked files
git gc                       # Garbage collection

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

38.68%
按下载量换算35

Claude

27.18%
按下载量换算25

Cursor

20.05%
按下载量换算18

Gemini CLI

9.1%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills