emiliodominguez/flow-skills/flow-git-fix
Claude Code and agent skill by emiliodominguez/flow-skills
- community
Checking that the SKILL.md file is still in the repository.
Git repair that preserves unrelated work. Use for merge or rebase conflicts, interrupted operations, broken stacks, lost commits or authorized branch cleanup. Hands back to `flow-work` or `flow-ship`.
Install
npx vskill@latest install emiliodominguez/flow-skills/flow-git-fixSKILL.md
The same SKILL.md was published earlier as emiliodominguez/flow-skills/flow-git-fix.
Repair Git state
Understand the operation and ownership before changing history. Fix the requested problem without making unrelated user work disappear.
Phase 1: Inspect and preserve
- Read status, branch/upstream, remotes, worktrees, staged/unstaged/untracked changes, and any
active merge, rebase, cherry-pick or revert. Check history/reflog as needed.
- Preserve valuable local work before a destructive recovery. Never reset, clean or delete an
unfamiliar file or branch just to make a command succeed.
Phase 2: Resolve the actual operation
- Read conflict markers, index stages, the common base and both intended changes. Ours/theirs
flips between merge and rebase/cherry-pick; never apply one side blindly.
- Resolve behavior and affected callers, run relevant checks, stage only resolved paths, and
continue with the operation-specific command. Confirm no conflict markers remain.
- Abort is not a universal undo: Git may be unable to restore pre-existing uncommitted changes.
Inspect what it preserves first, then verify the resulting state instead of promising no harm.
Phase 3: Handle stacks and publication deliberately
- Check the installed stack tool, version and help before assuming semantics.
- Stack tools differ: some restack locally, others sync by pulling, pushing and deleting
branches. Read the dry run and scope first, use a local-only mode for local repairs, and account for branches skipped because another worktree owns them. Syncing a stack is not a local whole-stack rebase.
- Rewrite published history only when authorized and necessary. Record the remote tip being
replaced and use an explicit lease: --force-with-lease=refs/heads/<branch>:<reviewed-remote-oid>. A bare lease can be weakened by background fetches. A rejected lease means reinspect, never retry the force-push. Prefer a simpler valid repair when one meets the request.
Phase 4: Clean up only requested obsolete work
Match repository, branch identity and current tip to the merged work. Check later commits, upstream, all worktrees and unpushed changes. A reused branch name or old merged change request is not proof of obsolescence, and git branch -d may compare against upstream instead of the default branch. Use dry-run discovery and paginated results; keep uncertain items.
Anti-patterns
- Blind ours/theirs,
reset --hardorclean -fdas routine troubleshooting. - Replaying an interrupted external action before checking its outcome.
- Overstating what abort, branch deletion or a bare force-with-lease guarantees.
- Pushing when the user asked only for local conflict resolution.
Done when
- The Git operation is resolved and the resulting graph and index are inspected.
- Intended behavior and unrelated local work are preserved, with relevant checks run.
- Any authorized remote change is confirmed against the actual remote ref.
Resume flow-work or flow-ship at the stage the user originally requested.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/flow-git-fix/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 3
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/emiliodominguez/flow-skills/flow-git-fix)