# Codebase Classification

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

- Repository: https://github.com/gptme/gptme (4466 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add gptme/gptme --skill codebase-classification -g -a claude-code -y`
Codex: `npx skills add gptme/gptme --skill codebase-classification -g -a codex -y`
Cursor: `npx skills add gptme/gptme --skill codebase-classification -g -a cursor -y`
Gemini CLI: `npx skills add gptme/gptme --skill codebase-classification -g -a gemini-cli -y`

## Description

Classify codebases before modification to choose appropriate development approach

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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:

The rest: https://github.com/gptme/gptme/blob/HEAD/gptme/lessons/skills/codebase-classification/SKILL.md
