GitGuide

browser extension · github · llm

i built gitguide because i wanted to contribute to more open source projects, but i kept running into the same problem. i’d find an interesting issue, spend twenty minutes reading discussions and jumping between files, and still not know where to start.

gitguide explains repositories, files, and issues directly inside github, then lets me ask follow-up questions about the codebase without opening another tab. every answer is grounded in the repository’s actual source code and cites the exact file and lines it used, pinned to a specific commit, so it’s explaining what’s really there instead of making educated guesses.

it’s built with react and typescript as a manifest v3 extension, with a small node.js and express backend that indexes repositories, retrieves relevant code, validates requests with zod, and streams responses from open-weight models on groq.

the first version was just an issue assistant. after i started using it myself, i kept adding the things i wished github already had: repository overviews, file explanations, good first issue discovery, and eventually a repository-aware chat that remembers the current conversation while staying grounded in the codebase.

Browser Extension Backend GitHub API LLM one small backend in the middle, everything grounded in repository context

one thing i didn’t expect was how much work it would take to make the extension feel like part of github. because github is a single-page application, normal page load events aren’t enough. the extension has to detect navigation changes instantly so it always knows which repository, file, or issue you’re looking at without needing a refresh. watching the dom for changes wasn’t reliable enough on its own, so a small script runs inside github’s own page and patches history.pushState, which tells the panel the moment the route changes. a dom observer is still there, but only to wait until the new page has actually finished rendering before gitguide reads it.

route changes (spa, no reload) patched history pushState, popstate, turbo:load panel updates same panel, new page

branch detection turned out to be another surprisingly annoying problem. github urls don’t always tell you whether something is part of a branch or just a nested file path. instead of relying only on the url, gitguide reads github’s page data when it’s available and falls back to the github api when it isn’t. on the server, whatever it ends up with, whether that’s a branch, a tag, or a sha, gets resolved to an exact commit, so an answer always says which version of the code it read.

github url ambiguous path page data available? yes read page data no call github api

the backend stays intentionally small. the extension only sends identifiers, like the repository, ref, file path, or issue number, and the server fetches the public content from github itself. it validates every request, retrieves only the repository context needed for the current question, streams responses back to the extension, and cancels work automatically if you navigate away. conversations stay scoped to the current repository, so follow-up questions never accidentally mix information from somewhere else.

extension sends identifiers only validate request retrieve context stream response cancel if abandoned github api + llm, grounded answer

retrieval was designed as a hybrid. gitguide can index each repository with both bm25 and local embeddings, then fuse the two rankings with reciprocal rank fusion before handing the top code chunks to the model. in production, though, it runs on bm25 alone. the local embedding model doesn’t fit in the 512 mb server it’s deployed on, so the hybrid path stays behind a flag, and keyword retrieval on its own turned out to be good enough to keep answers grounded.

query bm25 keyword search embeddings off in production rrf rank top code chunks llm

getting it ready for a 1.0 release meant auditing everything i’d built and fixing what i found, and the list was longer than i expected. the most important fix was privacy. earlier versions read file and issue text straight off the page and sent it to the server, even on private repositories. now gitguide only works on public repositories, and since the server fetches content itself, it refuses anything that isn’t public. the audit also caught quieter problems: a github rate limit showed up as “no issues found” instead of an error, a dropped stream looked like a finished answer, and a late response from the previous page could land on the new one. each of those now has its own error state, and requests from a page you’ve left get cancelled. the server also has a concurrency cap, a daily ai budget, size limits, and timeouts, so one huge repository can’t take it down.

the feature i probably use the most is still the chat. instead of reading dozens of files trying to understand how something works, i can ask follow-up questions, jump directly to the cited source, and keep exploring without ever leaving github.

i still use gitguide whenever i’m looking through a repository i haven’t seen before. most of the features weren’t planned from the beginning. they came from using the extension while contributing to open source and slowly adding everything i kept wishing github already had.