gptme/lessons/skills/codebase-classification/SKILL.md
Classify codebases before modification to choose appropriate development approach
npx skillsauth add gptme/gptme codebase-classificationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Analyze and classify codebases before making changes to ensure appropriate development approach.
Before modifying any codebase, classify it to determine whether to:
Signals:
Approach: Follow existing patterns strictly. Don't introduce new conventions.
Signals:
Approach: Follow existing conventions in touched areas. Propose improvements for new code.
Signals:
Approach: Be careful with changes. Add tests before modifying. Propose gradual improvements.
Signals:
Approach: Establish best practices from the start. Set up proper structure, testing, CI.
Run this analysis before making significant changes:
1. Check test coverage: Is there a test/ or tests/ directory? How comprehensive?
2. Check type hints: Are functions annotated? Is there py.typed or mypy config?
3. Check CI/CD: Is there .github/workflows/, .gitlab-ci.yml, or similar?
4. Check code style: Is there .pre-commit-config.yaml, ruff.toml, or similar?
5. Check dependencies: When was requirements.txt/pyproject.toml last updated?
6. Check documentation: Is there a comprehensive README? API docs?
| Signal | Disciplined | Transitional | Legacy | Greenfield | |--------|-------------|--------------|--------|------------| | Test coverage | >70% | 30-70% | <30% | Varies (new) | | Type hints | Comprehensive | Partial | None/minimal | Varies | | CI/CD | Active | Present | None/broken | May be new | | Code style | Consistent | Mixed | Inconsistent | Establishing | | Dependencies | Current | Somewhat current | Outdated | Latest | | Age | Any | Any | Usually old | <6 months |
$ ls -la
pyproject.toml # Modern packaging
.pre-commit-config.yaml # Style enforcement
mypy.ini # Type checking
.github/workflows/ # CI/CD
$ wc -l tests/**/*.py
2500 total # Substantial tests
→ Classification: DISCIPLINED
→ Approach: Follow existing patterns strictly
$ ls -la
setup.py # Old-style packaging
requirements.txt # Pinned 3 years ago
# No tests directory
# No CI configuration
$ grep -r "def " src/ | head -5
def process_data(x): # No type hints
def handle_input(data): # No docstrings
→ Classification: LEGACY
→ Approach: Careful changes, add tests first
This skill helps agents:
tools
Interactive Python REPL automation with common helpers and best practices
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.