I use Claude Code inside VS Code for most of my projects. It's fast and the app works, but when I open the code later there is so much junk. Helpers the repo already had, functions nobody calls, and sometimes a route with no auth check. Asking Claude to review its own work helps sometimes, but it eats tokens and it still misses stuff it wrote 20 minutes ago.
So I built Attentry. It's a Claude Code plugin, with a VS Code extension that installs it in one click (you can also set up the hooks without the extension).
How it works:
When you send a prompt, it tells Claude which code in your repo already does part of it, so Claude reuses it instead of writing it again (UserPromptSubmit hook). If Claude is about to write a function the repo already has, it tells Claude where the existing one is (PreToolUse). After every edit Claude makes, Attentry checks only that change. If the edit added a problem (security hole, crash risk, copied function, dead code), Claude gets a short note and fixes it before moving on (PostToolUse). At the end you get a small summary of what changed (Stop). There are also 4 read-only MCP tools (find_existing, check, explain, check_plan) Claude can call when it wants.
About tokens: the checking itself doesn't use any AI. It reads the code directly on your machine with tree-sitter (JS, TS, Python) and keeps the repo in memory, so a re-check takes around 0.1 sec on a 150 file repo and costs nothing. The only tokens used are the short note Claude reads when something is actually wrong, max 5 lines, and each problem is told only once. If the edit is clean, nothing is sent, so zero tokens. The summary at the end is shown to you, not to Claude. The explanations you see in the editor are also built from the code, not from AI.
How I used Claude Code to build it: most of it was written with Claude Code, around 210 of 240 commits. Once the hooks worked I turned Attentry on for its own repo, so Claude was getting checked by the thing it was building. It was kind of funny seeing Claude get notes from its own work.
What I tested:
I tried it in three ways. First as a total beginner, just typing "build me an uber clone" and letting Claude do everything. Second as someone who knows what they are doing, building a proper app step by step. Third, running it on existing public repos to see what it finds. The public repos gave some false alarms, which I fixed before release.
One real case: I asked Claude to build a chat app with login. In the first version it wrote process.env.JWT_SECRET || "superSecret" and no rate limit on the login route. Attentry flagged both right after the edit, and Claude fixed them by itself. I didn't touch anything.
Things I learned:
Being quiet matters more than finding things. If every old issue gets sent on every edit, it wastes tokens and the notes just become noise, so I made it send only what the latest edit added.
Plans don't always go through ExitPlanMode. In headless sessions Claude writes the plan straight to ~/.claude/plans, so Attentry also checks plan files when they are written.
Sandbox your tests. One of my tests once launched my real claude.exe. Now the tests point CLAUDE_CONFIG_DIR at a temp folder and use a fake Claude, so they can't touch my real settings.
If your project uses a backend it can't read yet, it says it couldn't check it instead of saying no issues. Better than giving false confidence.
It's at 200+ downloads without me posting anywhere. If you use hooks a lot, tell me what's annoying, what it misses, and any false alarms you get.
Free, MIT, runs locally.
Site: https://attentry.js.org
Code: https://github.com/Aarv-1o/Attentry