Agent Skills
› NeverSight/learn-skills.dev
› python-scripting
python-scripting
GitHub利用uv和PEP 723标准创建自包含的Python脚本,实现自动依赖管理、参数解析及可重现构建。适用于独立工具、自动化任务及CLI应用,简化环境配置与运行流程。
Trigger Scenarios
创建独立的Python脚本
需要自动管理依赖的自动化任务
开发带有外部依赖的CLI工具
Install
npx skills add NeverSight/learn-skills.dev --skill python-scripting -g -y
SKILL.md
Frontmatter
{
"tag": "skill",
"name": "python-scripting",
"type": "skill",
"author": "Joseph OBrien",
"status": "unpublished",
"updated": "2025-12-23",
"version": "1.0.1",
"description": "Python scripting with uv and PEP 723 inline dependencies. Use when creating standalone Python scripts with automatic dependency management."
}
Python Scripting Skill
Creates self-contained Python scripts using uv and PEP 723 inline script metadata.
What This Skill Does
- Creates standalone Python scripts
- Uses PEP 723 inline dependencies
- Sets up argument parsing
- Handles input/output
- Configures reproducible builds
When to Use
- Standalone utility scripts
- One-off automation tasks
- Quick data processing
- CLI tools
- Scripts that need dependencies
Reference Files
references/UV_SCRIPT.template.py- Python script template with PEP 723 metadata
PEP 723 Format
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "requests",
# "rich",
# ]
# ///
Running Scripts
uv run script.py [args]
Dependencies install automatically on first run.
Best Practices
- Use
exclude-newerfor reproducibility - Include docstring with usage examples
- Use argparse for CLI arguments
- Return exit codes (0 success, non-zero error)
- Keep scripts focused on one task
Version History
- e0220ca Current 2026-07-05 21:29


