Who it is forA developer or team lead maintaining several related repos who suspects the same logic was copied into multiple places.
The problemCopied implementations drift apart over time, and no single project directory shows the duplicates.
The outcomeA report of what was implemented several times and which projects are forks, plus a canonical file you can declare.
What you need first
- Claude Code with session transcripts in ~/.claude/projects/
- Python 3.10+ with FTS5 in the bundled sqlite3 (on macOS, install from python.org or run brew install python)
- git and bash to clone and run install.sh
- Terminal access to run the CLI and restart Claude Code
Steps
git clone https://github.com/nameforjt-afk/session-knowledge.gitcd session-knowledgethenbash install.shpython3 -m sessionmcp.cli indexpython3 -m sessionmcp.cli code dup- Create ~/.claude/knowledge/canonical.json to claim the file that should be the canonical implementation. (inferred, check the README)
Prompt for your agent
Using the session-knowledge repo, call list_duplication and review the output for <capability> across projects. Expect a list of repeated implementations and any projects marked as forks. Verify each flagged duplicate by opening the file before proposing a canonical version.
Caveat. Duplication is only reported for the Python, JS, and TS files inside the auto-derived or manually set project directories, so duplicates in other directories or languages are invisible.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for nameforjt-afk/session-knowledge and "Spot logic implemented more than once across projects"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer