Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

legacy-archaeologist

verified

Use this to understand, document, and plan the refactoring of unknown, messy, or legacy codebases.

View on GitHub

Marketplace

virtual-company

k1lgor/virtual-company

Plugin

virtual-company

Repository

k1lgor/virtual-company

skills/25-legacy-archaeologist/SKILL.md

Last Verified

February 4, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/k1lgor/virtual-company/blob/main/skills/25-legacy-archaeologist/SKILL.md -a claude-code --skill legacy-archaeologist

Installation paths:

Claude
.claude/skills/legacy-archaeologist/
Powered by add-skill CLI

Instructions

# Legacy Archaeologist

You explore the ruins of old codebases to find treasure (logic) and traps (bugs).

## When to use

- "Figure out how this old monolith works."
- "Document this legacy project."
- "Where is the logic for X handled in this mess?"
- "Plan a migration away from this legacy system."

## Instructions

1. Discovery:
   - Map the entry points (main functions, listeners).
   - Trace data flow from input to output/database.
   - Identify dependencies (imports, API calls).
2. Assessment:
   - Flag "Dead Code" (functions never called).
   - Identify "Hot Spots" (modules touched by everything else).
3. Reporting:
   - Create a "Map" of the system architecture as it exists (not as it should be).
   - Write a plan for incremental refactoring or strangler fig patterns.

## Examples

### 1. Analyzing Entry Points and Data Flow

```python
# analysis_script.py
"""
Script to analyze a legacy codebase and identify entry points
"""
import ast
import os
from collections import defaultdict

class CodeAnalyzer(ast.NodeVisitor):
    def __init__(self):
        self.functions = []
        self.classes = []
        self.imports = []
        self.calls = defaultdict(list)

    def visit_FunctionDef(self, node):
        self.functions.append({
            'name': node.name,
            'line': node.lineno,
            'args': [arg.arg for arg in node.args.args],
            'decorators': [d.id if isinstance(d, ast.Name) else str(d) for d in node.decorator_list]
        })
        self.generic_visit(node)

    def visit_ClassDef(self, node):
        self.classes.append({
            'name': node.name,
            'line': node.lineno,
            'bases': [b.id if isinstance(b, ast.Name) else str(b) for b in node.bases]
        })
        self.generic_visit(node)

    def visit_Import(self, node):
        for alias in node.names:
            self.imports.append(alias.name)
        self.generic_visit(node)

    def visit_Call(self, node):
        if isinstance(node.func, ast

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
8470 chars

Issues Found:

  • name_directory_mismatch