refactor-legacy

Migrate legacy Cartography Cypher modules to load() with GraphJob.from_node_schema().

4.0k|550|Updated Feb 27, 2019
One-click install
npx skills add https://github.com/cartography-cncf/cartography --skill refactor-legacy
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: refactor-legacy
Source: https://github.com/cartography-cncf/cartography/tree/main/.agents/skills/refactor-legacy
Command: npx skills add https://github.com/cartography-cncf/cartography --skill refactor-legacy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Refactor legacy Cartography intel modules from handwritten Cypher to the modern declarative data model, enabling safer, maintainable migrations and long-term scalability.

Core Features & Use Cases

  • Automates the migration of legacy modules from handwritten load_* / cleanup_* Cypher into load() with GraphJob.from_node_schema() for consistent data ingestion.
  • Guides safe cleanup by converting legacy artefacts and validating changes with tests.
  • Provides integration-test scaffolding and step-by-step instructions to verify migrations before production rollout.

Quick Start

Run the refactor workflow to convert legacy Cypher modules to the modern data model.

Frequently Asked Questions about refactor-legacy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate legacy Cartography modules from handwritten Cypher to the modern data model?▼

Migrate legacy Cartography modules by converting handwritten load_* and cleanup_* Cypher into load() using GraphJob.from_node_schema() for schema-driven ingestion. This ensures safe transitions while preserving existing functionality during the modernization process.

What is the modern Cartography data model and when do I need to refactor legacy modules?▼

The modern Cartography data model uses load() with GraphJob.from_node_schema() for declarative ingestion. Refactor legacy modules when maintaining handwritten Cypher becomes unsustainable or when scaling data ingestion across multiple modules is required.

How do I test Cartography intel modules before deploying a legacy Cypher migration?▼

Test Cartography migrations using provided integration-test scaffolding and step-by-step instructions to verify behavior before production rollout. This validates safe transitions and confirms functionality preservation after converting legacy Cypher.

Can I use GraphJob.from_node_schema() to refactor multiple Cartography modules at once?▼

Yes, refactor legacy Cartography modules across multiple modules simultaneously using GraphJob.from_node_schema() for schema-driven ingestion. The approach applies to refactoring, modernization, migration, and cleanup tasks while ensuring safe transitions.

What are the limitations of refactoring legacy Cartography modules to the modern data model?▼

Refactoring legacy Cartography modules requires validating changes with tests and following integration-test scaffolding before production rollout. Limitations include ensuring safe transitions while preserving existing functionality during the migration from handwritten Cypher.

Does refactoring Cartography legacy modules require Neo4j schema changes?▼

Refactoring Cartography legacy modules enforces schema-driven ingestion via GraphJob.from_node_schema() but does not explicitly require Neo4j schema changes. The process converts handwritten Cypher to the modern declarative load() model while preserving existing functionality.