python-refactor
Assist with automated, safe, and explainable Python refactorings. Detects simple anti-patterns and offers AST-based transformations with patches and unit-test friendly changes.
Find the perfect capability for your agent.
Assist with automated, safe, and explainable Python refactorings. Detects simple anti-patterns and offers AST-based transformations with patches and unit-test friendly changes.
Improves Python library code quality through ruff linting, mypy type checking, Pythonic idioms, and refactoring. Use when reviewing code for quality issues, adding type hints, configuring static analysis tools, or refactoring Python library code.
Use when reviewing code, PRs, or diffs. Triggers on "review", "code review", "PR", "pull request", "diff", "check this", "look at this code", "quality", "refactor", "egregious", "cross-file", "duplicate", "duplication", or when examining code for issues.
Architecture review for Python 3 projects enforcing TDD (Red→Green→Refactor→Quality Check), YAGNI principles, and code quality gates. Use when (1) writing new Python code, (2) reviewing existing Python code, (3) refactoring Python modules, (4) adding tests to Python projects, or (5) checking code quality metrics. Integrates Ruff, mypy, and security scanning.
Language-specific coding guidelines. Use when implementing code in Python or other supported languages.
Use when writing new code, implementing features, or refactoring. Triggers on "pattern", "reuse", "duplicate", "extract", "helper", "refactor", "architecture", "DRY", "don't repeat yourself", "abstract", "reusable", "similar", "existing code", or when about to write new functionality.
Format Python code using black, ruff, and isort to ensure consistent style. This skill should be used before committing code to maintain code quality standards and pass CI/CD checks.
Python code review specialist. Use when reviewing Python code, checking for bugs, security issues, or ensuring code quality standards.
Ensure Python classes include appropriate, developer-friendly dunder methods—especially __repr__ and __str__. Use when: (1) Writing or modifying Python class definitions in .py files, (2) Refactoring existing Python classes, (3) Adding or improving __repr__, __str__, or natural arithmetic/comparison/container dunders. Do NOT use for: tests, fixtures, mocks, stubs, non-Python files (YAML, JSON, TOML), auto-generated code vendor libraries, or when user explicitly asks not to modify dunders. Ignored paths: tests/, *_test.py, test_*.py, .venv/, build/, dist/, migrations/, __init__.py.
Use when adding minimal CI automation for lint, tests, and type checks in Python research code.
Python code quality gates script for linting, type checking, complexity analysis, and testing before commits. Use when enforcing consistent code quality across Python projects with fast (unit-tests) or comprehensive (all-tests) modes.
VS Code language diagnostics and Jupyter code execution using IDE MCP. Use for checking type errors, running Python code in notebooks, or getting real-time code analysis. Triggers on requests for diagnostics, type checking, or notebook execution.
Python coding conventions, tooling, and style guide. Auto-loads when writing or reviewing Python code.
Guía para refactorizar código Python de forma segura y efectiva. Incluye técnicas de refactoring, detección de code smells, y mejoras.
Encodes validation patterns for robotics simulation code (ROS 2, Gazebo, Isaac Sim). Ensures code examples are testable, safe, and follow simulation-first pedagogy. Validates Python syntax, ROS 2 patterns, URDF/SDF markup, and troubleshooting completeness.
Use ruff to lint, format, and modernize Python code. Activate when: (1) Fixing PEP 8 violations, (2) Removing unused imports, (3) Upgrading deprecated Python syntax (UP rules), (4) Auto-fixing code quality issues, (5) Formatting Python files, or (6) Replacing Flake8, isort, pyupgrade, autoflake, or Black.
Set up and run Ruff in Python projects. Use when installing Ruff with uv, configuring ruff.toml, updating AGENTS.md and .gitignore for Ruff, or running Ruff lint/format commands.
Automatically applies when writing Python code to enforce comprehensive type hints. Ensures mypy compatibility, proper generic types, and type safety best practices.
Run formatting, linting, and tests using uv + Ruff + pytest