nesaminua

Hooks that force Claude Code to use LSP instead of Grep for code navigation. Saves ~80% tokens

48
2
100% credibility
Found Apr 11, 2026 at 48 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
JavaScript
AI Summary

A kit of smart guides for an AI coding assistant to prefer precise code navigation over scanning files, dramatically cutting usage costs.

How It Works

1
😩 Struggling with slow code searches

Your AI helper wastes time scanning entire files to find functions or types, burning through lots of usage.

2
💡 Discover the efficiency booster

You find a simple kit that trains your AI to jump directly to exact spots in code like a pro developer.

3
🚀 Set it up with one click

Run a quick setup script that adds smart guides to your AI's toolbox without changing your workflow.

4
🔄 Restart your AI session

Refresh your coding session, and the new guides kick in automatically.

5
🛑 Smart blocks guide better choices

When your AI tries wasteful searches, it gets nudged to use precise navigation tools instead.

6
âš¡ Navigate code precisely

Now your AI finds definitions, uses, and types in seconds with tiny usage.

🎉 Code faster, save massively

Enjoy 70-90% less waste per search, smoother sessions, and way more productive coding.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 48 to 48 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is claude-code-lsp-enforcement-kit?

This JavaScript toolkit installs hooks into Claude Code—Anthropic's AI coding agent—to block wasteful Grep, Glob, and blind Read calls on code symbols, forcing precise LSP navigation instead. It slashes token usage by 73-91% per operation, like turning "Where is handleSubmit?" from 6k+ tokens of noisy grep results into 200 tokens via find_definition. Run bash install.sh once for idempotent setup across PreToolUse, PostToolUse, and SessionStart events, with auto-detection for cclsp or Serena LSP servers.

Why is it gaining traction?

Unlike vague "use LSP" rules that stick only 60% of the time, these git hooks github-style enforcers deliver 100% compliance through progressive gates: warmup first, two free reads, then mandatory nav calls before surgical mode unlocks. Real-world logs show 235k tokens saved weekly on TypeScript projects, plus v2 closes Glob and stale-session bypasses. Developers love the lsp-status.sh checker and provider-aware block messages that adapt to your MCP setup.

Who should use this?

Claude Code users on TypeScript/JavaScript monorepos burning tokens on exploratory greps during refactors or bug hunts. Multi-language teams with Python/Go/Rust via cclsp or Serena, especially workflow-heavy setups like Next.js actions or Supabase migrations where subagents delegate without LSP access.

Verdict

Grab it if you're deep in Claude Code—solid docs, MIT license, and proven savings outweigh the 48 stars and 1.0% credibility score from its niche focus. Early but battle-tested; test on a side project before production hooks github copilot rivals.

(198 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.