code-refactoring

Removes legacy code, consolidates duplicates, and updates imports for major version refactoring.

2|1|Updated Mar 19, 2025
One-click install
npx skills add https://github.com/ASISaga/AgentOperatingSystem --skill code-refactoring-asisaga
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-refactoring
Source: https://github.com/ASISaga/AgentOperatingSystem/tree/main/.github/skills/code-refactoring
Command: npx skills add https://github.com/ASISaga/AgentOperatingSystem --skill code-refactoring-asisaga

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the complex and error-prone process of refactoring codebases for major version upgrades, ensuring a clean, efficient, and maintainable system by removing outdated code and consolidating implementations.

Core Features & Use Cases

  • Backward Compatibility Removal: Safely eliminate old code paths and deprecated features.
  • Code Consolidation: Merge duplicate implementations to reduce redundancy and improve maintainability.
  • Import Updates: Systematically update all code references to point to the new, canonical implementations.
  • Use Case: When preparing to release v3.0.0 of the Agent Operating System, this skill guides the process of removing all v1.x and v2.x legacy code, ensuring only the latest, most efficient patterns remain.

Quick Start

Execute the code-refactoring skill to update all imports from agents.base to agents.base_agent within the src directory.

Frequently Asked Questions about code-refactoring

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

FAQPage Schema
How do I remove backward compatibility code during a major version upgrade?

Removing backward compatibility code during a major version upgrade involves systematically analyzing your codebase, eliminating deprecated features, and updating all references to canonical patterns to ensure system stability.

What is the best way to consolidate duplicate implementations for code maintainability?

Consolidating duplicate implementations for code maintainability requires identifying redundant code paths, merging them into single canonical structures, and updating import references to reduce overall codebase redundancy.

How do I update import paths when refactoring a software project?

Updating import paths when refactoring a software project requires systematically correcting all code references to point to new canonical implementations, such as migrating imports from agents.base to agents.base_agent across directories.

When do I need to perform major version refactoring on my codebase?

You need major version refactoring when preparing to release significant updates, such as moving from v2.x to v3.0.0, which requires stripping all legacy code paths and ensuring only the latest patterns remain.

Does major version refactoring require specific testing to ensure system stability?

Major version refactoring requires thorough testing to ensure system stability, as removing outdated code and updating import paths can introduce breaking changes if references are not systematically corrected.

Why should I deprecate old code paths instead of keeping them for safety?

Deprecating old code paths instead of keeping them improves long-term maintainability by eliminating redundant legacy implementations, ensuring your system runs only the latest, most efficient patterns without outdated overhead.