Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Hooks that force Claude Code to use LSP instead of Grep for code navigation. Saves ~80% tokens
| Date | Stars |
|---|---|
| 2026-07-31 | 323 |
| 2026-08-05 | 325 |
| 2026-08-06 | 325 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
<h1 align="center">LSP Enforcement Kit</h1>
<p align="center">
<strong>Physical enforcement of LSP-first navigation in Claude Code.</strong>
<br>
Stop burning tokens on Grep. Make Claude navigate code like an IDE — 100% of the time.
</p>
<p align="center">
<a href="https://github.com/nesaminua/claude-code-lsp-enforcement-kit/releases"><img src="https://img.shields.io/github/v/release/nesaminua/claude-code-lsp-enforcement-kit?style=for-the-badge&color=6366f1" alt="Release"></a>
<a href="LICENSE"><img src="https://img.shields.io/github/license/nesaminua/claude-code-lsp-enforcement-kit?style=for-the-badge&color=10b981" alt="License"></a>
<a href="https://github.com/nesaminua/claude-code-lsp-enforcement-kit/stargazers"><img src="https://img.shields.io/github/stars/nesaminua/claude-code-lsp-enforcement-kit?style=for-the-badge&color=f59e0b" alt="Stars"></a>
<img src="https://img.shields.io/badge/Claude%20Code-compatible-8b5cf6?style=for-the-badge" alt="Claude Code compatible">
</p>
<p align="center">
<a href="#-quick-start">Quick Start</a> •
<a href="#-the-problem">Why</a> •
<a href="#-token-savings-grep-vs-lsp-per-operation">Savings</a> •
<a href="#-architecture-6-hooks--1-tracker">Architecture</a> •
<a href="#-how-each-hook-works">Hooks</a> •
<a href="CHANGELOG.md">Changelog</a>
</p>
<p align="center">
<img src="assets/token-savings.png" alt="LSP vs Grep token savings — 73% per week" width="720">
</p>
---
## In Action
When Claude tries to `Grep` for a code symbol, the hook blocks with a copy-pasteable LSP command:
```
⛔ LSP-FIRST BLOCK: Pattern contains code symbol(s) — use LSP instead
Symbols: handleSubmit, UserService
LSP tools:
handleSubmit:
mcp__cclsp__find_references("handleSubmit") (cclsp)
UserService:
mcp__cclsp__find_workspace_symbols("UserService") (cclsp)
```
When Claude tries to `Read` a code file without warming up LSP, the progressive gate blocks:
```
🛡️ LSP-FIRST READ GATE — Gate 1: warmup required
Call one of these first:
mcp__cclsp__get_diagnostics("src/page.tsx") (cclsp)
CONCRETE CALL FOR THIS FILE (works in any project):
mcp__cclsp__get_diagnostics("src/page.tsx")
After warmup: 2 free Reads, then need LSP navigation.
```
No generic advice. Every block message is parametrized by the actual file Claude tried to touch.
---
## ⚡ Quick Start
```bash
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
```
Restart Claude Code. Done. The installer is idempotent — safe to re-run on upgrades.
Verify:
```bash
bash scripts/lsp-status.sh
```
---
## 🎯 The Problem
Claude Code defaults to **Grep + Read** for code navigation. This works, but it's wasteful:
```
"Where is handleSubmit defined?"
Grep approach:
Grep("handleSubmit") → 23 matches, ~1500 tokens of output
Read file1.tsx (wrong) → 2500 tokens
Read file2.tsx (still wrong) → 2500 tokens
Read file3.tsx (found it) → 2500 tokens
─────────────────────────────────────
Total: ~9,000 tokens, 4 tool calls
LSP approach:
find_definition("handleSubmit") → form-actions.ts:42, ~80 tokens
Read form-actions.ts:35-55 → ~150 tokens
─────────────────────────────────────
Total: ~230 tokens, 2 tool calls
```
**~40x fewer tokens. Same answer.**
A rule in CLAUDE.md saying "use LSP" helps ~60% of the time. Hooks make it 100%.
## 💰 Token Savings: Grep vs LSP Per Operation
| Task | Grep approach | LSP approach | Saved |
|------|--------------|--------------|-------|
| Find definition of `handleSubmit` | Grep → 23 matches (~1500 tok) + 2 wrong Reads (~5000 tok) = **~6500 tok** | `find_definition` → file:line (~80 tok) + 1 targeted Read (~500 tok) = **~580 tok** | **91%** |
| Find all usages of `UserService` | Grep → 15 matches (~1200 tok), scan results (~300 tok) = **~1500 tok** | `find_references` → 8 file:line pairs (~150 tok) = **~150 tok** | **90%** |
| ChecExcerpt of 25,877 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:33284fcc76478426, llm:Repository description: 'Hooks that force Claude Code to use LSP instead of Grep for code navigation. Saves ~80% tokens'; topics include claude, claude-ai, claude-code, claude-hook, claude-hooks
matched fp:33284fcc76478426, llm:Repository description: 'Hooks that force Claude Code to use LSP instead of Grep for code navigation. Saves ~80% tokens'; topics include claude, claude-ai, claude-code, claude-hook, claude-hooks
matched fp:33284fcc76478426, llm:Repository description: 'Hooks that force Claude Code to use LSP instead of Grep for code navigation. Saves ~80% tokens'; topics include claude, claude-ai, claude-code, claude-hook, claude-hooks