refactor-method-complexity-reduce by github/awesome-copilot
npx skills add https://github.com/github/awesome-copilot --skill refactor-method-complexity-reduce重构方法 ${input:methodName},通过将逻辑提取到专注的辅助方法中,将其认知复杂度降低到 ${input:complexityThreshold} 或以下。
Validate* 方法中
* 将特定类型逻辑提取到处理器方法中
* 为常见操作创建实用方法
* 使用适当的访问级别(static、private、async)重构后的方法应:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
${input:complexityThreshold} 或以下关键:完成重构后,您必须:
${input:complexityThreshold}${input:complexityThreshold}每周安装量
7.4K
仓库
GitHub 星标数
26.9K
首次出现
2026年2月25日
安全审计
安装于
codex7.4K
gemini-cli7.4K
opencode7.3K
cursor7.3K
github-copilot7.3K
amp7.3K
Refactor the method ${input:methodName}, to reduce its cognitive complexity to ${input:complexityThreshold} or below, by extracting logic into focused helper methods.
Analyze the current method to identify sources of cognitive complexity:
Identify extraction opportunities :
Extract focused helper methods :
Validate* methodsSimplify the main method :
Preserve functionality :
Best practices :
The refactored method should:
${input:complexityThreshold} or belowCRITICAL: After completing the refactoring, you MUST:
${input:complexityThreshold}${input:complexityThreshold}Weekly Installs
7.4K
Repository
GitHub Stars
26.9K
First Seen
Feb 25, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex7.4K
gemini-cli7.4K
opencode7.3K
cursor7.3K
github-copilot7.3K
amp7.3K
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装