recover-from-stale-git-locks
Diagnose and recover from stale git lock files caused by crashed background processes
Best use case
recover-from-stale-git-locks is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Diagnose and recover from stale git lock files caused by crashed background processes
Teams using recover-from-stale-git-locks should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/recover-from-stale-git-locks/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How recover-from-stale-git-locks Compares
| Feature / Agent | recover-from-stale-git-locks | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Diagnose and recover from stale git lock files caused by crashed background processes
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Recover from Stale Git Locks When git operations fail with `.git/index.lock` errors, the lock file may persist after a crash. Check if any git process is actually running with `ps aux | grep git`. If none exist, safely remove the stale lock file with `rm .git/index.lock`, then retry the operation. For submodules or nested repos, check and clean locks in each `.git` directory. Always verify the background process completed before proceeding.
Related Skills
recover-from-corrupted-git-state
Diagnose and recover from corrupted git states (stale locks, failed rebases, pre-commit hook blocks) during bulk operations
multi-repo-stale-lock-recovery
Diagnose and recover from stale git lock files in multi-repo workspaces, especially with submodules
multi-repo-pull-with-untracked-conflict-recovery
Diagnose and resolve multi-repo pull failures caused by untracked files conflicting with remote changes
multi-repo-git-recovery
Diagnose and recover from stale lock files, diverged branches, and untracked file conflicts across multiple repos in a workspace ecosystem
multi-layer-stale-state-debugging
Detect and clear stale state persisting across multiple storage layers (auth files, cache, code logic)
handle-browser-automation-financial-site-blocks
Workflow for working around Chrome extension blocks on financial sites during data collection tasks
git-stale-lock-recovery
Diagnose and recover from git stale lock files and corrupted rebase states in multi-repo workflows
git-large-file-staging-conflict-recovery
Recover from pre-commit hook blocks on oversized files and corrupted rebase states during bulk repo syncs
freetaxusa-form-entry-recovery
Handle session timeouts and modal dialogs when entering tax forms in FreeTaxUSA
workspace-hub-sync-concurrent-writer-blocks
Handle repository_sync cleanup when workspace-hub root is being mutated by concurrent Codex/Codex/Gemini sessions.
repo-sync-deleted-remote-branch-and-unrelated-history-recovery
Recover multi-repo sync failures caused by deleted upstream branches, stale git index locks, and local branches with unrelated history to the remote default branch.
plan-review-fanout-runner-drift-recovery
Recover plan-review waves when provider wrapper/cwd/date drift creates false MAJOR or UNAVAILABLE artifacts instead of substantive review.