python-simplifier

Analyze Python code for maintainability issues and refactoring opportunities.

Updated May 6, 2026
One-click install
npx skills add https://github.com/Takfes/indie-scaffolder --skill python-simplifier-takfes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-simplifier
Source: https://github.com/Takfes/indie-scaffolder/tree/main/components/agent-skills-commands/.agents/skills/python-simplifier
Command: npx skills add https://github.com/Takfes/indie-scaffolder --skill python-simplifier-takfes

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps you turn complex, hard-to-maintain Python into clearer, more idiomatic code by identifying the patterns that make software difficult to understand, review, and extend.

Core Features & Use Cases

  • Complexity Analysis: Detects long functions, deep nesting, excessive parameters, and other maintainability risks.
  • Code Quality Review: Finds common smells such as mutable defaults, bare excepts, dead code, duplicate logic, over-engineering, and unpythonic patterns.
  • Coupling and Cohesion Checks: Highlights feature envy, message chains, thin wrappers, and low-cohesion classes that should be simplified.
  • Practical Use Case: Use it when a Python module feels bloated or fragile and you want a structured plan for cleanup before refactoring.

Quick Start

Ask the python-simplifier skill to analyze the attached Python project, summarize the highest-priority maintainability problems, and rewrite the worst sections into simpler, clearer code.

Frequently Asked Questions about python-simplifier

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

FAQPage Schema
How do I refactor complex Python code to improve readability?

Refactor complex Python code by running static AST analysis to identify maintainability issues like deep nesting, long functions, and excessive parameters, then apply incremental simplification to rewrite sections into cleaner, more idiomatic structure.

What is the best way to detect code smells and dead code in Python modules?

Detect code smells and dead code in Python modules through AST-based static analysis that scans for mutable defaults, bare excepts, duplicate logic, over-engineering, and unpythonic patterns to guide safe incremental cleanup.

Can I check Python class coupling and cohesion before refactoring?

Check Python class coupling and cohesion by analyzing AST structures to highlight feature envy, message chains, thin wrappers, and low-cohesion classes, providing a structured plan for simplification before you refactor.

How do I find unpythonic patterns and over-engineering in my Python project?

Find unpythonic patterns and over-engineering in your Python project by applying static complexity analysis that flags non-idiomatic structures, duplicate logic, and excessive parameters, then rewriting the worst sections into simpler code.

Does static analysis work for cleaning up bloated Python functions and classes?

Static analysis works for cleaning up bloated Python functions and classes by evaluating complexity metrics, dead code, and coupling issues, then generating a prioritized maintainability summary to guide safe incremental refactoring.