Skip to content

charlesjones-dev/ai-modernize

v2.0.0MIT

Finds technical debt and anti-patterns in code written with older AI models or vibe coding, and saves a scored report with a prioritized roadmap. Takes its settings as arguments, and --defaults skips the setup questions for quick or unattended runs

AI Modernize Plugin

Codebase modernization assessment that finds technical debt, anti-patterns and quality issues in older AI-generated or legacy code.

Overview

Codebases built with older AI tools (Claude 3-era models, early Cursor, GPT-4 in 2024) or through "vibe coding" sessions can contain patterns that newer models avoid. This plugin finds those issues and produces a prioritized remediation roadmap with time estimates that assume AI-assisted work. It runs in Claude Code, Codex and Cursor.

Installation

Claude Code:

/plugin marketplace add charlesjones-dev/ai-agent-plugins
/plugin install ai-modernize@ai-agent-plugins

Codex:

codex plugin marketplace add charlesjones-dev/ai-agent-plugins
codex plugin add ai-modernize@ai-agent-plugins

Cursor: add this repository as a team marketplace, or copy this folder to ~/.cursor/plugins/local/ai-modernize. See the Cursor install steps.

Skills

/modernize-audit

Audits the whole repository, a directory or a single file, and saves a scored report with a phased roadmap.

It takes optional arguments after the command: a path for the scope, key=value settings that answer the setup questions, and --defaults. Quote values that contain spaces. In Codex and Cursor, type the same text after the skill name.

ArgumentSetsValues
A pathScopeA file or directory. . means the whole repository
ai=AI tool historyTool names separated by commas, or unsure or none
era=When the code was writtenA period such as 2024, or unsure
stack=Technology stackThe stack, or auto to use the detected one
categories=Assessment categoriesall, or category numbers or names separated by commas, such as security,performance
severity=Severity thresholdall, medium (Medium and above) or high (High and Critical only)
--defaultsEverything the other arguments leave outNo value. Skips the setup questions and uses the defaults

Usage:

/modernize-audit
/modernize-audit src/api categories=security,performance
/modernize-audit . ai=copilot era=2024 stack=auto categories=all severity=medium
/modernize-audit src/services --defaults
/modernize-audit src/services/auth.ts --defaults severity=high

With no arguments, the skill asks about:

  1. AI tools and models used to build the codebase
  2. When the codebase was written
  3. Technology stack confirmation (auto-detected first)
  4. Which of the 12 assessment categories to run
  5. Audit scope (entire solution, or a specific file or directory)
  6. Severity threshold for the report

It asks only about what the arguments leave out, and asks nothing when all six are given. With --defaults, or in an unattended run, it asks nothing and uses defaults for anything missing: AI tools and era "not sure", the detected stack, all categories, the entire solution and all findings. When it runs all categories, it skips any that can't apply to the scope, such as Frontend Debt for backend-only code, and lists them as not applicable.

/modernize-scan is now /modernize-audit <path> --defaults (since version 2.0.0). It writes the full audit report rather than the shorter scan report.

Assessment Categories

#CategoryWhat It Checks
1SOLID/DRY/KISS ViolationsGod classes, duplicated logic, over-engineering, mixed paradigms, YAGNI
2Type Safety & Language Misuseany overuse, missing type guards, loose typing, language idiom violations
3Error HandlingEmpty catch blocks, swallowed errors, missing error boundaries, console.log debugging
4Security Anti-patternsHardcoded secrets, missing validation, injection risks, insecure defaults
5Performance Anti-patternsN+1 queries, sync bottlenecks, missing pagination, full library imports
6Testing GapsImplementation-coupled tests, over-mocking, missing edge cases, no integration tests
7Architecture DebtTight coupling, circular deps, business logic in UI, missing abstraction layers
8Frontend DebtProp drilling, state mismanagement, useEffect misuse, inline styles, missing a11y
9Dependency HealthDeprecated packages, vulnerable versions, unnecessary imports, missing lock files
10AI Hallucination ArtifactsNon-existent APIs, wrong signatures, hallucinated packages, deprecated methods
11Modern Pattern GapsMissing modern syntax, outdated patterns, old CSS, legacy build tools
12Configuration & DevOps DebtHardcoded config, missing env validation, no health checks, poor Docker practices

Report Output

Reports are saved to docs/modernize/ in the repository, with timestamped filenames: YYYY-MM-DD-HHMMSS-modernize-audit.md.

Report Includes

  • Modernization Score (0-100) with category breakdown
  • Findings grouped by severity (Critical, High, Medium, Low)
  • Exact file paths and line numbers for every finding
  • Before/after code examples for remediation
  • Time estimates that assume AI-assisted work
  • Phased modernization roadmap with prioritized checklist
  • A "Why Older AI Models Did This" note on each finding

Supported Technology Stacks

The plugin auto-detects the stack and adds language-specific checks for:

  • JavaScript/TypeScript: React, Vue, Nuxt, Next.js, Angular, Svelte, Express, Fastify, Node.js
  • C#/.NET: nullable reference types, async I/O, records, pattern matching, minimal APIs
  • Python: type hints, f-strings, context managers, match statements, dataclasses

Plugin Details

FieldValue
Version2.0.0
AuthorCharles Jones
LicenseMIT
Repositoryai-agent-plugins

Contributing

Bug reports and fixes are welcome. See CONTRIBUTING.md.