AI Code Detector - VS Code Extension
Real-time AI-generated code detection directly in VS Code. Automatically detect, explain, and rewrite AI-generated code to make it more human-like.
Creator: John Oseni
Features
- Real-time Detection: Automatically scan files as you type and save
- Inline Warnings: See AI code warnings directly in the editor's Problems panel
- Status Bar: View current file's AI detection status with live updates
- Code Actions: Right-click to rewrite AI code as human-like code
- Multi-language Support: JavaScript, TypeScript, Python, Java, Go, Rust, and more
- Explainability: See why code was flagged as AI-generated with specific patterns
- Style Guide Alignment: Automatically apply your project's ESLint and Prettier rules
- Git Integration: Warn before commits containing high AI code percentage
- Humanization History: Track all code transformations for audit purposes
Installation
- Open VS Code
- Press
Ctrl+Shift+X
(or Cmd+Shift+X
on Mac)
- Search for "AI Code Detector"
- Click "Install"
Quick Start
1. First Time Setup
- Open any JavaScript/TypeScript file
- The status bar will show "AI Code Detection Status"
- Save the file to trigger automatic scanning
2. Basic Usage
- Automatic Detection: Files are scanned automatically when saved
- View Warnings: Check the Problems panel for AI code warnings
- Status Bar: Monitor current file's AI status in the bottom bar
- Quick Actions: Right-click warnings for rewrite options
3. Advanced Features
- Command Palette: Press
Ctrl+Shift+P
for manual commands
- Workspace Scan: Scan entire project for AI code
- Style Alignment: Apply your team's coding standards
- Git Integration: Get warnings before committing AI code
Commands
Press Ctrl+Shift+P
and type:
"Scan Current File for AI Code"
- Analyze current file
"Scan Workspace for AI Code"
- Scan entire workspace
"Show AI Code Report"
- Display comprehensive report
"Rewrite as Human-like Code"
- Humanize AI code
"Explain AI Detection"
- Show detection reasoning
"Show Humanization History"
- View transformation history
"Check Git Commit Safety"
- Verify commit safety
Configuration
Basic Settings
{
"is-ai-code.enabled": true,
"is-ai-code.autoScan": true,
"is-ai-code.confidenceThreshold": 0.15,
"is-ai-code.companyName": "Your Company"
}
Advanced Settings
{
"is-ai-code.showInlineWarnings": true,
"is-ai-code.supportedLanguages": [
"javascript",
"typescript",
"python",
"java",
"go",
"rust"
],
"is-ai-code.gitCommitThreshold": 20,
"is-ai-code.teamConventions": {
"functionNaming": "camelCase",
"variableNaming": "camelCase",
"maxLineLength": 80,
"indentStyle": "spaces",
"quoteStyle": "double"
}
}
Usage
Status Bar Indicators
- Green Check: No AI code detected
- Red Shield: AI code detected with percentage
- Tooltip: Shows detailed status information
Code Actions
- Right-click on AI code warnings
- Select "Rewrite as Human-like Code" to generate humanized version
- Choose from three humanization methods:
- Smart Humanization: Intelligent code rewriting
- Style Guide Alignment: Apply your ESLint/Prettier rules
- Creative Rewrite: Alternative implementations
Git Integration
- Automatic Warnings: Get notified when saving files with high AI content
- Commit Safety: Check if commits contain >X% AI-generated code
- Configurable Threshold: Set your preferred AI percentage limit
Supported Languages
- JavaScript/TypeScript
- Python
- Java
- Go
- Rust
- C/C++/C#
- PHP
- Ruby
- Swift
- Kotlin
Troubleshooting
Common Issues
Extension not detecting AI code:
- Check if
is-ai-code.enabled
is set to true
- Verify file language is in supported languages
- Check confidence threshold setting
No status bar indicator:
- Ensure extension is activated
- Check VS Code status bar visibility
- Restart VS Code if needed
Code actions not appearing:
- Verify
enableCodeActions
is set to true
- Check if file contains AI code warnings
- Right-click on warning messages
Support
- Issues: Report bugs on GitHub
- Documentation: See the main project README
- Community: Join discussions on GitHub Discussions
Built for enterprise-grade AI code detection and compliance.
Creator: John Oseni