legacy code archaeologist

    1

    Reconstruct system architecture and business rules from legacy code using evidence-based analysis and verified citations.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    legacy code archaeologist

    Example session with this skill installed

    Extract the business rules for loan eligibility from the /legacy/finance directory. List observed rules with citations and flag any inferred logic.

    • Read your context and instructions
    • Compiled the legacy code archaeologist

    Analysis of loan eligibility logic in /legacy/finance completed. Citations verified via evidence_audit.py.

    Business Rules Discovery: Loan Eligibility

    Rule IDStatusDescriptionEvidence (File:Lines)
    RULE-001ObservedMinimum credit score for automated approval is 650.finance/evaluator.py:42-45
    RULE-002ObservedDebt-to-income ratio must be below 0.42 for tier-1 rates.finance/evaluator.py:58
    RULE-003InferredThe check_manual_override function suggests a secondary review for scores between 600-649, but the threshold is not explicitly defined in this module.finance/gatekeeper.py:112
    SEC-001ObservedHardcoded API key detected in legacy connection string (Redacted).finance/db_connector.py:12

    Observed Logic Details

    
    # finance/evaluator.py:42-45
    # Rule: Automated Approval Threshold
    if user_profile.credit_score >= 650:
        return EligibilityStatus.AUTO_APPROVED
    

    Verification Report

    • Total Citations: 4
    • Verified: 4
    • Failed: 0
    • Redactions Applied: Yes (Secrets masked in db_connector.py)

    Next steps

    1. Review finance/gatekeeper.py with the product team to confirm the inferred manual override thresholds.
    2. Characterize evaluator.py with unit tests before attempting the planned migration to the new scoring engine.
    3. Rotate the leaked credentials found in db_connector.py.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Inheriting a legacy codebase without documentation is a liability. This skill acts as a software archaeologist to reconstruct how a system actually functions based on evidence rather than assumptions. It extracts hidden business rules, maps real architecture, and identifies data flows while ensuring every claim is backed by a verified code citation.

    What it does

    • Architectural Reconstruction builds a map of the actual system structure, internal dependencies, and cycles.
    • Business Rule Mining extracts hidden thresholds, rates, and status logic embedded in the source.
    • Data Flow Tracing follows information through the system to identify inputs, outputs, and side effects.
    • Entrypoint Mapping identifies the real ways users or external systems interact with the code.
    • Evidence Verification runs a deterministic audit to ensure every finding maps to an exact file and line number.

    How it works

    1. Inventory phase uses legacy_inventory.py to measure languages, volumes, and entrypoints.
    2. Analysis phase triggers specific profiles like business-rules-miner or dependency-cartographer.
    3. Evidence collection captures exact code snippets while masking secrets via redact_excerpts.py.
    4. Verification phase runs evidence_audit.py to validate every citation against the disk.
    5. Report generation delivers a structured summary of observed facts, inferences, and unknowns.

    Frameworks & tools

    The skill uses a standard library of deterministic Python scripts for cyclomatic complexity analysis, dependency mapping, and evidence auditing. It integrates with Git for history analysis.

    Why this beats prompting it yourself

    Generic prompts often hallucinate how code works or miss subtle edge cases in complex logic. This skill enforces an "Observed, Inferred, Unknown" status for every claim and fails the report if a citation cannot be verified against the actual source files.

    Use cases

    • Project Handover to quickly map a repository when the previous lead has left.
    • Migration Planning to assess technical debt and risks before moving to a new stack.
    • Audit & Compliance to find hidden business logic or hardcoded secrets in old services.
    • Test Characterization to write safety tests before refactoring high-complexity hotspots.

    Known limitations

    Complexity and dependency mapping are exact for Python only. Other languages rely on heuristic estimations marked as such. The skill operates in read-only mode and cannot execute production code.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.

    Complexity/dependency mapping is exact for Python; other languages use heuristics. Read-only access only. No production execution or dynamic analysis for unused code.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 3 days ago

    • Free with an Agensi account

    Software
    Python

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Network Access
    Environment Variables
    Listed3 days ago

    What's inside

    Frequently Asked Questions

    The skill provides 100% accuracy for Python codebases; for other languages, it offers heuristic-based mapping and rule extraction clearly flagged as estimations. All findings, regardless of language, are backed by redacted code citations to ensure human verification.

    Unlike general LLM prompts that may hallucinate logic, this skill uses a deterministic 'evidence-based' framework. It validates every claim against the source files using a verification audit, ensuring that business rules and architecture maps are based on actual code rather than assumptions.

    Security is prioritized through a redaction script that masks secrets, API keys, and sensitive data before excerpts are included in reports. Furthermore, the skill operates in a strictly read-only environment and never executes the code it analyzes.

    The purchase includes the core analysis engine, a library of deterministic Python scripts for auditing and mapping, and a set of predefined analysis profiles (e.g., Business Rules Miner, Dependency Cartographer). You will also receive documentation on integrating the skill with your existing Git workflows.

    This skill is designed for any AI agent or platform that supports Python-based tool execution and local file system access. It integrates seamlessly with standard Git environments to perform historical analysis alongside its structural audits.

    The skill produces a structured 'Archaeology Report' that categorizes findings into Observed Facts (verified), Inferred Logic (highly likely), and Unknowns (gaps in evidence). This allows teams to prioritize refactoring or migration efforts based on high-confidence data.

    New in Agents & Orchestration

    Free