What is lens?
lens is a Claude Code mod by PedroLaRosa that puts tsc, linter and secret-scan diagnostics in the result of every Edit and Write, so Claude fixes what it broke in the same turn. It is listed under Security and has 1 GitHub stars.
| Type | Claude code mod |
|---|---|
| Author | PedroLaRosa |
| Repository | PedroLaRosa/claude-code |
| Popularity | 1 GitHub stars |
| Category | Security |
| Security | Low risk (80/100) |
| Rank | #2,027 of 5,272 Claude Code mods; #235 in Security |
| Last commit | 2026-10-13 |
| Hooks | 6 events |
| Sees | every tool call, mcp__lens__lens_diagnostic_mark calls, mcp__lens__lens_diagnostics calls |
| Draws on | SessionMode, AbovePrompt |
Is lens safe to install?
lens scores 80/100 on the MCPMods security check: Low risk. Things to review: starts processes outside the sandbox. It passed 5 of 8 checks.
Mod footprints come from claude plugin validate, which lists every event a mod hooks and every API call it makes without running it.
| Check | Result |
|---|---|
| No network access | Pass |
| Starts processes outside the sandbox | Review |
| Writes no files or config | Pass |
| Doesn't read environment variables | Pass |
| Only sees the events it hooks | Pass |
| Drives Claude (model calls, prompts) | Note |
| Passes claude plugin validate | Pass |
| No license detected | Note |
API calls in its code
| Call | What it means |
|---|---|
$.clock.after | |
$.command.register | |
$.fs.exists | reads files |
$.fs.list | reads files |
$.fs.read | reads files |
$.fs.stat | reads files |
$.process.run | runs processes |
$.process.spawn | |
$.prompt.submit | drives Claude |
$.session.root | |
$.store.delete | keeps its own state |
$.store.get | keeps its own state |
$.store.set | keeps its own state |
$.tool.register | drives Claude |
$.ui.invalidate | draws interface |
$.ui.log | draws interface |
$.ui.resolve | draws interface |
$.ui.toast | draws interface |
How do I install lens?
- Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
claude --version
- Read its footprint. This lists every event it hooks and every API call it makes, without running it.
git clone https://github.com/PedroLaRosa/claude-code claude plugin validate ./claude-code/mods/lens
- Install it. Run this in your terminal, then /reload-plugins in an open session.
claude plugin marketplace add PedroLaRosa/claude-code && claude plugin install lens@pedro-la-rosa-claude-code
Or ask Claude to set it up
Paste this into Claude Code and it installs lens for you:
Install the "lens" Claude Code mod from https://github.com/PedroLaRosa/claude-code/tree/main/mods/lens. Run claude plugin validate on it first and show me what it can access before you enable it.
More from PedroLaRosa/claude-code
This repository has 5 Claude Code mods on MCPMods.
- dep-bouncer: Supply-chain gate: vets npm/pnpm/yarn/bun installs against the registry before they run (Low risk)
- lazygit-popup: alt+g opens lazygit in a tmux popup; ESC (or q) quits lazygit and closes it (Review before installing)
- model-effort-switcher: Shows the model and effort under the prompt, cycled with alt+up/down (model), alt+left/right (effort) and alt+. (ultraco (Review before installing)
- token-weather-usage: Demo: colored pills above the prompt: context tokens with weather, 5h/7d limits vs time elapsed, prompt cache time left, (Low risk)