Quickstart, TL;DR

refined-github-with-ai-pr

  • Learn about and add git-ai to your tooling, (git cli and editor extensions)
  • Build, install and authenticate refined-github-ai-pr
  • Push and pull request some Ai generated code via git to Github
  • Navigate to your PR in Github https://github.com/<owner>/<repo>/pull/<PR ID>/changes
  • Bask in the glory of ai annotations (scroll to the end ↓ for example screenshots)

Identifying AI Contributions

The Rise of Low‑Friction AI Contributions

With the proliferation of effortless code‑generating tools like Claude Code, Codex, and Cursor, slop‑slung contributions are being doled out as outright spam in hopes of getting a name tacked onto popular open‑source projects. Most are well‑intentioned — it’s just that this workflow is entirely new, and the tools and norms haven’t been established yet. Some open‑source projects have publicly banned them (see: zig, tldr, ghostty), going so far as to vet contributors into a select trusted group.

When AI‑Generated Code Can Be Appropriate

Oftentimes, depending on the preference of the team and project, less consequential and isolated code could warrant a 100% AI contribution. Non‑user‑facing tooling, a private beta feature, or a proof‑of‑concept immediately come to mind. The ability to retroactively see which parts of the codebase were AI contributions, especially in these use cases, could be very valuable. What was tabbed in by Cursor at 3am six months ago could be a part of today’s refactor.

Percentages, Policies, and Maintainer Trust

Projects like Zig may never allow ai contributions, and I am not here to argue that they should change this stance. But in other cases, where the reaction is a heavy‑handed outright refusal, maintainers and developers could have a change of heart if they could codify an allowable percentage done by AI in each pull request. Even without a hard‑and‑fast rule, a percentage could serve as a sort of gut check — an overall score as part of a bigger picture of quality in a PR.

Enter the Git-Ai Project

git ai open graph image

What Git‑AI Does

The git-ai project allows you to automatically track agentic ai code contributions across your team and codebase, zeroing in line-by-line, preserving code-generating prompts, all while working within common git workflows. Git-ai works by extending and enhancing your current tooling without slowdown (thanks to Rust) while ‘staying out of the way’ - so you can work as if it’s not even there.

What Data Git‑AI Captures

git-ai stores things like per-line ai contributions, the model and prompt given for the code generated.

git-ai works by storing this ai contribution data in git notes. Git notes are simply blobs attached to commit refs. It’s eloquent in that the meta data stays with the commit, git-ai also contains additional instrumentation to “survive a merge --squash, rebase, reset, cherry-pick etc.”

Project Goals (From the README)

From the README.md:

Goals of git-ai project

🤖 Track AI code in a Multi-Agent world. Because developers get to choose their tools, engineering teams need a vendor agnostic way to track AI impact in their repos.

🎯 Accurate attribution from Laptop → Pull Request → Merged. Claude Code, Cursor and Copilot cannot track code after generation—Git AI follows it through the entire workflow.

🔄 Support real-world git workflows by making sure AI-Authorship annotations survive a merge --squash, rebase, reset, cherry-pick etc.

🔗 Maintain link between prompts and code - there is valuable context and requirements in team prompts—preserve them alongside code.

🚀 Git-native + Fast - git-ai is built on git plumbing commands. Negligible impact even in large repos (<100ms). Tested in Chromium.

NOTE: I have no affiliation with git-ai, but happily applaud their efforts, go check em’ out! github.com/git-ai-project/git-ai

Github PR interface Support

Why Focus on Pull Requests

To experimentally work towards a developer friendly solution, I wanted to try dropping this tooling into a common point of convergence within collaborative version control workflows; Github Pull Requests

Existing Git‑AI Integrations with VSCode

git-ai comes with many integrations, and even has an RFC v3.0, so other tooling providers may implement it themselves. The VSCode integration works very well. AI contributed code is given a gutter highlight, and upon line selectshows the model responsible for said ai generated code, long-hovering provides even more context.

git ai vscode
AI-contributed code highlighted in VSCode using the git-ai extension.

Extending the GitHub PR Experience

To recreate this editor/code-view highlighting, as well as provide human-vs-ai percentage metering in the Github PR experience, I forked an existing github extended plugin github-refined into refined-github-ai-pr This plugin has all the features of the prior, even allowing you to toggle this ai contribution blaming feature on and off in the options (Be sure to check out the screenshots below)

light mode screenshot
GitHub PR with AI contribution annotations in light mode.
dark mode screenshot
GitHub PR with AI contribution annotations in dark mode.

More on Git-Ai Tooling…

Although there is currently no official support from git-ai (as of Jan 2026) for extending the Github PR interface with Git-ai annotations. There is an early access feature: Stat Bot - to “Aggregate git-ai data at the PR, developer, repository and organization levels” It may be worth it for you to check out and could serve as an excellent way to support the creators of git-ai

Caveats

One Major Caveat with refined-github-with-ai-pr, is that it relies on augmenting Github’s HTML via classes, which could very well change without notice, breaking this plugin.

This plugin serves as a beta and prototype, to fuel the conversation of what working with these new tools might look like; and I encourage community members to join the conversation. Maybe github will work towards adding this themselves in the future. Please comment on this post in hackernews or open an issue for refined-github-ai-pr I’d love to hear what you’re thinking!