# Diagnose Symlink Shebang Persistence

> Fix persistent shebang issues in symlinked CLI entry points that revert after git operations

- Skill: `vamseeachanta/diagnose-symlink-shebang-persistence` (Agent Skill)
- Install (CLI): `npx skillmds@latest add vamseeachanta/diagnose-symlink-shebang-persistence`
- Raw SKILL.md: https://api.skillmd.com/api/skills/vamseeachanta/diagnose-symlink-shebang-persistence/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: vamseeachanta (https://skillmd.com/u/vamseeachanta)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/vamseeachanta/diagnose-symlink-shebang-persistence

---


# Diagnose Symlink Shebang Persistence Issues

When a CLI tool's shebang keeps reverting after updates, check if the symlink points to a repo file vs. a venv entry point. If `~/.local/bin/tool` → `repo/tool` (symlink), edits revert on `git pull`. Solution: repoint the symlink to the venv entry point instead (`~/.local/bin/tool` → `~/.venv/bin/tool`). This bypasses repo resets while preserving the correct shebang and venv context. Verify with `ls -l` and `file` commands.
