- Home
- Skills
- Agents & Orchestration
- legacy code archaeologist
legacy code archaeologist
Reconstruct system architecture and business rules from legacy code using evidence-based analysis and verified citations.
Free
Works with the AI Agents you already use
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 ID | Status | Description | Evidence (File:Lines) |
|---|---|---|---|
| RULE-001 | Observed | Minimum credit score for automated approval is 650. | finance/evaluator.py:42-45 |
| RULE-002 | Observed | Debt-to-income ratio must be below 0.42 for tier-1 rates. | finance/evaluator.py:58 |
| RULE-003 | Inferred | The 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-001 | Observed | Hardcoded 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
- Review
finance/gatekeeper.pywith the product team to confirm the inferred manual override thresholds. - Characterize
evaluator.pywith unit tests before attempting the planned migration to the new scoring engine. - 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
- Inventory phase uses
legacy_inventory.pyto measure languages, volumes, and entrypoints. - Analysis phase triggers specific profiles like
business-rules-minerordependency-cartographer. - Evidence collection captures exact code snippets while masking secrets via
redact_excerpts.py. - Verification phase runs
evidence_audit.pyto validate every citation against the disk. - 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
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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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