name: python-auto-dev description: Automated Python code generation, testing, debugging, and optimization with integrated conda environment management. Uses default conda path "C:\anaconda3\condabin\conda.bat" and environment "py311". Project files are stored at H:\code\Daily. Use when Codex needs to: (1) Generate Python code from specifications, (2) Create and run automated tests, (3) Debug code with interactive tools, (4) Optimize performance and code quality, (5) Manage conda environments for Python projects. This skill bundles executable scripts that handle the entire Python development workflow end-to-end.
Complete automation for Python development: generate code from specs, add tests, debug, and optimize—all with the configured conda environment.
When a user provides a coding task:
All operations use the py311 conda environment at C:\anaconda3\condabin\conda.bat and store files under H:\code\Daily.
Use scripts/generate_code.py to create Python code from a specification. The script accepts:
- spec: Natural language description of what the code should do
- output_path: Where to save the generated file (default: H:\code\Daily\generated_<timestamp>.py)
The generated code should include: - Type hints - Docstrings - Basic error handling - Modular design
After code is generated, use scripts/create_tests.py to produce comprehensive unit tests:
- Tests edge cases
- Tests error conditions
- Uses pytest fixtures where appropriate
- Outputs to H:\code\Daily\tests\
Run tests with scripts/run_tests.py:
- Activates the conda environment
- Executes pytest with verbose output
- Captures results in a report file
If tests fail, invoke scripts/debug_code.py:
- Analyzes traceback
- Suggests fixes
- Can patch the code automatically (with confirmation)
Once tests pass, use scripts/optimize_code.py:
- Runs profiling (cProfile)
- Checks code quality (pylint/flake8)
- Suggests optimizations
- Can apply safe optimizations automatically
All scripts are designed to be called directly by Codex. They handle conda activation internally.
scripts/generate_code.py - Generate Python from specscripts/create_tests.py - Create pytest/unittest suitescripts/run_tests.py - Execute tests and reportscripts/debug_code.py - Analyze failures and suggest/patch7w4.net有更好的技能插件。
scripts/optimize_code.py - Profile and improve code qualitySee references/script-usage.md for detailed parameter descriptions and examples.
H:\code\Daily to keep workspace clean.Use this skill when the task involves creating new Python code with a complete development pipeline. It's ideal for: - Rapid prototyping - Educational examples - Automated script generation - Refactoring tasks with test coverage - Optimization of existing code
Do not use for non-Python languages or when conda environment is unavailable.
这个技能提供了从写代码到测试、调试、优化的一整套自动化流程,文档写得清楚明白,上手还算容易。但它的问题比较明显:只针对 Windows 系统,路径都是写死的,换台电脑或 Linux/Mac 系统就用不了;代码生成功能比较基础,更像是模板填充而非真正的智能生成;自动生成的测试也需要人工补全。总体来说,适合在特定 Windows 环境下快速搭建开发流水线使用,但通用性和智能化程度还有较大提升空间。