bambu-studio-ai
Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...
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.
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
SkillHub CLI
skillhub install delorenj/unfuck-my-git-state打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。
将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。
Recover a repo without making the blast radius worse.
.git/ as production data until backup is taken.git symbolic-ref before manually editing .git/HEAD.bash scripts/snapshot_git_state.sh .
references/symptom-map.md.bash scripts/guided_repair_plan.sh --repo .
references/recovery-checklist.md verification gate.For explicit routing:
bash scripts/guided_repair_plan.sh --list
bash scripts/guided_repair_plan.sh --symptom phantom-branch-lock
Use disposable simulation tests before changing script logic:
bash scripts/regression_harness.sh
Run one scenario:
bash scripts/regression_harness.sh --scenario orphaned-worktree
Symptoms:
git worktree list shows a path that no longer exists.Steps:
git worktree list --porcelain
git worktree prune -v
git worktree list --porcelain
If stale entries remain, back up .git/ and remove the specific stale folder under .git/worktrees/<name>, then rerun prune.
Symptoms:
git branch -d or git branch -D fails with "already used by worktree".git worktree list seems to disagree with branch ownership.Steps:
git worktree list --porcelain
Find the worktree using that branch, switch that worktree to another branch or detach HEAD there, then retry the branch operation in the main repo.
Symptoms:
git status says detached HEAD unexpe...这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。
git reset HEAD --hard ManifestoGit is complicated AF — and I say that with love.
I’ve used git almost every day for 24 years, and it still humbles me with its unfathomable complexity. A week still does not go by without me learning one more 'neat trick' or one more way it can literally FUCK my entire day.
I don't care who you are - "oh you're that NASA flight engineer who wrote the navigational algorithm and tweaked the assembly code that landed the Curiosity robot on Mars?" - even you’ve had that moment after git reset --hard where your brain goes: “Did I just vaporize $134M in history… or am I just having a normal day?” Then you run git reflog and its literally more complex than the firehose of black box telemetry data from a Boeing crash.
Git: "You did what now? Oh, I gotchu. <prints you a wall of trickling Matrix runes> Hey, you have fun with that buddy!"
You consider the Nuclear Option: Deleting the entire repo on your local machine and re-cloning it. We don’t talk about the Re-Clone. It is the developer walk of shame. It is burning down your house because you saw a spider. Oh you've never done that? Fucking liar! We all just want to get back to main
I have this overwhelming sense of empathy when I look at this new wave of vibe coders and I’m like… buddy… you are not emotionally prepared for Git. They arrive thinking ooooh "save button, but spicy!" Then Git throws its first real problem at them and suddenly they’re staring into the abyss, learning what “detached HEAD” means like it’s a medical diagnosis.
That's why I published this new skill, "Unfuck My Git State". It’s basically an airbag for when Git decides to teach you humility.
A recovery skill for broken Git state:
HEAD
# unfuck-my-git-state Recover a repo without making the blast radius worse. ## Core Rules 1. Snapshot first. Do not "just try stuff." 2. Prefer non-destructive fixes before force operations. 3. Treat `.git/` as production data until backup is taken. 4. Use `git symbolic-ref` before manually editing `.git/HEAD`. 5. After each fix, run verification before proceeding. ## Fast Workflow 1. Capture diagnostics: ```bash bash scripts/snapshot_git_state.sh . ``` 2. Route by symptom using `references/symptom-map.md`. 3. Generate non-destructive command plan: ```bash bash scripts/guided_repair_plan.sh --repo . ``` 4. Apply the smallest matching playbook. 5. Run `references/recovery-checklist.md` verification gate. 6. Escalate only if the gate fails. For explicit routing: ```bash bash scripts/guided_repair_plan.sh --list bash scripts/guided_repair_plan.sh --symptom phantom-branch-lock ``` ## Regression Harness Use disposable simulation tests before changing script logic: ```bash bash scripts/regression_harness.sh ``` Run one scenario: ```bash bash scripts/regression_harness.sh --scenario orphaned-worktree ``` ## Playbook A: Orphaned Worktree Metadata Symptoms: - `git worktree list` shows a path that no longer exists. - Worktree entries include invalid or zero hashes. Steps: ```bash git worktree list --porcelain git worktree prune -v git worktree list --porcelain ``` If stale entries remain, back up `.git/` and remove the specific stale folder under `.git/worktrees/<name>`, then rerun prune. ## Playbook B: Phantom Branch Lock Symptoms: - `git branch -d` or `git branch -D` fails with "already used by worktree". - `git worktree list` seems to disagree with branch ownership. Steps: ```bash git worktree list --porcelain ``` Find the worktree using that branch, switch that worktree to another branch or detach HEAD there, then retry the branch operation in the main repo. ## Playbook C: Detached or Contradictory HEAD Symptoms: - `git status` says detached HEAD unexpe...
# Unfuck My Git State ## A `git reset HEAD --hard` Manifesto Git is complicated AF — and I say that with love. I’ve used git almost every day for 24 years, and it still humbles me with its unfathomable complexity. A week still does not go by without me learning one more 'neat trick' or one more way it can literally FUCK my entire day. I don't care who you are - "oh you're that NASA flight engineer who wrote the navigational algorithm and tweaked the assembly code that landed the Curiosity robot on Mars?" - even you’ve had that moment after git reset --hard where your brain goes: “Did I just vaporize $134M in history… or am I just having a normal day?” Then you run git reflog and its literally more complex than the firehose of black box telemetry data from a Boeing crash. Git: "You did *what* now? Oh, I gotchu. <prints you a wall of trickling Matrix runes> Hey, you have fun with that buddy!" You consider the Nuclear Option: Deleting the entire repo on your local machine and re-cloning it. We don’t talk about the *Re-Clone*. It is the developer walk of shame. It is burning down your house because you saw a spider. Oh you've never done that? Fucking liar! We all just want to get back to main I have this overwhelming sense of empathy when I look at this new wave of vibe coders and I’m like… buddy… you are not emotionally prepared for Git. They arrive thinking ooooh "save button, but spicy!" Then Git throws its first real problem at them and suddenly they’re staring into the abyss, learning what “detached HEAD” means like it’s a medical diagnosis. That's why I published this new skill, "Unfuck My Git State". It’s basically an airbag for when Git decides to teach you humility. ## What This Is A recovery skill for broken Git state: - orphaned worktrees - phantom "branch already used by worktree" locks - detached or contradictory `HEAD` - missing refs and weird object-name failures - all-zero worktree hashes that scream "something is cursed" ## What This Is Not...
Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...
Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discove...
Agents can sign plugins, rotate credentials without losing identity, and publicly attest to behavior.
Send and receive P2P messages using disposable numbers and PINs. No servers, no accounts. Use for human notifications, approval flows, and agent-to-agent communication.