The refactor-method-complexity-reduce skill analyzes a specified method to identify sources of cognitive complexity—such as nested conditionals, repeated code, and complex logic—and refactors it by extracting focused helper methods until the complexity falls below a target threshold. It is designed for developers who need to improve code maintainability and readability by reducing method complexity while preserving all original functionality and passing existing tests. The skill solves the problem of overly complex methods that are difficult to understand, test, and modify by systematically breaking them into smaller, single-responsibility helper methods.
npx skills add https://github.com/github/awesome-copilot --skill refactor-method-complexity-reduce