python-edit

Generate, refactor, and debug Python 3.9+ code with type hints and pytest-ready tests.

Updated Jan 12, 2026
One-click install
npx skills add https://github.com/huangerilnew-blip/Deep_Research --skill python-edit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-edit
Source: https://github.com/huangerilnew-blip/Deep_Research/tree/main/.opencode/skills/python_edit
Command: npx skills add https://github.com/huangerilnew-blip/Deep_Research --skill python-edit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Python 代码生成、重构和调试专家,帮助开发者创建高质量的 Python 模块,提升开发效率并确保风格一致性。 它覆盖从模块创建、代码重构、Bug 修复、添加类型提示、性能优化到测试编写与遵循 PEP 8 规范等全流程。

Core Features & Use Cases

  • 生成和重构 Python 代码,附带类型提示、清晰的接口和文档。
  • 诊断和修复 Bug,提供性能改进建议、测试策略和可维护的实现模式。
  • 提供面向生产的模板、示例测试以及逐步的重构指导,适用于新特性实现和代码现代化。

Quick Start

Create a new Python module that follows PEP 8, includes type hints, and provides accompanying tests.

Frequently Asked Questions about python-edit

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

FAQPage Schema
How do I refactor Python code to add type hints and follow PEP 8?

To refactor Python code with type hints and PEP 8 compliance, this Skill modernizes existing modules by enforcing descriptive docstrings, safe maintainable patterns, and strong typing across Python 3.9+ projects. It provides step-by-step refactoring guidance for code modernization.

What is the best way to generate a new Python module with tests?

Generating a new Python module with tests is handled by creating production-ready code templates that include type hints, pytest-ready tests, and clear interfaces. This ensures your module creation process adheres to PEP 8 and maintainable implementation patterns.

Can I use this to debug Python code and get performance improvement suggestions?

Yes, you can debug Python code and receive performance improvement suggestions. This Skill diagnoses and fixes bugs while providing testing strategies and safe, maintainable implementation patterns to optimize your Python 3.9+ projects.

Does this work for modernizing legacy Python 3.9+ codebases?

Yes, this works for modernizing legacy Python 3.9+ codebases by applying code modernization techniques, adding strong typing, and refactoring existing modules to ensure adherence to PEP 8 standards and safe maintainable patterns.

How do I write pytest-ready tests for my existing Python functions?

Writing pytest-ready tests for existing Python functions is supported by generating accompanying example tests and testing strategies. This ensures your code validation aligns with strong typing and maintainable implementation patterns.