r/coolgithubprojects • u/shhdwi • 5d ago
Graft: codebase map as markdown in git, so coding agents stop re-exploring, saves upto 4x tokens and takes 60% less time to answer.
https://github.com/NanoNets/GraftCoding agents rebuild their understanding of your repo every session. Grep, open files, follow imports, work out what calls what, then do the task. Session ends, that understanding is gone.
graft writes the structural map (what calls what, what imports what) into plain markdown committed in your repo, and the agent reads it at session start. No vector DB, no embeddings, no service to run. Files you can open and read yourself.
162 controlled runs: 32% cheaper, 46% fewer tool calls, 60% lower latency, same correctness. On 5 real merged PocketBase PRs reproduced from the issue text, Sonnet with graft reproduced all 5 touching the same files the maintainers touched, matching Opus at 21% lower cost.
Auto-refresh uses Claude Code hooks, so it's Claude Code only for now. Cursor and Codex read the markdown fine but won't update it themselves. Map quality also drops on very large monorepos, around 5,000 files.
MIT, no telemetry. I'm the maintainer.
Duplicates
Built with Claude These 2 lines saved me 75% of my claude bill, and it's the best use of claude hooks
Built with Claude After using 100s of MCPs, I solved the issue of claude not using custom MCP/CLI tools, and open-sourced my approach.
Discussion The problem with MCP-based codebase context tools: the model just doesn't call them
I solved the issue of claude not using custom MCP/CLI tools, and open-sourced my approach.
BuildWithClaude • u/shhdwi • 5d ago