Per-feature codebase documentation with RAM-cached context injection.
npx claudepluginhub 0serenvale/project-lensPer-feature codebase documentation. Uses a cheap OpenRouter LLM to scan your project and generate structured feature docs. Injects relevant context before every file edit so Claude never skims unknown code.
A Claude Code plugin that eliminates AI context loss on large codebases.
Uses a free OpenRouter LLM to scan your project once and generate per-feature documentation stored in RAM (/dev/shm). Before every file edit, the relevant feature doc + file content is automatically injected into Claude's context — no skimming, no assumptions, no wrong guesses about dependencies.
Claude skims large files and unfamiliar code. It pattern-matches instead of reading, misses dependencies, and makes wrong assumptions that cause refactoring cycles and wasted tokens.
You ask Claude to edit a file
↓
PreToolUse hook fires automatically
↓
Feature doc + file content injected into context
↓
Claude receives it — nothing to skip, it's already there
↓
Claude acts on real understanding, not guesses
Feature docs are generated once by a free OpenRouter LLM — not Claude tokens.
/dev/shm)curl — installed on most systemsjq — auto-installed by the plugin if missing (requires apt-get, brew, or yum)Step 1 — Add the marketplace:
claude plugin marketplace add 0Serenvale/project-lens
Step 2 — Install the plugin:
claude plugin install project-lens@project-lens
Step 3 — Create config file:
cp ~/.claude/plugins/cache/project-lens/project-lens/*/project-lens.env.example ~/.claude/project-lens.env
Step 4 — Add your OpenRouter key and model:
nano ~/.claude/project-lens.env
OPENROUTER_API_KEY=your-key-here
OPENROUTER_MODEL=meta-llama/llama-3.3-70b-instruct:free
Get a free key at openrouter.ai/keys.
Open your project in Claude Code, then:
/lens:init
This scans your codebase, generates .lens/features/<feature>.md for each detected feature, creates a project overview, and adds .lens/ to .gitignore automatically.
For large projects (>80 files), it scans entry points and key directories first. Run /lens:scan <file> on specific files for deeper docs.
| Command | What it does |
|---|---|
/lens:init | First-time full project scan |
/lens:search <topic> | Load feature context before starting any task |
/lens:scan <file> | Rescan a specific file after changes |
/lens:update | Rescan all files changed since last update |
Start task → /lens:search <feature> load context first
Make changes → hook auto-injects before every edit
Code review → /review
Commit → hook auto-triggers rescan on changed files
End session → /lens:update keep docs current
Session starts → session-start.sh copies .lens/ → /dev/shm/project-lens/<hash>/
During session → all reads from RAM (~0.01ms vs ~5ms disk)
Session ends → session-end.sh syncs RAM → disk, clears RAM slot
pre-edit.sh fires → finds feature doc in RAM → injects into Claude context
Files ≤200 lines → full content injected
Files >200 lines → first+last 80 lines + prompt to run /lens:scan
Edit ~/.claude/project-lens.env — takes effect on the next script call, no restart needed:
nano ~/.claude/project-lens.env
# Change OPENROUTER_MODEL=google/gemma-3-27b-it:free
meta-llama/llama-3.3-70b-instruct:freegoogle/gemma-3-27b-it:freeqwen/qwen-2.5-72b-instruct:freemistralai/mistral-7b-instruct:freeFree models have daily request limits. When the limit is hit:
/lens:init resumes from where it left off (skips completed files)Using free models: $0 for scanning.
Using deepseek/deepseek-chat: ~$0.0001 per file. A 100-file project costs ~$0.01.
No description available.
Production-ready workflow orchestration with 84 marketplace plugins, 192 local specialized agents, and 156 local skills - optimized for granular installation and minimal token usage
Directory of popular Claude Code extensions including development tools, productivity plugins, and MCP integrations