360 Secure SkillHub
360 安全技能中心

Code Archaeology V2

面向遗留代码库(以 PHP 为主)的多轮深度分析 Skill:先梳理业务域与核心架构,再从安全审计(SQL 注入、硬编码凭据、弱口令策略)、性能(数据库查询、内存、缓存、并发)与技术债务(过时依赖、代码质量)维度评估,给出短中长期优化建议及风险与迁移复杂度判断,产出多份 Markdown 报告。

hickhe
hickhe
热度 19.39
最近更新 2026-03-24 07:21:48
分类:安全依赖:代码执行 / 读写文件 / 内部调用大模型应用场景:代码审查 / 报告撰写 / 研究

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add code-archaeology-v2
Metadata
name
code-archaeology-v2
description
Advanced code archaeology system for deep analysis of legacy codebases with multi-round analysis, security auditing, and technical debt assessment.
user-invocable
true
disable-model-invocation
false
metadata
{"openclaw":{"emoji":"🦴","os":["darwin","linux","win32"],"requires":{"bins":["bash","git","php"]}}}

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:

  1. Maps business domains and core architecture
  2. Performs deep technical assessment across security, performance, and optimization dimensions
  3. Generates comprehensive reports with actionable recommendations
  4. 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:

  1. Round 1: Map 12+ business domains (Contract Management, Customer Management, Financial Management, etc.)
  2. 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)
  3. 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.