← Back to Skills Marketplace
delorenj

Unfuck My Git State

by delorenj · GitHub ↗ · v0.2.1
cross-platform ✓ Security Clean
2266
Downloads
1
Stars
7
Active Installs
3
Versions
Install in OpenClaw
/install unfuck-my-git-state
Description
Diagnose and recover broken Git state and worktree metadata with a staged, low-risk recovery flow. Use when Git reports detached or contradictory HEAD state, phantom worktree locks, orphaned worktree entries, missing refs, 0000000000000000000000000000000000000000 hashes, or branch operations fail with errors like already checked out, unknown revision, not a valid object name, or cannot lock ref.
Usage Guidance
This skill appears coherent and repository-scoped, but review and run it consciously: 1) Inspect the scripts locally before executing. 2) Run the regression harness in a disposable environment first if you want to validate behavior. 3) The tool creates snapshots under the repo (./.git-state-snapshots) and may instruct you to create tar backups — make sure you have disk space and that storing such backups in the current directory is acceptable. 4) Follow the recommended verification gate and backup steps before performing any of the 'last resort' commands (editing .git/HEAD, force-moving branches, or removing .git/worktrees). 5) Because this skill executes Bash scripts against your repo, avoid running it as a privileged user or against a repo containing sensitive unpushed data unless you have backups.
Capability Analysis
Type: OpenClaw Skill Name: unfuck-my-git-state Version: 0.2.1 The skill bundle aims to diagnose and recover corrupted Git repository states. While it involves commands that can modify Git state, including direct manipulation of `.git/HEAD` (e.g., in `SKILL.md` and `references/symptom-map.md`), these are explicitly presented as 'last resort' or 'escalation' steps, always preceded by strong recommendations to 'Snapshot first' and 'back up .git/'. All scripts are local, perform read-only diagnostics or controlled modifications within the repository, and do not exhibit any signs of data exfiltration, malicious execution, persistence, obfuscation, or prompt injection with harmful intent. The `regression_harness.sh` script safely simulates these scenarios in temporary directories for testing purposes.
Capability Assessment
Purpose & Capability
The name/description match the included scripts and references. The scripts take snapshots, detect symptoms, print recovery plans, and provide a disposable regression harness — all directly related to diagnosing and repairing Git metadata. No unrelated credentials, binaries, or external services are requested.
Instruction Scope
SKILL.md and the scripts confine actions to the target repository: creating a snapshot under <repo>/.git-state-snapshots, running git commands, and printing recommended commands. The guided script only recommends fixes (it does not execute destructive commands). The documentation and playbooks explicitly require backups and verification before destructive actions.
Install Mechanism
No install spec is present; this is instruction-only with bundled scripts. Nothing is downloaded or installed from external URLs. The scripts are plain Bash and operate locally.
Credentials
No environment variables, credentials, or config paths are required. The scripts read repository metadata (e.g., .git/HEAD, .git/worktrees) which is appropriate for the stated purpose.
Persistence & Privilege
The skill is not forced-always and does not request persistent system-level privileges. It writes snapshots under the repo top-level (.git-state-snapshots) and the user-facing docs show where backups will be created; these are proportionate to diagnostic and recovery activities.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install unfuck-my-git-state
  3. After installation, invoke the skill by name or use /unfuck-my-git-state
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.2.1
- Documentation (README.md) updated for clarity and workflow guidance. - No changes to code or core logic—documentation only.
v0.2.0
- Major redesign: introduces a staged, low-risk workflow for Git state and worktree recovery. - Adds guided scripts for diagnostics, repair planning, and verification, including snapshot, checklist, and regression harness tools. - Provides clear "playbooks" for common problems: orphaned worktree metadata, phantom branch locks, detached/contradictory HEAD, and broken refs. - Emphasizes non-destructive fixes, mandatory backup, and verification before escalation. - Includes new automation guidance for integration in tools and scripts. - Adds symptom mapping and checklists to ensure safe recovery and prevention of repeat failures.
v0.1.0
Initial release providing techniques and step-by-step procedures for diagnosing and recovering from problematic git repository states. - Diagnose corrupted git state, orphaned worktrees, and branch reference inconsistencies with a structured checklist. - Covers recovery operations for corrupted HEAD, orphaned worktree metadata, and branch lock conflicts. - Documents a "nuclear option" to fully rebuild local branch refs from remote in case of severe corruption. - Provides prevention patterns and validation routines for safer worktree operations and integration tips for automation tools. - Includes recipes for common edge cases and escalation steps for irrecoverable repositories.
Metadata
Slug unfuck-my-git-state
Version 0.2.1
License
All-time Installs 7
Active Installs 7
Total Versions 3
Frequently Asked Questions

What is Unfuck My Git State?

Diagnose and recover broken Git state and worktree metadata with a staged, low-risk recovery flow. Use when Git reports detached or contradictory HEAD state, phantom worktree locks, orphaned worktree entries, missing refs, 0000000000000000000000000000000000000000 hashes, or branch operations fail with errors like already checked out, unknown revision, not a valid object name, or cannot lock ref. It is an AI Agent Skill for Claude Code / OpenClaw, with 2266 downloads so far.

How do I install Unfuck My Git State?

Run "/install unfuck-my-git-state" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Unfuck My Git State free?

Yes, Unfuck My Git State is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Unfuck My Git State support?

Unfuck My Git State is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Unfuck My Git State?

It is built and maintained by delorenj (@delorenj); the current version is v0.2.1.

💬 Comments