From lazycortex-core
Manually break the lazy-core.git staging lock. Asks before acting (AskUserQuestion). Use only when /lazy-core.git-status shows a lock that the hook's break-the-lock heuristics will not auto-break.
How this skill is triggered — by the user, by Claude, or both
Slash command
/lazycortex-core:lazy-core.git-unlockThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Force-delete `<repo>/.git/lazy-git.lock`. The hook's automatic break-the-lock heuristics (dead PID / different host / stale-and-idle) handle most cases. Use this skill only when the lock is genuinely stuck — for example, the holder is alive but you know it has abandoned the staging window.
Force-delete <repo>/.git/lazy-git.lock. The hook's automatic break-the-lock heuristics (dead PID / different host / stale-and-idle) handle most cases. Use this skill only when the lock is genuinely stuck — for example, the holder is alive but you know it has abandoned the staging window.
This skill has 4 ordered steps. The executing agent MUST NOT skip, merge, reorder, or silently omit any step. To make dropped steps structurally impossible:
TaskCreate with exactly one task per step below — no merging, no abbreviation, no renaming. The canonical list (use these titles verbatim):
Step 1 — Resolve repo root and inspectStep 2 — Confirm with the operatorStep 3 — Break the lockStep 4 — Log the runin_progress on enter and completed on exit. "Completed" means "I executed the step's logic AND produced an outcome word for it". No-ops count only if they emit an explicit outcome (asserted, unchanged, skipped-per-user-choice, …).TaskList shows every prior task completed or explicitly skipped with an outcome. A still-pending task is a bug — stop and execute it first.Run the same inspect one-liner as /lazy-core.git-status Step 2 to capture current lock state. Read that skill's SKILL.md to extract the snippet — use it verbatim.
If state is None (no lock) → print "no lock to break" and emit outcome not-found.
If the lock exists, the one-liner output includes the holder's session ID, PID, age, host, branch, liveness status, and whether it is currently breakable. Capture this output for Step 2.
Outcome: asserted (lock found) or not-found (no lock).
Use AskUserQuestion with one question. Phrase it as:
"Lock held by session
<state.session_id>(PID<state.pid>, started<age>sago, host<state.host>, branch<state.branch>). Liveness:<alive|dead>. Break the lock?"
cancelled and stop.Outcome: confirmed (user said yes) or cancelled (user said no).
Run:
python3 - <<'PY'
import sys
sys.path.insert(0, "${CLAUDE_PLUGIN_ROOT}/bin")
import staging_lock
from pathlib import Path
import subprocess
repo = Path(subprocess.check_output(["git","rev-parse","--show-toplevel"], text=True).strip())
existed = staging_lock.break_lock(repo, reason="manual")
print("broken" if existed else "no-lock")
PY
If output is broken → the lock was present and has been deleted. Emit outcome broken. If output is no-lock → the lock had already been deleted (race with another tool). Emit outcome race.
Outcome: broken or race.
Per .claude/rules/lazy-log.logging.md. Use mkdir -p then Write, never chained with &&.
mkdir -p .logs/claude/lazy-core.git-unlock
date -u +%Y-%m-%d_%H-%M-%S
Use the timestamp to write .logs/claude/lazy-core.git-unlock/<ts>.md with the standard frontmatter (git_sha, git_branch, date, input: none) and a body capturing:
Outcome: logged.
One line per task in the canonical list, with its outcome word. A missing line is a bug.
npx claudepluginhub mebius-san/lazy-cortex --plugin lazycortex-coreCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.