refacter

Profile code complexity and hotspots to guide targeted refactoring.

Updated Jan 16, 2026
One-click install
npx skills add https://github.com/Awannaphasch2016/jousef-landing --skill refacter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refacter
Source: https://github.com/Awannaphasch2016/jousef-landing/tree/main/.claude/skills/refacter
Command: npx skills add https://github.com/Awannaphasch2016/jousef-landing --skill refacter

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps engineers systematically profile code complexity and hotspot signals to guide targeted refactoring, reducing risk and improving maintainability.

Core Features & Use Cases

  • Complexity analysis: compute cyclomatic and cognitive complexity using radon to surface risky functions.
  • Hotspot detection: combine code churn with complexity to surface high-risk files for refactoring.
  • Refactoring guidance: map findings to established patterns from REFACTORING-PATTERNS.md and propose concrete steps.
  • Incremental improvements: support small, testable changes with measurable metrics.

Quick Start

Run the included analysis scripts to surface a prioritized refactoring plan:

  • Analyze complexity: python .claude/skills/refacter/scripts/analyze_complexity.py src/
  • Analyze hotspots: python .claude/skills/refacter/scripts/analyze_hotspots.py src/
  • Review patterns and guidance in REFACTORING-PATTERNS.md to implement safe, incremental changes.

Frequently Asked Questions about refacter

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

FAQPage Schema
How do I identify code hotspots for targeted refactoring?

To identify code hotspots for targeted refactoring, you run a script that combines git code churn data with complexity metrics to surface high-risk files requiring immediate attention.

What cyclomatic complexity threshold should trigger a refactor?

A cyclomatic complexity threshold greater than 10, or cognitive complexity exceeding 15, should trigger a refactor in medium-to-large codebases to reduce risk and improve maintainability.

How do I compute cyclomatic and cognitive complexity for my Python codebase?

You compute cyclomatic and cognitive complexity by running the analyze_complexity.py script with radon to profile your source directory and surface risky functions for refactoring.

Does this refactoring guidance work with large codebases?

Yes, this refactoring guidance works effectively with medium-to-large codebases by profiling complexity and hotspot signals to propose safe, incremental, and testable code changes.

How do I map code complexity findings to safe refactoring patterns?

You map complexity findings to safe refactoring patterns by consulting the included REFACTORING-PATTERNS.md documentation, which proposes concrete steps for incremental improvements.