Code Archaeology V2
Code Archaeology V2 is an advanced system for deep analysis of legacy codebases. It performs comprehensive multi-round analysis including business domain mapping, security auditing, performance analysis, and technical debt assessment.
Features
- Multi-round Analysis: Two-phase approach with initial domain mapping followed by deep technical assessment
- Security Auditing: Identifies SQL injection, hard-coded credentials, weak password policies, and other security vulnerabilities
- Performance Analysis: Evaluates database queries, memory usage, caching mechanisms, and concurrency handling
- Technical Debt Assessment: Analyzes outdated dependencies, code quality issues, and maintenance challenges
- Optimization Recommendations: Provides short-term fixes, medium-term improvements, and long-term strategic recommendations
- Risk Assessment: Evaluates business continuity risks and migration complexity
Usage
This skill is designed to analyze complex legacy PHP applications like the ZBS PHP project. It automatically:
- Maps business domains and core architecture
- Performs deep technical assessment across security, performance, and optimization dimensions
- Generates comprehensive reports with actionable recommendations
- Assesses risks and provides migration guidance
Input Requirements
- A legacy codebase (primarily PHP-based but adaptable to other languages)
- Git repository access or local code directory
- Basic system requirements: bash, git, PHP interpreter
Output Deliverables
- Final comprehensive report (
*_code_archaeology_final_report.md) - Security audit results (
*_security_audit_results.md) - Performance analysis (
*_performance_analysis.md) - Technical debt assessment (
*_technical_debt_assessment.md) - Optimization recommendations (
*_optimization_recommendations.md) - API analysis (
*_api_analysis.md)
Example Workflow
For a PHP project like ZBS PHP, Code Archaeology V2 will:
- Round 1: Map 12+ business domains (Contract Management, Customer Management, Financial Management, etc.)
- Round 2: Perform deep technical assessment identifying:
- High-risk security vulnerabilities (SQL injection, hard-coded passwords)
- Performance bottlenecks (slow queries, memory issues)
- Technical debt (PHP 5.x usage, lack of modern practices)
- Deliver: Comprehensive reports with prioritized recommendations
Integration
This skill works as part of the OpenClaw ecosystem and can be combined with other skills for end-to-end legacy code modernization workflows.
