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.

Updated 2026-10-13

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.

TypeClaude code mod
AuthorPedroLaRosa
RepositoryPedroLaRosa/claude-code
Popularity1 GitHub stars
CategorySecurity
SecurityLow risk (80/100)
Rank#2,027 of 5,272 Claude Code mods; #235 in Security
Last commit2026-10-13
Hooks6 events
Seesevery tool call, mcp__lens__lens_diagnostic_mark calls, mcp__lens__lens_diagnostics calls
Draws onSessionMode, 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.

CheckResult
No network accessPass
Starts processes outside the sandboxReview
Writes no files or configPass
Doesn't read environment variablesPass
Only sees the events it hooksPass
Drives Claude (model calls, prompts)Note
Passes claude plugin validatePass
No license detectedNote

API calls in its code

CallWhat it means
$.clock.after
$.command.register
$.fs.existsreads files
$.fs.listreads files
$.fs.readreads files
$.fs.statreads files
$.process.runruns processes
$.process.spawn
$.prompt.submitdrives Claude
$.session.root
$.store.deletekeeps its own state
$.store.getkeeps its own state
$.store.setkeeps its own state
$.tool.registerdrives Claude
$.ui.invalidatedraws interface
$.ui.logdraws interface
$.ui.resolvedraws interface
$.ui.toastdraws interface

How do I install lens?

  1. Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
    claude --version
  2. 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
  3. 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)