/php-lsp-proxy:php-lsp-workspacefrom php-lsp-proxy
PHP LSP(intelephense, php-lsp-proxy 경유)의 워크스페이스를 확인·전환한다. git worktree 에서 PHP 작업을 시작할 때, 정의 점프/심볼이 다른 체크아웃 경로로 해석될 때, 또는 LSP 인덱싱이 안 도는 것 같을 때 사용.
Ships in php-lsp-proxy. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
v0.3+ 는 멀티플렉서다 — LSP 도구 호출의 filePath 가 곧 워크스페이스 선택이다.
요청 uri 의 git toplevel(마커 존재 시)별로 intelephense 인스턴스를 lazy spawn 해 라우팅하므로,
원하는 트리(워크트리 포함)의 파일 경로로 LSP 도구를 호출하기만 하면 그 트리가 자동 인덱싱·응답한다
— 설정 수정/서버 kill/reload 전부 불필요. workspace/symbol 처럼 uri 없는 질의는 살아있는 전
인스턴스에 fan-out 후 병합(새 트리를 fan-out 에 넣으려면 그 트리 파일로 documentSymbol 등을 한 번
호출해 인스턴스를 먼저 띄운다). 하네스가 didOpen 을 생략해도 프록시가 디스크에서 합성한다.
동시 인스턴스는 maxServers(기본 3, default 제외 LRU 종료)로 제한.
default 인스턴스(uri 없는 질의 + 마커 없는 파일 담당)의 워크스페이스 우선순위:
--workspace <path> / --workspace=<path> / 첫 positional 경로. plugin.json 의
lspServers.intelephense.args 에 추가해 워크스페이스를 고정(pin) 할 때 사용
(예: ["<script>", "--workspace=/abs/path"]). plugin.json 수정이므로 반영엔 /reload-plugins 필요 —
정적 pin 용도이고, 수시 전환은 아래 config 경로가 여전히 낫다.PHP_LSP_WORKSPACEgit rev-parse --show-toplevel — 단 toplevel 에 마커
(composer.json/index.php/html 중 하나)가 있을 때만. PHP 레포/워크트리에서 세션을 열면 자동으로 그 트리.~/.config/php-lsp-proxy/config.json 의 defaultWorkspacels -t ~/.config/php-lsp-proxy/logs/ | head -1 → 그 파일의 workspace: / initialize 재작성 라인.보통은 절차가 없다 — 원하는 트리의 파일 경로로 LSP 도구를 호출하면 끝(멀티플렉서가 라우팅). default 인스턴스의 워크스페이스나 config 를 바꿔야 할 때만:
~/.config/php-lsp-proxy/config.json 수정 (plugin.json 은 건드리지 않는다).ps aux | grep 'php-lsp-proxy\.js' | grep -v grep | awk '{print $2}' | xargs kill.
intelephense 는 프록시가 함께 정리한다(exit 0). ⚠ intelephense 를 직접 kill 하지 말 것 — 프록시가
비정상 종료(exit≠0)로 기록되면 하네스가 respawn 을 멈추고(크래시 보호, 실측) /reload-plugins 로만 복구된다./reload-plugins.⚠ 재시작 관련 하네스 실측 3종: ① 재시작 후 클라이언트가 세션의 과거 요청을 전부 리플레이, ② 간혹 신규 요청을 "server is running" 으로 거부(잠김 — reload 로만 해제), ③ 서버가 exit≠0 이면 respawn 영구 중단. 평상시엔 재시작 없이 filePath 라우팅만으로 쓰는 것이 정답이고, 재시작은 캐시 수술 등 꼭 필요할 때만 + 반드시 reload 동반.
intelephense 는 종료 시 워크스페이스 상태를 다시 쓴다. 살아있는 인스턴스 밑에서
~/.cache/intelephense/<hash> 를 삭제하면 죽어가는 인스턴스가 캐시를 되살려 재오염시킨다.
반드시: ① 프록시 kill → ② 프로세스 소멸 확인(ps) → ③ 캐시 삭제 → ④ /reload-plugins 순서로.
~/.config/php-lsp-proxy/logs/proxy-*.log (기본 meta — 메서드 흐름 + initialize 전문 + 서버 logMessage). 전 페이로드는 config "log": "full" 후 서버 재시작.~/.cache/intelephense/<hash> 해당 디렉토리 삭제 + 서버 재시작으로 완치. 건강한 첫 인덱싱은 수천 파일이 queue 에 잡힌다(예: imweb 8,133).${user_config.*}, ${CLAUDE_PLUGIN_DATA}) 미동작 — 그래서 launcher/config 경로는 전부 실경로.storagePath(~/.cache/intelephense)는 워크스페이스별 캐시 키 분리 — 여러 트리 공유 안전.intelephense.files.maxSize 조정.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub rockheung/plugings --plugin php-lsp-proxy