Skip to content

Duplicate guard

Stop finding duplicates in review

Before Claude writes a function or class whose name is already exported elsewhere in your project, FlowKy pauses that write once and shows where the existing one is. It asks once, it never blocks. It checks Claude’s Write and Edit (not files changed by a shell command or a notebook), once per file and name in a session.

Get FlowKy free

No card · Your agent, your plan

PreToolUse hook · Claude’s Write and Edit

You know this one

The third formatDate()

Your agent cannot see the 400 functions already in the repo. So it writes formatDate() again, in a third file, subtly different. Either you catch it in review, or nobody does — and the two versions drift apart quietly.

How it works

  1. The index is built from your code

    Your project’s top-level exported functions and classes of TypeScript, JavaScript, Python, Go and Rust, indexed on your machine in an ignored folder. Nothing is uploaded.

  2. Claude’s writes are checked before they land

    A hook runs before each Write or Edit by Claude. A new top-level function or class whose name is already exported from another file of the same language pauses that write once, before it lands, so Claude sees what already exists. Files changed by a shell command or a notebook edit are not checked.

  3. The agent gets the address, not a lecture

    Claude receives the existing definition’s file, line and first line, and can reuse or extend it. If the new one was intended, the same write goes through when it is sent again, and that name is not paused again in that file during the session.

Fair questions

Does this slow the agent down?
The check on each write is a lookup in a local index, not a scan of the codebase. The index is brought up to date at each session start, from file sizes and times, within a time budget of a few seconds.
What if the near-duplicate is intentional?
It asks once, and never blocks: Claude is told what exists, and the same write passes when it is sent again. You can also set it to a note that never pauses, or list names it should leave alone.
Get FlowKy free

No card · Your agent, your plan

Also in FlowKy for Claude Code