python-simplifier

Refactor Python code to improve clarity while preserving behavior.

21|11|Updated Jun 18, 2023
One-click install
npx skills add https://github.com/Jij-Inc/Qamomile --skill python-simplifier-jij-inc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-simplifier
Source: https://github.com/Jij-Inc/Qamomile/tree/main/.claude/skills/python-simplifier
Command: npx skills add https://github.com/Jij-Inc/Qamomile --skill python-simplifier-jij-inc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill reduces complexity and improves readability in Python code by applying consistent, Pythonic refactors that preserve the exact behavior of the original program.

Core Features & Use Cases

  • Behavior-Preserving Simplification: Refactors recently changed code to keep outputs, side effects, and functionality identical.
  • Project-Style Enforcement: Improves PEP 8 compliance, naming, typing discipline, docstrings, and import organization.
  • Quality-Gated Refactoring Workflow: Runs formatting and linting and then executes relevant tests to verify nothing regressed.

Quick Start

Use the python-simplifier skill to clean up recently modified Python files while ensuring functionality stays exactly the same and the test suite still passes.

Frequently Asked Questions about python-simplifier

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

FAQPage Schema
How do I refactor Python code to improve readability without changing its behavior?

To refactor Python code without changing behavior, apply Pythonic simplifications that preserve exact outputs and side effects, then run formatters, linters, and tests to verify functionality remains identical.

What is the best way to enforce PEP 8 compliance and consistent type hints in Python?

The best way to enforce PEP 8 compliance and consistent type hints is to apply automated refactoring that adds explicit type annotations, organizes top-level imports, and standardizes docstrings across the codebase.

How do I fix circular import issues in Python without using local imports?

Fixing circular import issues without local imports requires enforcing top-level import discipline during refactoring, restructuring module dependencies to resolve cycles while maintaining behavior.

Can I clean up recently modified Python files and ensure the test suite still passes?

Yes, you can clean up recently modified Python files by applying quality-gated refactoring that runs formatting, executes linting, and validates the test suite to ensure no regressions occur.

Does behavior-preserving refactoring work with existing static analysis and linting workflows?

Behavior-preserving refactoring integrates with static analysis and linting workflows by enforcing formatter, linter, and test execution after changes, ensuring code simplification meets quality gates.

When should I avoid automating Python code simplification during iterative development?

Avoid automating Python code simplification when recent edits involve complex side effects or dynamic behavior that cannot be verified by running formatters, linters, and the existing test suite.