coupling-cohesion

Analyze codebase coupling and cohesion to recommend refactoring improvements.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/hung-phan/system-skills --skill coupling-cohesion
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coupling-cohesion
Source: https://github.com/hung-phan/system-skills/tree/main/skills/system-review/references/code-design/coupling-cohesion
Command: npx skills add https://github.com/hung-phan/system-skills --skill coupling-cohesion

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps diagnose and fix structural decay in code by analyzing and improving the coupling and cohesion levels, which are crucial for maintainability and readability.

Core Features & Use Cases

  • Coupling and Cohesion Analysis: Evaluates the relationships between different parts of the code to identify issues.
  • Refactoring Recommendations: Provides guidance on how to refactor the code to improve its structure.
  • Use Case: When a module is difficult to test, changes in one part of the code have unintended side effects, or new features require extensive modifications in multiple places.

Quick Start

Analyze the code structure in the 'codebase' directory using the 'coupling-cohesion' skill.

Frequently Asked Questions about coupling-cohesion

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

FAQPage Schema
How do I analyze coupling and cohesion to fix structural decay in my codebase?

You can analyze code structure to diagnose structural decay by evaluating code relationships to identify high coupling and low cohesion, which directly impacts maintainability and readability.

What causes high coupling and low cohesion in software engineering?

High coupling and low cohesion occur when code relationships are tightly intertwined and poorly grouped, causing structural decay where changes in one part trigger unintended side effects in others.

How do I refactor a module that is difficult to test and has unintended side effects?

Refactoring a difficult-to-test module requires assessing its coupling and cohesion levels to improve the design hierarchy, which isolates changes and prevents unintended side effects across the codebase.

When do I need coupling and cohesion analysis for code maintenance?

You need coupling and cohesion analysis when new features require extensive modifications in multiple places, or when module dependencies cause changes in one part of the code to have unintended side effects.

Can I assess code relationships and design hierarchy without external dependencies?

Yes, you can assess code relationships and advise on improving the design hierarchy of coupling and cohesion levels directly within your codebase directory without requiring external dependencies.

What is the best way to improve code maintainability and readability during refactoring?

The best way to improve maintainability and readability is to diagnose structural decay by analyzing coupling and cohesion levels, then applying targeted refactoring recommendations to optimize code relationships.