Complete automation for Python development: generate code from specs, add tests, debug, and optimize—all with the configured conda environment.
7w4.net有更好的技能外掛。
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 dooutput_path: Where to save the generated file (default: H:\code\Daily\generated_<timestamp>.py)The generated code should include:
After code is generated, use scripts/create_tests.py to produce comprehensive unit tests:
H:\code\Daily\tests\Run tests with scripts/run_tests.py:
If tests fail, invoke scripts/debug_code.py:
Once tests pass, use scripts/optimize_code.py:
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/patchscripts/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:
Do not use for non-Python languages or when conda environment is unavailable.
這個技能提供了從寫程式碼到測試、除錯、最佳化的一整套自動化流程,文件寫得清楚明白,上手還算容易。但它的問題比較明顯:只針對 Windows 系統,路徑都是寫死的,換臺電腦或 Linux/Mac 系統就用不了;程式碼生成功能比較基礎,更像是模板填充而非真正的智慧生成;自動生成的測試也需要人工補全。總體來說,適合在特定 Windows 環境下快速搭建開發流水線使用,但通用性和智慧化程度還有較大提升空間。