3 min read
[AI Minor News]

Where’s the Code Written by AI? The New "git-ai" Plugin Visualizes AI Contributions on GitHub PRs


Introducing the tool "git-ai" that identifies and visualizes AI-generated code on GitHub pull requests.

※この記事はアフィリエイト広告を含みます

[AI Minor News Flash] Where’s the Code Written by AI? The New “git-ai” Plugin Visualizes AI Contributions on GitHub PRs

📰 News Overview

  • In response to the surge in code generation tools (like Claude Code and Cursor), the “git-ai” project has been launched to track and visualize AI contributions.
  • Utilizing Git’s “git notes” feature, it links information about the models and prompts used to the respective commits.
  • By using the browser plugin “refined-github-ai-pr,” you can now see a contribution meter and line-by-line highlights of AI contributions directly on your GitHub pull request screen.

💡 Key Points

  • Built in Rust, it maintains exceptional performance with latency below 100ms even in large repositories.
  • Robust design ensures that AI authorship remains intact even during common Git operations like merge --squash, rebase, and cherry-pick.
  • By preserving the link between prompts and code, development teams can refer back to the context of why certain code was generated.

🦈 Shark’s Eye (Curator’s Perspective)

Rather than simply “rejecting” AI code, the approach of “transparency” and management is incredibly practical! The use of git notes to retain metadata is brilliantly designed, allowing rich information like prompts and model names to be carried in a Git-native way without polluting existing commit histories. If “the code written by Cursor at 3 AM” becomes a problem during refactoring months later, this tool will pinpoint its origin instantly. By visualizing AI contribution rates, maintainers gain a powerful weapon to prioritize code reviews and assess reliability!

🚀 What’s Next?

As automated development by AI agents accelerates, there’s potential for this to become a “standard method for tracking AI contributions” that isn’t vendor-dependent. It’s likely to become essential infrastructure for establishing AI utilization guidelines in team development, as well as for spam prevention and quality control in open-source projects.

💬 A Word from Haru-Same

It’s not just about letting AI write code and calling it a day! Distinguishing where AI ends and human input begins is a hallmark of top-tier coding prowess! 🦈

【免責事項 / Disclaimer / 免责声明】
JP: 本記事はAIによって構成され、運営者が内容の確認・管理を行っています。情報の正確性は保証せず、外部サイトのコンテンツには一切の責任を負いません。
EN: This article was structured by AI and is verified and managed by the operator. Accuracy is not guaranteed, and we assume no responsibility for external content.
ZH: 本文由AI构建,并由运营者进行内容确认与管理。不保证准确性,也不对外部网站的内容承担任何责任。
🦈