Token导航 LogoToken导航

Agent Skill · 研究检索

git-workflow(Git 工作流)

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

git-workflow 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为权限未标注;许可证为 MIT,暂无第三方扫描结果,按安装量在研究检索类的 73,675 个 Skill 里排第 72,863。

总安装 186周安装 8GitHub Stars 公开资料未说明下载 65核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

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

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

命令行安装

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

AgentSkills.tonpx skills
npx skills add philoserf/claude-code-setup --skill "git-workflow"

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

git-workflow 用于查找、检索和筛选相关信息,适用于 Codex、Claude、Cursor、Gemini CLI 等宿主环境。支持基于关键词或任务场景快速定位候选结果,提升开发流程中的信息检索效率。通过 npx skills add 命令从 philoserf/claude-code-setup 仓库安装。

安装前请确认是否需要联网、执行命令或访问文件系统,并检查仓库维护状态。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/git-workflow

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add philoserf/claude-code-setup --skill "git-workflow";命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    权限没有明确标注,第一次使用时只给一个无关紧要的任务,观察它到底读了哪些文件和网络。

常见问题

6 条

git-workflow 怎么安装?

在终端执行 npx skills add philoserf/claude-code-setup --skill "git-workflow"。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

git-workflow 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

git-workflow 需要什么权限?

权限级别没有明确标注。第一次使用时建议只给无关紧要的任务,观察它实际读写了哪些内容。

git-workflow 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

git-workflow 用的人多吗?

公开数据是累计安装 186 次,近一周安装 8 次,下载 65 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

git-workflow 安全吗?

没有查到第三方扫描结果,安全性无法从公开资料判断,安装前请自行审查源码、依赖和命令行为。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 没有第三方扫描结果,安全性只能靠自己读源码判断。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 要求有安全扫描结论才肯安装的团队。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
git-workflow

Git 工作流 · 本页

186—权限未标注MIT未收录

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
git-workflow
description
Automates git workflows with branch management, atomic commits, history cleanup, and PRs. Use when committing, pushing, creating PRs, cleaning up commits, or organizing git changes with best practices.
allowed-tools
[Read, Bash, AskUserQuestion, TodoWrite]

Reference Files

Detailed git workflow guidance:

  • workflow-phases.md - Step-by-step instructions for each workflow phase (0-6) with specific commands, safety checks, and decision points
  • commit-format.md - Comprehensive commit message formatting guide with rules, examples, templates, and common mistakes
  • rebase-guide.md - Interactive rebase safety guidelines, commands, conflict resolution, and recovery techniques
  • examples.md - Real-world workflow scenarios showing the skill in action across different situations

Git Workflow Skill

This skill provides intelligent, end-to-end Git workflow automation. It analyzes repository changes, organizes them into atomic commits with well-formatted messages, manages branches, cleans up commit history, and helps create pull requests.

Contents

Workflow Overview

The skill follows a 7-phase workflow:

  1. Branch Management - Ensure work is on appropriate branch
  2. Repository Analysis - Understand current state and changes
  3. Organize into Atomic Commits - Group related changes logically
  4. Create Commits - Generate well-formatted commit messages
  5. Commit History Cleanup - Optionally reorganize commits before push

4.5. Pre-Push Quality Review - Analyze commit quality and run tests (MANDATORY)

  1. Push with Confirmation - Push changes to remote after approval
  2. Pull Request Creation - Optionally create PR with generated description

Phase 0: Branch Management

Goal: Prevent accidental work on protected branches and ensure proper isolation.

If the user is on a protected branch (main/master/develop/production/staging) with uncommitted changes, BLOCK and require creating a feature branch. If working directory is clean, proactively suggest branching. Provides 3 options: auto-suggested branch (recommended), custom branch name, or override with confirmation.

Skip this phase if the user is already on a feature branch, hotfix branch, or release branch.

For detailed steps, see phase-0-protocol.md and workflow-phases.md#phase-0-branch-management.

Phase 1: Repository Analysis

Goal: Thoroughly understand the current repository state and changes.

Run git commands to see changed files, diffs, and recent history. Analyze to identify types of changes, affected files, logical groupings, and untracked files.

Perform safety checks for merge conflicts and rebase-in-progress before proceeding.

For detailed steps, see workflow-phases.md#phase-1-repository-analysis.

Phase 2: Organize into Atomic Commits

Goal: Group changes into logical, atomic commits that each represent a single coherent change.

