Skills

Codebase Classification

Classifies a codebase before changes to choose a suitable development approach.

Install

npx skills add gptme/gptme --skill codebase-classification -g -a claude-code -y
Repository
gptme/gptme4.5k
Category
Engineering
Updated
3d ago
License
MIT
Context cost
Lightabout 1,219 tokens
Runs scripts
No, instructions only

What it does

Classify codebases before modification to choose appropriate development approach

Codebase Classification Skill

Analyze and classify codebases before making changes to ensure appropriate development approach.

Overview

Before modifying any codebase, classify it to determine whether to:

  • Follow existing patterns (Disciplined)
  • Gradually improve while following conventions (Transitional)
  • Propose improvements to legacy patterns (Legacy)
  • Establish best practices from scratch (Greenfield)

Classification Types

1. Disciplined Codebase

Signals:

  • Consistent code style (formatting, naming conventions)
  • Comprehensive test coverage (>70%)
  • Clear module boundaries and interfaces
  • Type hints/annotations throughout
  • Up-to-date dependencies
  • Active CI/CD pipeline
  • Good documentation (README, docstrings)

Approach: Follow existing patterns strictly. Don't introduce new conventions.

2. Transitional Codebase

Signals:

  • Mixed code quality (some areas good, others not)
  • Partial test coverage (30-70%)
  • Some type hints, inconsistent usage
  • Active development with modernization efforts
  • Dependencies somewhat current

Approach: Follow existing conventions in touched areas. Propose improvements for new code.

3. Legacy Codebase

Signals:

  • Inconsistent patterns across the codebase
  • Minimal or no tests (<30% coverage)
  • No type hints
  • Outdated dependencies
  • Complex, undocumented logic
  • Possibly unmaintained

Approach: Be careful with changes. Add tests before modifying. Propose gradual improvements.

4. Greenfield Codebase

Signals:

  • New project (<6 months old)
  • Few files (<20 source files)
  • No established patterns yet
  • Minimal or no tests (but not legacy)
  • Active initial development

Approach: Establish best practices from the start. Set up proper structure, testing, CI.

Quick Classification Checklist

Run this analysis before making significant changes:

Read the whole SKILL.md on GitHub

More in Engineering