mcpbeat Sign in

Python Project Creator Skill for Claude

> 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.

2k tokens
context cost
the whole folder, loaded on every use
4
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
208
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/haddock-development/claude-reflect-system --skill python-project-creator

What comes with it

2 441 bytes besides the instruction
assets/example_asset.txt
references/api_reference.md
scripts/example.py

The instruction itself

38 sections, as written by the author

Python Project Creator

Critical Corrections

Use 'uv' instead of 'pip'

  • ✗ Don't: pip install, pip freeze
  • ✓ Do: uv pip install, uv pip freeze (uv is faster and more modern)

Always use pytest, never unittest

  • ✗ Don't: unittest framework
  • ✓ Do: pytest for all testing needs

Overview

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.

Project Creation Workflow

1. Understand Requirements

Ask the user about:

  • Project name and purpose
  • Type: CLI tool, web app, library, data science project
  • Dependencies: Required packages
  • Testing: Testing framework preference (pytest, unittest)

2. Create Project Structure

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)

3. Virtual Environment Setup

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

4. Install Dependencies

Install packages using uv:

uv pip install <package-name>
uv pip freeze > requirements.txt

For development dependencies:

uv pip install pytest black flake8 mypy

5. Initialize Git

git init
git add .
git commit -m "Initial commit: project setup"

Project Types

CLI Application

  • Use argparse or click for command-line arguments
  • Include main.py with proper entry point
  • Add if __name__ == "__main__": guard

Web Application

  • Flask: Lightweight, good for small APIs
  • FastAPI: Modern, async, auto-documentation
  • Django: Full-featured, batteries included

Library/Package

  • Include setup.py for packaging
  • Follow semantic versioning
  • Add comprehensive docstrings

Data Science

  • Include notebooks/ directory for Jupyter notebooks
  • Add data/ directory (with .gitignore)
  • Common packages: pandas, numpy, matplotlib, scikit-learn

Testing Setup

pytest (Required)

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

Code Quality Tools

Black (Code Formatter)

uv pip install black
black src/ tests/

Flake8 (Linter)

uv pip install flake8
flake8 src/ tests/

mypy (Type Checker)

uv pip install mypy
mypy src/

Common Patterns

Entry Point Pattern

# src/project_name/main.py

def main():
    """Main application entry point."""
    print("Hello, World!")

if __name__ == "__main__":
    main()

Configuration Pattern

# 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"

Error Handling Pattern

class ProjectError(Exception):
    """Base exception for this project."""
    pass

class ConfigError(ProjectError):
    """Configuration-related errors."""
    pass

.gitignore Template

# 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

Best Practices

Dependency Management

  • Pin exact versions in production: package==1.2.3
  • Use ranges for libraries: package>=1.2,<2.0
  • Separate dev dependencies from production
  • Keep requirements.txt minimal

Project Structure

  • Use src/ layout to avoid import issues
  • Keep tests separate from source code
  • One module per file, clear naming
  • Flat is better than nested (within reason)

Documentation

  • Write clear README.md with setup instructions
  • Add docstrings to all public functions/classes
  • Include usage examples in README
  • Document environment variables

Version Control

  • Initialize git from the start
  • Write meaningful commit messages
  • Create .gitignore before first commit
  • Never commit secrets or credentials

Quick Start Examples

Minimal CLI Tool

mkdir my-cli-tool && cd my-cli-tool
python3 -m venv venv
source venv/bin/activate
uv pip install click
# Create main.py, tests, etc.

FastAPI Web Service

mkdir my-api && cd my-api
python3 -m venv venv
source venv/bin/activate
uv pip install fastapi uvicorn
# Create app structure

Data Science Project

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/

Resources

This skill includes examples in the bundled directories:

scripts/

  • example.py - Template Python script with best practices

references/

  • api_reference.md - Common library documentation references

assets/

  • Project templates and boilerplate code

Other skills for the same job

different authors, same section of the catalogue
MCP Builder
by anthropics
vendor ×13

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

30k tokens scripts
Changelog Generator
by frostant
×9

Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

774 tokens
Finishing A Development Branch
by ZhanlinCui
×7

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup

1k tokens
MCP Builder
by JayZeeDesign
×7

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

37k tokens scripts
Vercel React Native Skills
by vercel-labs
vendor ×6

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

39k tokens
Vercel React Best Practices
by ratacat
×5

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

34k tokens
Next Best Practices
by vercel-labs
vendor ×4

Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling

20k tokens
Using Git Worktrees
by ZhanlinCui
×4

Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification

1k tokens

How to use it

Copy the folder

Take haddock-development/python-project-creator from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.

Install what it needs

The instructions reference pip, uv. Without those the skill loads but fails at the first command.