Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计通过

git-workflowGit 工作流

Agent Skill

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

总安装

559

周安装

24

GitHub Stars

152

下载量

196
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/yonatangross/skillforge-claude-plugin --skill git-workflow

简介

git-workflow 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。

  • 适用于根据关键词、任务场景或来源线索进行信息搜集与整理的研究检索场景。
  • 通过 npx skills add 命令从 GitHub 仓库安装并使用。
  • 安装前需确认权限范围、维护状态,注意是否触发联网、命令执行或文件读写操作。
  • 建议结合原始 README 和仓库内容进一步核验具体用法和功能边界。

SKILL.md

Git Workflow

Complete git workflow patterns: GitHub Flow branching, atomic commits, and recovery operations. Essential for maintaining clean, reviewable history.

Argument Resolution

SUBCOMMAND = "$ARGUMENTS[0]"  # Optional subcommand, e.g., "recovery", "branch", "stacked"
# If no arguments, show full workflow reference.
# $ARGUMENTS is the full string (CC 2.1.59 indexed access)

Branch Naming Convention

# Feature branches (link to issue)
issue/<number>-<brief-description>
issue/123-add-user-auth

# When no issue exists
feature/<description>
fix/<description>
hotfix/<description>

Branch Rules:

  1. main is always deployable
  2. Branch from main, PR back to main
  3. Branches live < 1-3 days
  4. Delete branch after merge

Atomic Commit Checklist

[ ] Does ONE logical thing
[ ] Leaves codebase working (tests pass)
[ ] Message doesn't need "and" in title
[ ] Can be reverted independently
[ ] Title < 50 chars, body wraps at 72

Interactive Staging

# Stage changes hunk-by-hunk
git add -p

# Options:
# y - stage this hunk
# n - skip this hunk
# s - split into smaller hunks
# e - manually edit the hunk
# q - quit

# Review what's staged
git diff --staged    # What will be committed
git diff             # What won't be committed

Commit Patterns

# Separate concerns
git add -p && git commit -m "refactor: Extract database pool"
git add -p && git commit -m "feat(#456): Add query caching"

# Never combine unrelated changes
# BAD:  "feat: Add auth and fix formatting"
# GOOD: Two separate commits

Recovery Quick Reference

The Safety Net

# ALWAYS check reflog first - it has everything
git reflog

# Shows ALL recent HEAD movements
# Even "deleted" commits live here for 90 days

Common Recovery Scenarios

ScenarioNot PushedAlready Pushed
Undo commitgit reset --soft HEAD~1git revert HEAD
Wrong branchcherry-pick + resetcherry-pick + revert
Lost commitsgit reset --hard HEAD@{N}N/A
Bad rebasegit rebase --abort or reflogreflog + force-with-lease

Quick Recovery Commands

# Undo last commit, keep changes staged
git reset --soft HEAD~1

# Find lost commits
git reflog | grep "your message"

# Recover to previous state
git reset --hard HEAD@{1}

# Safe force push (feature branches only)
git push --force-with-lease

Standard Workflow

# 1. Start fresh
git checkout main && git pull origin main
git checkout -b issue/123-my-feature

# 2. Work with atomic commits
git add -p
git commit -m "feat(#123): Add User model"

# 3. Stay updated
git fetch origin && git rebase origin/main

# 4. Push and PR
git push -u origin issue/123-my-feature
gh pr create --fill

# 5. Cleanup after merge
git checkout main && git pull
git branch -d issue/123-my-feature

Anti-Patterns

Avoid:
- Long-lived branches (> 1 week)
- Merging main into feature (use rebase)
- Direct commits to main
- Force push to shared branches
- Commits that need "and" in message
- Committing broken code

Best Practices Summary

  1. Branch from main - Always start fresh
  2. Stage interactively - Use git add -p
  3. One thing per commit - If you say "and", split it
  4. Rebase, don't merge - Keep history clean
  5. Check reflog first - When something goes wrong
  6. Force-with-lease - Safer than force push
  7. Delete after merge - No stale branches

Related Skills

  • ork:commit - Create commits with conventional format and pre-commit validation
  • git-recovery - Quick recovery from common git mistakes using reflog operations
  • stacked-prs - Multi-PR development for large features with dependent PRs
  • ork:create-pr - Comprehensive PR creation with proper formatting

Key Decisions

DecisionChoiceRationale
Branching modelGitHub FlowSimple single-branch workflow, main is always deployable
Merge strategyRebase over mergeKeeps history clean and linear, easier to bisect
Branch namingissue/-Links work to tracking, enables automation
Commit granularityAtomic (one thing)Independent revert, clear history, easier review
Force push--force-with-lease onlyPrevents overwriting others' work on shared branches

Rules

Each category has individual rule files in rules/ loaded on-demand:

CategoryRuleImpactKey Pattern
Branch Protection${CLAUDE_PLUGIN_ROOT}/skills/git-workflow/rules/branch-protection.mdCRITICALProtected branches, required PR workflow
Merge Strategy${CLAUDE_PLUGIN_ROOT}/skills/git-workflow/rules/merge-strategy.mdHIGHRebase-first, conflict resolution, force-with-lease
History Hygiene${CLAUDE_PLUGIN_ROOT}/skills/git-workflow/rules/history-hygiene.mdHIGHSquash WIP, fixup commits, clean history
Recovery${CLAUDE_PLUGIN_ROOT}/skills/git-workflow/rules/recovery-reflog.mdCRITICALReflog recovery for lost commits and branches
Recovery${CLAUDE_PLUGIN_ROOT}/skills/git-workflow/rules/recovery-reset.mdCRITICALSafe vs dangerous reset modes
Recovery${CLAUDE_PLUGIN_ROOT}/skills/git-workflow/rules/recovery-stash.mdHIGHStash management and dropped stash recovery
Stacked PRs${CLAUDE_PLUGIN_ROOT}/skills/git-workflow/rules/stacked-pr-workflow.mdHIGHStack planning, PR creation, dependency tracking
Stacked PRs${CLAUDE_PLUGIN_ROOT}/skills/git-workflow/rules/stacked-pr-rebase.mdHIGHRebase management, force-with-lease, retargeting
Monorepo${CLAUDE_PLUGIN_ROOT}/skills/git-workflow/rules/monorepo-context.mdMEDIUM--add-dir, per-service CLAUDE.md, workspace detection

Total: 9 rules across 6 categories

References

Load on demand with Read("${CLAUDE_PLUGIN_ROOT}/skills/git-workflow/references/<file>"):

FileContent
github-flow.mdGitHub Flow branching guide
interactive-staging.mdInteractive staging patterns
reflog-recovery.mdReflog recovery techniques
recovery-decision-tree.mdRecovery scenario decision tree

Checklists

Load on demand with Read("${CLAUDE_PLUGIN_ROOT}/skills/git-workflow/checklists/<file>"):

FileContent
branch-checklist.mdPre-flight checks before creating branches
pre-commit-checklist.mdValidation before committing

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

Claude Code

29.97%
按下载量换算59

OpenCode

21.57%
按下载量换算42

Antigravity

16.83%
按下载量换算33

Gemini CLI

11.03%
按下载量换算22

windsurf

7.68%
按下载量换算15

trae

2.97%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills