/lsp-hooks:lsp-clear-cachefrom lsp-hooks
Full reset: stop the lsp-hooks daemon and its child processes, delete the log file and SQLite cache, then restart fresh.
Ships in lsp-hooks. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Follow these steps exactly:
cd "${CLAUDE_PLUGIN_ROOT}" && python3 -c "
from lsp_hooks_paths import *
print(f'PID_PATH={PID_PATH}')
print(f'LOG_PATH={LOG_PATH}')
print(f'SOCKET_PATH={SOCKET_PATH}')
print(f'VERSION_PATH={VERSION_PATH}')
print(f'CACHE_DB_PATH={CACHE_DB_PATH}')
"
Save all printed paths for use in subsequent steps.
Read the PID file. If it exists, kill child processes first (e.g. lsp-mcp-server node child), then the daemon itself:
PID_FILE="<PID_PATH from step 1>"
if [ -f "$PID_FILE" ]; then
OLD_PID=$(cat "$PID_FILE")
pkill -P "$OLD_PID" 2>/dev/null || true
sleep 0.2
kill "$OLD_PID" 2>/dev/null || true
sleep 0.3
fi
rm -f "<PID_PATH>" "<VERSION_PATH>" "<SOCKET_PATH>"
Record the size before deleting for the report:
LOG_FILE="<LOG_PATH from step 1>"
if [ -f "$LOG_FILE" ]; then
LOG_SIZE=$(du -h "$LOG_FILE" | cut -f1)
rm -f "$LOG_FILE"
echo "Deleted log file ($LOG_SIZE)"
else
echo "No log file found"
fi
CACHE_FILE="<CACHE_DB_PATH from step 1>"
if [ -f "$CACHE_FILE" ]; then
CACHE_SIZE=$(du -h "$CACHE_FILE" | cut -f1)
rm -f "$CACHE_FILE"
echo "Deleted cache DB ($CACHE_SIZE)"
else
echo "No cache DB found"
fi
cd "${CLAUDE_PLUGIN_ROOT}" && python3 lsp_hooks_daemon.py &
disown
sleep 0.5
PID_FILE="<PID_PATH from step 1>"
if [ -f "$PID_FILE" ]; then
echo "Daemon restarted successfully (PID $(cat "$PID_FILE"))"
else
echo "WARNING: PID file did not reappear — daemon may have failed to start."
fi
Report to the user what was cleaned up (log size, cache size) and the new daemon PID. Note that the first LSP query after a cache clear may be slower (cold cache).
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
2 skills in this plugin
npx claudepluginhub danielselnick/claude-hooks-lsp --plugin lsp-hooks