Apply atomic commit principles: one logical change per commit, self-contained and compilable, related changes together.

Group changes by priority: bug fixes → tests → refactoring → features → documentation → configuration.

Create a commit plan and present to user for approval. Use TodoWrite to track commits if there are 3+.

For detailed steps and grouping strategy, see workflow-phases.md#phase-2-organize-into-atomic-commits.

Phase 3: Create Commits

Goal: Create each commit with a properly formatted commit message.

For each commit: stage files, generate well-formatted commit message (≤72 chars, imperative mood, explains WHY), execute commit using heredoc, and verify success.

Key commit message rules:

  • Imperative mood: "Add feature" not "Added"
  • Be specific: "Fix null pointer in login" not "Fix bug"
  • Explain WHY, not WHAT
  • Summary ≤72 characters, body wrapped at 72

For detailed formatting rules, examples, and templates, see commit-format.md.

For detailed steps, see workflow-phases.md#phase-3-create-commits.

Phase 4: Commit History Cleanup (Optional)

Goal: Optionally reorganize recent commits for a cleaner history before pushing.

Offer cleanup when multiple commits could be squashed, messages need improvement, or better ordering would help. Skip if commits are already pushed (unless explicit force push approval), on shared branch, or only one commit.

IMPORTANT: NEVER use git rebase -i (requires interactive input). Instead, explain manual commands to user or use non-interactive alternatives like git reset --soft.

For detailed rebase safety guidelines, commands, and examples, see rebase-guide.md.

For detailed steps, see workflow-phases.md#phase-4-commit-history-cleanup-optional.

Phase 4.5: Pre-Push Quality Review (Mandatory)

Goal: Ensure commit quality and verify tests before pushing to remote.

This phase is MANDATORY - it always runs before Phase 5 to catch quality issues early.

Performs automated analysis of commits including generic message detection, squash opportunity identification, format compliance verification, and offers test execution.

Shows push preview with commit list, stats, and quality report. If issues found, provides clear options to fix or override with justification.

Quality checks performed:

  • Generic message detection - Flags "WIP", "fix", "update", "temp" and other vague messages
  • Squash opportunity detection - Identifies related commits that could be combined
  • Format compliance - Verifies 72-char limit, imperative mood, capitalization
  • Test integration - Detects and offers to run npm, pytest, go test, cargo test, make test

User options when issues detected:

  • Fix issues - Return to Phase 3 or 4 to reword or squash commits
  • Run tests - Execute test suite before push (optional)
  • Override - Push anyway with justification (required for blockers)
  • Cancel - Exit workflow to investigate

For detailed quality checks, test detection, and user interaction patterns, see phase-4.5-protocol.md.

For detailed steps, see workflow-phases.md#phase-45-pre-push-quality-review-mandatory.

Phase 5: Push with Confirmation

Goal: Push commits to remote safely after user approval.

CRITICAL: Before allowing push, check if current branch is protected (main/master/develop/production/staging). If protected, BLOCK the push and enter the Protected Branch Push Protocol.

Show summary of commits to be pushed (number, branch, commit messages), ask for confirmation, then push. Use -u flag for new branches.

Perform safety checks: verify remote exists, detect and block protected branch pushes, prevent force pushes to protected branches, handle failures gracefully.

For protected branch handling, see protected-branch-protocol.md.

For detailed steps, see workflow-phases.md#phase-5-push-with-confirmation.

Phase 6: Pull Request Creation (Optional)

Goal: Optionally create a pull request after successful push.

After successful push, ask if user wants a PR. Verify gh CLI is available, detect base branch, generate title and description from commits, show for review, then create PR and show URL.

If gh not available, provide GitHub web URL for manual PR creation.

For detailed steps, see workflow-phases.md#phase-6-pull-request-creation-optional.

Safety Checks

Always perform these checks during the workflow:

  1. Before any operation:

- Check for merge conflicts in files - Check for rebase/merge in progress - Alert user and stop if found

  1. Before committing:

- Verify files are actually changed - Check commit message meets format requirements

  1. Before rebasing:

- Verify commits haven't been pushed (or get explicit force-push approval) - Check not on protected branch - Ensure working directory is clean

  1. Before pushing:

- Verify remote exists - CRITICAL: Check if current branch is protected - if yes, BLOCK and enter Protected Branch Push Protocol - Detect force push requirement - if pushing to protected branch, BLOCK absolutely - Confirm with user (only if not blocked)

  1. Before creating PR:

- Verify push succeeded - Check branch exists on remote - Verify gh CLI or provide alternative

Common Edge Cases

No changes to commit:

  • Inform user repository is clean
  • Exit gracefully

Untracked files found:

  • List untracked files
  • Ask if any should be included
  • Identify files that should be .gitignored (.env, debug logs, etc.)
  • Add to .gitignore if appropriate

Large changesets (10+ files or 500+ lines):

  • May need user guidance for grouping
  • Suggest reviewing changes carefully
  • Consider breaking into multiple PRs

Detached HEAD state:

  • Alert user
  • Explain situation
  • Offer to create branch from current commit

Merge conflicts:

  • Do not proceed with commits
  • Alert user to resolve conflicts first
  • Show conflicted files and suggest resolution steps

No remote configured:

  • Detect with git remote -v
  • Ask if user wants to add remote
  • Help set up origin if needed

Protected branch (working on main/master/develop/production/staging):

Rebase in progress:

  • Detect state
  • Alert user
  • Ask if they want to continue or abort:

- Continue: User must resolve manually - Abort: Run git rebase --abort

Tool Usage Examples

Check current state:

git status --short
git branch --show-current
git log --oneline -n 10

Analyze changes:

git diff
git diff --staged
git diff --stat

Create commits:

git add file1.js file2.js
git commit -m "$(cat <<'EOF'
Add user authentication feature

Implement JWT-based authentication to secure API endpoints.

- Add login/logout endpoints
- Implement JWT token generation and validation
- Add authentication middleware
EOF
)"

Push changes:

# New branch
git push -u origin feature/user-auth

# Existing branch
git push

Create PR:

gh pr create --title "Add user authentication" --body "$(cat <<'EOF'
## Summary
Implements JWT-based authentication for API security.

## Changes
- Add login/logout endpoints
- JWT token generation and validation
- Authentication middleware

## Testing
- Added unit tests for auth functions
- Manual testing with Postman
EOF
)"

User Interaction Patterns

Use AskUserQuestion for:

  • Branch creation confirmation
  • Commit plan approval
  • Modifications to commit grouping
  • Push confirmation
  • PR creation confirmation
  • Force push warnings
  • Protected branch warnings

Use TodoWrite for:

  • Tracking multiple commits to create (3+ commits)
  • Long workflow with many steps
  • Keeping user informed of progress

Use Bash for:

  • All git commands
  • All gh commands
  • Repository state inspection

Reference Documentation

For detailed information, see supporting files:

  • workflow-phases.md - Detailed step-by-step instructions for each workflow phase (0-6). Read this when you need the complete procedure for any phase including specific commands, safety checks, and decision points.
  • commit-format.md - Comprehensive commit message formatting guide with detailed rules, examples, templates, and common mistakes. Read this when you need specific guidance on commit message format, character limits, imperative mood examples, or want to see good vs. bad examples.
  • rebase-guide.md - Interactive rebase safety guidelines, commands, conflict resolution, and recovery techniques. Read this when planning commit history cleanup, before rebasing, or when handling rebase conflicts.
  • protected-branch-protocol.md - Protected branch push prevention protocol with detection logic, 3-option handling (feature branch migration, branch rename, emergency override), force push blocking, and edge cases. Read this when Phase 5 detects a push to protected branch, or when implementing protected branch safety checks.
  • examples.md - Real-world workflow scenarios showing the skill in action across different situations: simple features, bug fixes, large refactorings, messy history cleanup, edge cases, and more. Read this to understand how to apply the workflow in practice.

Summary

This skill automates the entire Git workflow from analyzing changes to creating a PR. It emphasizes:

  • Quality over speed - well-formatted commits are important
  • Safety first - always check state and confirm destructive operations
  • User control - ask for approval at key decision points
  • Education - explain what's happening and why

The goal is to help users maintain clean, professional Git history with minimal effort while teaching best practices along the way.

平台分布

windsurf

26.42%
按下载量换算17

OpenCode

21%
按下载量换算14

Codex

17.76%
按下载量换算12

Claude Code

12.87%
按下载量换算8

Antigravity

7.35%
按下载量换算5

Gemini CLI

3.32%
按下载量换算2

安全审计

暂无安全审计结果可展示。

权限和风险

权限未标注

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

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

继续浏览同类 Skills