Creates Python projects with proper structure, virtual environments, and dependency management. Use when users request to create a new Python project, set up a Python development environment, or initialize a Python application with standard tooling.
Use 'uv' instead of 'pip'
Always use pytest, never unittest
This skill creates well-structured Python projects with best practices for dependency management, testing, and code organization. It sets up virtual environments, installs dependencies, and configures common development tools.
Ask the user about:
Standard Python project structure:
project-name/
├── src/
│ └── project_name/
│ ├── __init__.py
│ └── main.py
├── tests/
│ ├── __init__.py
│ └── test_main.py
├── .gitignore
├── README.md
├── requirements.txt
└── setup.py (optional, for libraries)
Create and activate virtual environment:
# Create virtual environment
python3 -m venv venv
# Activate (instructions for user)
# macOS/Linux: source venv/bin/activate
# Windows: venv\Scripts\activate
Install packages using uv:
uv pip install <package-name>
uv pip freeze > requirements.txt
For development dependencies:
uv pip install pytest black flake8 mypy
git init
git add .
git commit -m "Initial commit: project setup"
argparse or click for command-line argumentsmain.py with proper entry pointif __name__ == "__main__": guardsetup.py for packagingnotebooks/ directory for Jupyter notebooksdata/ directory (with .gitignore)Always use pytest for testing:
uv pip install pytest pytest-cov
Example test file:
# tests/test_main.py
import pytest
from src.project_name.main import my_function
def test_my_function():
assert my_function(2, 3) == 5
Run tests:
pytest
pytest --cov=src # with coverage
uv pip install black
black src/ tests/
uv pip install flake8
flake8 src/ tests/
uv pip install mypy
mypy src/
# src/project_name/main.py
def main():
"""Main application entry point."""
print("Hello, World!")
if __name__ == "__main__":
main()
# src/project_name/config.py
import os
from pathlib import Path
# Project root directory
PROJECT_ROOT = Path(__file__).parent.parent.parent
# Load environment variables
DEBUG = os.getenv("DEBUG", "False") == "True"
class ProjectError(Exception):
"""Base exception for this project."""
pass
class ConfigError(ProjectError):
"""Configuration-related errors."""
pass
# Virtual environment
venv/
env/
.venv/
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
*.egg-info/
dist/
build/
# IDE
.vscode/
.idea/
*.swp
*.swo
# Environment
.env
.env.local
# Testing
.pytest_cache/
.coverage
htmlcov/
# OS
.DS_Store
Thumbs.db
package==1.2.3package>=1.2,<2.0src/ layout to avoid import issuesmkdir my-cli-tool && cd my-cli-tool
python3 -m venv venv
source venv/bin/activate
uv pip install click
# Create main.py, tests, etc.
mkdir my-api && cd my-api
python3 -m venv venv
source venv/bin/activate
uv pip install fastapi uvicorn
# Create app structure
mkdir my-analysis && cd my-analysis
python3 -m venv venv
source venv/bin/activate
uv pip install pandas numpy matplotlib jupyter
# Create notebooks/, data/, src/
This skill includes examples in the bundled directories:
example.py - Template Python script with best practicesapi_reference.md - Common library documentation referencesnpx skills add haddock-development/python-project-creator下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer