Directory · Hooks
LSP Enforcement Kit
A set of Claude Code hooks that block Grep, Glob, and shell grep on code symbols and steer Claude toward LSP MCP navigation tools.
★ 346 stars · last updated 2026-11-25 · Free, open source · View on GitHub
Best for
- Cutting token usage from Grep and full-file Reads during code navigation
- Teams already running cclsp or Serena LSP MCP servers
- Enforcing LSP-first behavior that a CLAUDE.md rule alone does not guarantee
- TypeScript projects where symbol lookups dominate navigation
Install
git clone https://github.com/nesaminua/claude-code-lsp-enforcement-kit.git
cd claude-code-lsp-enforcement-kit
bash install.sh
# Windows: pwsh ./install.ps1
Our take
Ships six PreToolUse/SessionStart hooks plus a PostToolUse tracker, including a progressive Read gate that requires LSP warmup and navigation calls before unlimited file reads. Requires an LSP MCP server (cclsp or Serena) to be useful, and the README's token savings figures come from the author's own week of use on two TypeScript projects. The blocking is opinionated and may interrupt legitimate searches, though it allows lowercase concepts, env vars, and non-code paths.
Similar hooks
- Claude Code Ultimate Guide: Large open guide to Claude Code covering agent workflows, hooks, skills, MCP, security, and team adoption, with reusable templates.
- dcg (Destructive Command Guard): Rust pre-execution hook that blocks destructive shell, git, filesystem, database, and cloud commands run by AI coding agents.
- Claude Code Showcase: Example Claude Code project config with hooks, skills, agents, slash commands, MCP setup, and GitHub Actions workflows to copy from.
- Claude Code Hooks Mastery: Reference project implementing all 13 Claude Code hook events as UV Python scripts, plus sub-agents, status lines, and output styles.
- Continuous Claude v3: Hooks, skills, and agents that keep Claude Code context across sessions via YAML handoffs, ledgers, and a PostgreSQL memory store.
- Build with Claude: Plugin marketplace and discovery hub of agents, commands, hooks, and skills for Claude Code users extending their workflows.