Skip to content

D0up4/AI-Code-Style-Analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 

Repository files navigation

🧠 AI Code Style Analyzer (Experimental)

Author: D0up4
Last Updated: 06/2025
Project Type: Python Tool / Code Analysis / Developer Tools


πŸ“˜ Description

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 vs snake_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.


βš™οΈ Features

  • πŸ“Š 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

πŸš€ Usage

1. Clone or Download the Script

git clone https://github.com/D0up4/ai-code-style-analyzer.git
cd ai-code-style-analyzer

About

analyze if the code is AI or not.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages