code-consolidator

Merge fragmented code files and update imports to preserve behavior.

1|Updated Sep 12, 2025
One-click install
npx skills add https://github.com/JimmyTranDev/dotfiles --skill code-consolidator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-consolidator
Source: https://github.com/JimmyTranDev/dotfiles/tree/main/src/opencode/skills/code-consolidator
Command: npx skills add https://github.com/JimmyTranDev/dotfiles --skill code-consolidator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers consolidate over-separated code by merging files, collapsing layers, and inlining trivial abstractions to reduce cognitive load.

Core Features & Use Cases

  • Consolidate thin wrappers and single-use layers to simplify navigation and reduce indirection
  • Inline trivial abstractions to improve maintainability and readability
  • Unify fragmented configurations into a single cohesive config strategy
  • Guide on when to merge vs when to preserve boundaries to balance complexity

Quick Start

Provide a plan to identify over-separated modules and progressively merge them while preserving behavior.

Frequently Asked Questions about code-consolidator

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

FAQPage Schema
How do I refactor fragmented modules and thin wrappers to reduce code indirection?

To refactor fragmented modules, identify over-separated files and apply consolidation patterns to merge thin wrappers and single-use layers. This reduces indirection and cognitive load while preserving behavior by safely updating imports across your codebase.

What is the best way to consolidate scattered configurations across different layers?

The best way to consolidate scattered configurations is to unify fragmented config files into a single cohesive configuration strategy. This involves recognizing code smells related to distributed settings and merging them to improve maintainability and readability.

How do I inline trivial abstractions without breaking existing imports?

To inline trivial abstractions safely, collapse single-use layers and apply consolidation patterns while updating imports to keep behavior intact. This process simplifies navigation and reduces unnecessary indirection within your architecture.

When should I preserve boundaries instead of merging over-separated code?

You should preserve boundaries instead of merging over-separated code when collapsing the abstraction would increase complexity or break architectural intent. Evaluate code smells to balance whether merging related files genuinely improves maintainability or just hides important separation of concerns.

What is the maximum file size limit when merging scattered code into cohesive modules?

The maximum file size limit when merging scattered code is 200 lines per merged unit. This constraint ensures that consolidating over-separated modules and collapsing layers improves readability without creating overly large and complex files.

Why does my codebase have too many wrappers and scattered configs across services?

Your codebase has too many wrappers and scattered configs due to over-separation, a code smell where abstractions are fragmented across layers. Consolidating these related files and inlining trivial abstractions reduces cognitive load and simplifies navigation.