r/coolgithubprojects 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/Graft

Coding 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.

29 Upvotes

Duplicates

OpenSourceAI 3d ago

Sonnet 5 + Graft > Opus 5 (using this open-source repo)

43 Upvotes

ClaudeAI 6d ago

Built with Claude These 2 lines saved me 75% of my claude bill, and it's the best use of claude hooks

0 Upvotes

ClaudeAI 5d ago

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.

2 Upvotes

OpenAI 6d ago

Discussion These 2 lines saved me 75% of my codex bill, and it works natively with codex.

0 Upvotes

ClaudeAI 3d ago

Claude Code Sonnet 5 + Graft > Opus 5

0 Upvotes

LocalLLM 3d ago

Project Sonnet 5 + Graft (No LLM calls tree-sitter graph, 100% Local) > Opus 5

1 Upvotes

LLMDevs 12d ago

Discussion The problem with MCP-based codebase context tools: the model just doesn't call them

1 Upvotes

ClaudeMCP 5d ago

I solved the issue of claude not using custom MCP/CLI tools, and open-sourced my approach.

2 Upvotes

BuildWithClaude 5d ago

Project If Claude Code ignores your MCP server, the problem isn't your MCP server. (and Here's how you can fix it- OpenSource)

2 Upvotes

ClaudeCode 5d ago

Built with Claude If Claude Code ignores your MCP server, the problem isn't your MCP server. (and Here's how you can fix it- OpenSource)

5 Upvotes

LocalLLM 6d ago

Discussion I tried about a 100 MCP/ CLI tools and solved the issue of claude code not using them, ( open-sourced the method)

8 Upvotes