# Devxkit Gitnexus Recovery

Diagnose and recover GitNexus MCP and pending index refresh without auto-killing processes. The user receives structured status output and can clear pending markers to restore index freshness.

**Canonical URL:** https://skillshunter.net/skills/discovered-6760d0c76a099b74d9f4457d0d0ee2904d44ae525d16dc61

**JSON URL:** https://skillshunter.net/api/public/v1/skills/discovered-6760d0c76a099b74d9f4457d0d0ee2904d44ae525d16dc61

**Markdown URL:** https://skillshunter.net/skills/discovered-6760d0c76a099b74d9f4457d0d0ee2904d44ae525d16dc61.md

**Instructions download URL:** https://skillshunter.net/skills/discovered-6760d0c76a099b74d9f4457d0d0ee2904d44ae525d16dc61/download

**Category:** Software & Development

**Source URL:** https://github.com/jesuserro/devxkit/blob/0380bd30488627f7232a08c38ebc0c7dd9a66dc3/src/devxkit/assets/skills/devxkit/devxkit-gitnexus-recovery/SKILL.md

**Source commit:** 0380bd30488627f7232a08c38ebc0c7dd9a66dc3

**Listing approved at:** 2026-11-29

**Created at:** 2026-11-28T18:48:45.000000Z

**Updated at:** 2026-11-29T10:53:27.000000Z

## Catalog information

The following descriptions are catalog information. Listing approval does not mean the skill has been tested or is safe for every environment.

### Editor's note

Run from the indexed repository root. Use read-only commands first; mutating refresh/analyze is human-initiated unless explicitly delegated. Do not delete lock files or kill processes unless the user authorizes it.

### When to use it

- Recover a GitNexus index that is STALE or has a pending refresh marker
- Identify and deduplicate duplicate GitNexus MCP clients
- Check the status of GitNexus processes before initiating recovery
- Ensure index freshness after recovery

## Skill instructions

---
name: devxkit-gitnexus-recovery
description: Diagnose and recover GitNexus MCP and pending index refresh without auto-killing processes.
scope: global
devxkit_commands:
  - devxkit gitnexus mcp-status
  - devxkit gitnexus mcp-dedupe
  - devxkit gitnexus refresh-pending
  - devxkit gitnexus analyze
---

# devxkit gitnexus recovery

## When to use

- GitNexus index is STALE, post-commit refresh was skipped, or `.git/gitnexus-refresh-pending` exists
- Duplicate GitNexus MCP clients may be running (Cursor + other IDE)
- Agent needs read-only status before suggesting human recovery
- For MCP tool usage policy, consult the consumer project's GitNexus documentation

## Preconditions

- Run from the indexed repository root
- Prefer read-only commands first; mutating refresh/analyze is **human-initiated** unless user explicitly delegates

## Commands

```bash
devxkit gitnexus mcp-status
devxkit gitnexus mcp-dedupe
devxkit gitnexus refresh-pending
devxkit gitnexus analyze
```

Typical recovery sequence (human):

```bash
devxkit gitnexus mcp-status
# Several MCP clients may legitimately share the registry; CWD is not index ownership
devxkit gitnexus refresh-pending || devxkit gitnexus analyze
devxkit gitnexus status    # structured freshness cross-check
```

## Validation

- `mcp-status` lists zero or known-safe MCP processes before analyze
- After successful refresh: pending marker cleared, index FRESH in status output
- `devxkit gitnexus refresh-pending` exit 0 when recovery completes

## Common failures

- **BUSY** → an exact holder (lsof) or a writer targeting *this* repository was found; `refresh-pending` keeps the marker. Unrelated MCP servers and other indexes do not block
- **UNKNOWN** → inspection incomplete (lsof missing/failed, unverifiable writer); fail closed, inspect manually
- **STALE_LOCK** → a recovery sidecar (`lbug.lock`, `lbug.wal`, …) exists without a holder; quiesce clients and recover by hand. DevXKit never removes it
- **Several MCP clients** → `mcp-dedupe` reports only; it never suggests termination from CWD and agents **never auto-kill**
- **analyze blocked** → wait for lock release; do not delete `.gitnexus/` locks without explicit instruction
- **Node/runtime mismatch** → human runs install/update per `gitnexus/gitnexus-cli`

## Stop conditions

- **Agents:** use `devxkit gitnexus status` / `devxkit gitnexus mcp-status` read-only; do not auto-refresh on STALE
- Do **not** run `analyze` while this index is BUSY, UNKNOWN or STALE_LOCK
- Do **not** delete lock files or kill processes unless the user explicitly authorizes it
- Do **not** run raw `gitnexus analyze` / `npx gitnexus` when policy says `gnx-analyze-here`

## Related skills

- `gitnexus/gitnexus-cli`, `gitnexus/gitnexus-debugging`, `gitnexus/gitnexus-guide`

