Author: D0up4
Last Updated: 06/2025
Project Type: Python Tool / Code Analysis / Developer Tools
This is a lightweight Python tool that performs a heuristic analysis on .py
source files to estimate whether they may have been AI-generated (e.g., via ChatGPT, Copilot, etc.). It works by analyzing coding patterns such as:
- Comment density
- Naming conventions (e.g.,
camelCase
vssnake_case
) - Use of generic function or variable names
- Presence of overly broad exception handling
π Note: This tool is not definitive. It gives an educated guess based on observable patterns β helpful for fun, learning, or code review exploration.
- π Analyzes comment-to-code ratio
- π Flags use of common AI-style naming patterns
- π― Calculates consistency of naming style
- π§ Produces an "AI-likeness" score (0β4)
- π¬ Human-friendly output with context
- π Pure Python β no external dependencies
git clone https://github.com/D0up4/ai-code-style-analyzer.git
cd ai-code-style-analyzer