← All projects
Project record1 mention
Originally shared on Hacker News

Attentry

Attentry is a local static-analysis checker that hooks into Claude Code: on each prompt it points Claude to existing functions and routes to reuse, and after every edit it checks only the changed code, flagging issues like missing auth or owner checks, missing rate limits on login, hardcoded secrets, unhandled async errors, and duplicate or dead code, then sends Claude a short note to fix them. It uses tree-sitter for JS, TS and Python, runs entirely on the local machine, and is MIT licensed.

Last shared
01 / The problem

What it addresses

Claude Code edits repeatedly introduce duplicate helpers, dead code, and security gaps such as unauthenticated routes, hardcoded secrets, or missing login rate limits, and asking the AI to review its own code costs tokens while still missing things it wrote earlier in the same session.

02 / Source history

Shared over time

Each entry reflects what was shared on that date. Details may have changed since then.

  1. Attentry

    Attentry is a local static-analysis checker that hooks into Claude Code: on each prompt it points Claude to existing functions and routes to reuse, and after every edit it checks only the changed code, flagging issues like missing auth or owner checks, missing rate limits on login, hardcoded secrets, unhandled async errors, and duplicate or dead code, then sends Claude a short note to fix them. It uses tree-sitter for JS, TS and Python, runs entirely on the local machine, and is MIT licensed.

    Problem: Claude Code edits repeatedly introduce duplicate helpers, dead code, and security gaps such as unauthenticated routes, hardcoded secrets, or missing login rate limits, and asking the AI to review its own code costs tokens while still missing things it wrote earlier in the same session.

    Posted by @aarvsinghchauha · Original source ↗

    Story title · @aarvsinghchauha · · Source ↗

    Show HN: Attentry – a local checker that reviews each edit Claude Code makes

    Submitted URL · @aarvsinghchauha · · Source ↗

    https://github.com/Aarv-1o/Attentry

    Source text · @aarvsinghchauha · · Source ↗

    That's what Attentry does. Claude Code has hooks, so you can run your own script when you send a prompt, before an edit and after an edit.

    Source text · @aarvsinghchauha · · Source ↗

    When you send a prompt, Attentry tells Claude which functions and routes in your repo already match what you asked, so it reuses them. If Claude is about to write a function the repo already has, it tells Claude where that one is. And after every edit it checks only what changed.

    Source text · @aarvsinghchauha · · Source ↗

    If that edit added a problem, like no auth check, no owner check, no rate limit on login, a secret in the code, async errors not handled, or copied and dead code, Claude gets a short note and fixes it.

    Source text · @aarvsinghchauha · · Source ↗

    For the checking it uses tree-sitter to read JS, TS and Python, and keeps the repo in memory in a background process. So checking again after an edit takes around 0.1 sec on a 150 file repo.

    Source text · @aarvsinghchauha · · Source ↗

    It only works with Claude Code for now, and only JS, TS and Python. It's static analysis, so there will be false positives.

    Source text · @aarvsinghchauha · · Source ↗

    It runs on your machine, nothing goes out, and it's MIT. There's a VS Code extension (also on Open VSX) that sets it up in one click, or you can set up the hooks yourself from the README.

    Source text · @aarvsinghchauha · · Source ↗

    But when I opened the code later, I kept finding the same stuff. A helper written again because Claude never saw the one already there. Functions that nothing calls anymore. And sometimes a route where anyone can get in without login.

    Source text · @aarvsinghchauha · · Source ↗

    First I tried asking Claude to review its own code. It helped a little, but it costs tokens every time, and it still missed things it wrote earlier in the same session.

    Source text · @aarvsinghchauha · · Source ↗

    Site: https://attentry.js.org