← 返回 Skills 市场
darinrowe

git-workflows-pro

作者 DarinRowe · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
261
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install git-workflows-pro
功能描述
Handle advanced git workflows and recovery tasks. Use when the user needs help with interactive rebase, commit cleanup, conflict resolution, reflog recovery,...
使用说明 (SKILL.md)

Git Workflows

Use this skill for non-trivial git work where safety, history clarity, or repository structure matters more than a single command.

Keep the main thread focused on the user’s goal. Prefer the smallest safe sequence of git operations.

Core approach

Before suggesting commands, determine:

  1. the user’s goal
  2. whether history is already shared with others
  3. whether the task changes commits, refs, working tree, or repository structure
  4. whether recovery should be prepared first

If a step is destructive or hard to reverse, create a safety point first.

Default safety rules

  • Check git status before history edits.
  • Check the current branch and upstream before rebases, resets, or force-pushes.
  • Prefer non-destructive inspection first.
  • Prefer git switch and git restore over older mixed forms when clarity matters.
  • Create a recovery point before risky history surgery.
  • Avoid rewriting shared history unless the user explicitly wants that tradeoff.
  • When conflicts or recovery are involved, explain both the immediate fix and the rollback path.

Recovery-first moves

Use these patterns early when risk is high:

git status
git branch backup/$(date +%Y%m%d-%H%M%S)-preop

For history recovery, inspect before changing anything:

git reflog --date=local --decorate -n 30
git log --oneline --graph --decorate -n 30

Read references/recovery.md for reflog-based recovery, reset recovery, branch recovery, and force-push mistakes.

Common task families

History cleanup

Use for:

  • squashing fix commits
  • rewording commit messages
  • splitting a bad commit
  • dropping accidental commits
  • preparing a branch before merge

Prefer interactive rebase for local or not-yet-shared history.

Bug origin hunting

Use git bisect when the user knows a good state and a bad state and needs to find the introducing commit.

Parallel branch work

Use git worktree when the user needs two branches checked out at once, wants cleaner hotfix flow, or wants to avoid stashing.

Conflict handling

Resolve carefully when rebasing, merging, cherry-picking, or applying stashes. Preserve user intent, not just file merge success.

Repository archaeology

Use blame, pickaxe, grep, log graph, and path history when the user needs to answer:

  • who changed this
  • when did this break
  • where did this line come from
  • which commit removed this behavior

Repository shape changes

Use extra care for:

  • submodules
  • subtrees
  • sparse checkout
  • worktree pruning
  • branch renames
  • default-branch migration

Read references/advanced-patterns.md when the task involves repository topology rather than simple day-to-day commits.

Decision rules

Rebase vs merge

  • Prefer rebase for cleaning local feature-branch history.
  • Prefer merge when preserving shared branch history matters.
  • If the branch is already shared, explicitly call out the rewrite risk before rebasing.

Subtree vs submodule

  • Prefer subtree when the user wants simpler consumption and fewer contributor footguns.
  • Prefer submodule when the user truly needs a pinned external repository boundary.

Worktree vs stash

  • Prefer worktree for medium or long parallel work.
  • Prefer stash for short interruptions or tiny context switches.

Reset vs restore vs revert

  • Prefer restore for file-level undo.
  • Prefer reset for local history and index surgery.
  • Prefer revert for undoing commits that are already shared.

Operating style

When guiding the user:

  1. say what state to inspect first
  2. state the safest command sequence
  3. note whether history is being rewritten
  4. give the rollback path when risk is non-trivial

Keep command sets short. Do not dump every git option unless needed.

When to read references

  • Read references/recovery.md for reflog recovery, accidental reset, branch resurrection, detached HEAD recovery, or force-push mistakes.
  • Read references/history-surgery.md for interactive rebase, commit splitting, autosquash, cherry-pick cleanup, and safe force-push guidance.
  • Read references/advanced-patterns.md for worktree, bisect, subtree, submodule, sparse checkout, and repository-structure decisions.

Output template

When responding on a git workflow task, prefer this structure:

  • Goal:
  • Risk level:
  • Safe first check:
  • Recommended commands:
  • Rollback path:
  • Shared-history warning:
安全使用建议
This skill is coherent and appears to be what it claims: a set of safe-minded instructions and reference snippets for advanced Git tasks. Before using it, note three practical points: (1) ensure the machine running commands has Git installed — the skill assumes git is available but doesn't declare it; (2) many recommended commands are destructive (reset --hard, rebase, force-push) — always create a backup branch or recovery point and review commands before executing; (3) the skill will suggest push/force guidance but cannot itself push anything unless the agent/platform executes those commands or you run them — be cautious when pushing to shared remotes. If you want extra safety, require explicit confirmation before any operation that rewrites history or pushes to remotes.
功能分析
Type: OpenClaw Skill Name: git-workflows-pro Version: 1.0.0 The skill bundle provides a comprehensive and safety-oriented set of instructions for managing advanced Git workflows, such as history recovery, interactive rebasing, and repository archaeology. It consistently emphasizes best practices like creating backup branches before destructive operations, using '--force-with-lease', and verifying repository state with 'git status' and 'reflog' (SKILL.md, references/recovery.md).
能力评估
Purpose & Capability
The name, description, and all included reference files consistently describe advanced Git workflows and recovery tasks. The instructions use only Git commands and local repository inspection. One minor inconsistency: the skill invokes many git commands but the registry metadata lists no required binary; it should declare 'git' as a required binary or otherwise note that Git must be present.
Instruction Scope
SKILL.md and the reference files restrict actions to local Git operations (status, log, reflog, rebase, reset, worktree, bisect, etc.) and explain safety/rollback steps. There are no instructions to read unrelated system files, call external endpoints, or exfiltrate data. The guidance explicitly advises creating local recovery points before destructive actions.
Install Mechanism
No install spec or code is included (instruction-only), so nothing is downloaded or written to disk. This is the lowest-risk install profile.
Credentials
The skill requests no environment variables, credentials, or config paths. All operations are explained as local Git commands. There is no unexplained request for secrets or cloud credentials.
Persistence & Privilege
The skill does not request permanent presence (always:false) and is user-invocable. It does not modify other skills or system-wide settings; autonomous invocation (disable-model-invocation:false) is the platform default and not by itself a concern here.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install git-workflows-pro
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /git-workflows-pro 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
git-workflows-pro 1.0.0 initial release - Provides advanced guidance for Git workflows and repository recovery. - Covers interactive rebase, commit cleanup, conflict resolution, reflog recovery, cherry-pick, stash, worktree, bisect, submodule vs subtree, sparse checkout, branch archaeology, and undoing dangerous history changes. - Emphasizes safety checks and recovery points before destructive actions. - Includes decision rules for rebase vs merge, subtree vs submodule, and worktree vs stash scenarios. - Outlines a clear, template-driven approach for supporting complex Git tasks and troubleshooting.
元数据
Slug git-workflows-pro
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

git-workflows-pro 是什么?

Handle advanced git workflows and recovery tasks. Use when the user needs help with interactive rebase, commit cleanup, conflict resolution, reflog recovery,... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 261 次。

如何安装 git-workflows-pro?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install git-workflows-pro」即可一键安装,无需额外配置。

git-workflows-pro 是免费的吗?

是的,git-workflows-pro 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

git-workflows-pro 支持哪些平台?

git-workflows-pro 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 git-workflows-pro?

由 DarinRowe(@darinrowe)开发并维护,当前版本 v1.0.0。

💬 留言讨论