code-organization

Analyze code structure and suggest refactoring strategies for complexity and file size.

4|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/mgd34msu/goodvibes-gemini --skill code-organization-mgd34msu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-organization
Source: https://github.com/mgd34msu/goodvibes-gemini/tree/main/skills/review-code-organization
Command: npx skills add https://github.com/mgd34msu/goodvibes-gemini --skill code-organization-mgd34msu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill addresses common code organization issues such as overly complex functions, excessively long files, deep directory nesting, and problematic barrel file exports, leading to more maintainable and understandable codebases.

Core Features & Use Cases

  • Complexity Reduction: Identifies and provides strategies to refactor functions with high cyclomatic complexity.
  • File Size Management: Offers methods to split large files into smaller, more focused modules.
  • Directory Structure Improvement: Guides on flattening deep directory structures for better navigation.
  • Barrel File Optimization: Helps in managing and testing barrel file exports effectively.
  • Use Case: When a codebase becomes difficult to navigate and debug due to tangled logic and sprawling files, this Skill provides actionable steps to untangle it.

Quick Start

Use the code-organization skill to analyze the current state of the project's directory structure and identify any issues with file size or nesting depth.

Frequently Asked Questions about code-organization

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

FAQPage Schema
How do I refactor large files into smaller, more focused modules?

To refactor large files, analyze your file line counts and split sprawling codebases into smaller, focused modules. This file splitting process reduces complexity and improves overall codebase maintainability and navigation.

What is cyclomatic complexity and how do I reduce it during code refactoring?

Cyclomatic complexity measures the number of independent paths through a function's source code. You reduce it by refactoring highly complex functions into smaller, clearer units to improve overall code readability and maintainability.

What is the best way to fix deep directory nesting in a software project?

The best way to fix deep directory nesting is to analyze your code structure and flatten deep directory structures. This directory structure improvement strategy enhances codebase navigation and makes tangled logic easier to manage.

How do I manage and test problematic barrel file exports effectively?

Manage problematic barrel file exports by analyzing your code structure to optimize barrel file usage. This refactoring strategy helps you organize exports effectively, making your software development project easier to debug and navigate.

When should I refactor code organization for better maintainability?

You should refactor code organization when a codebase becomes difficult to navigate and debug due to tangled logic, high cyclomatic complexity, sprawling files, or deep directory nesting, aiming to improve maintainability and readability.

Can I analyze my project's directory structure to identify code organization issues?

Yes, you can analyze the current state of a software development project's directory structure to identify code organization issues. This process detects high complexity, large file sizes, and deep nesting to suggest actionable refactoring steps.