/thrashr888-agent-kit:python-uvfrom thrashr888-agent-kit
Modern Python development workflow using uv package manager. Covers project setup, dependency management, testing with pytest, linting with ruff/black, and FastAPI project structure.
Ships in thrashr888-agent-kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Modern Python development workflow using uv instead of pip/poetry.
uv.lock)# Initialize project
uv init my-project
cd my-project
# Or with specific Python version
uv init my-project --python 3.12
# Create venv and sync dependencies
uv sync
# With dev dependencies
uv sync --dev
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "my-project"
version = "0.1.0"
description = "Project description"
readme = "README.md"
requires-python = ">=3.12"
authors = [{ name = "Your Name", email = "[email protected]" }]
dependencies = [
"fastapi~=0.118",
"uvicorn[standard]~=0.37",
"pydantic>=2.12,<3",
]
[project.optional-dependencies]
dev = [
"pytest",
"pytest-asyncio",
"pytest-cov",
"ruff",
"black",
]
[project.scripts]
myapp = "app.main:start"
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
addopts = "-q --tb=short"
[tool.ruff]
target-version = "py312"
line-length = 88
[tool.black]
line-length = 88
target-version = ["py312"]
# Add dependency
uv add fastapi
# Add dev dependency
uv add --dev pytest
# Add with version constraint
uv add "pydantic>=2.0,<3"
# Remove dependency
uv remove package-name
# Update all dependencies
uv sync --upgrade
# Update specific package
uv add package-name --upgrade
# Run script
uv run python script.py
# Run module
uv run python -m app.main
# Run project script (from pyproject.toml)
uv run myapp
# Run with specific Python
uv run --python 3.12 python script.py
# Run all tests
uv run pytest
# Run with coverage
uv run pytest --cov=app --cov-report=term-missing
# Run specific test file
uv run pytest tests/test_api.py
# Run tests in parallel
uv run pytest -n auto
# Run marked tests
uv run pytest -m "not slow"
# Format with black
uv run black .
# Check formatting
uv run black --check .
# Lint with ruff
uv run ruff check .
# Auto-fix ruff issues
uv run ruff check --fix .
# Sort imports
uv run isort .
my-project/
├── app/
│ ├── __init__.py
│ ├── main.py # FastAPI app
│ ├── api/
│ │ ├── __init__.py
│ │ └── routes.py
│ ├── models/
│ │ └── __init__.py
│ └── tests/
│ └── test_api.py
├── pyproject.toml
├── uv.lock
└── README.md
# Development with auto-reload
uv run uvicorn app.main:app --reload --port 8000
# Production
uv run uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 4
# Migrations
uv run python manage.py migrate
# Run server
uv run python manage.py runserver
# Create superuser
uv run python manage.py createsuperuser
# Shell
uv run python manage.py shell
# Generate migration
uv run alembic revision --autogenerate -m "Add users table"
# Apply migrations
uv run alembic upgrade head
# Rollback
uv run alembic downgrade -1
# GitHub Actions deploy pattern
SCRIPT_AFTER: |
set -e
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
cd /opt/myapp
# Sync dependencies
uv sync
# Run migrations
uv run alembic upgrade head
# Restart service
sudo systemctl restart myapp
# Health check with retries
for i in {1..5}; do
if curl -sf http://127.0.0.1:8000/api/health; then
echo "Health check passed"
exit 0
fi
sleep 5
done
exit 1
# /etc/systemd/system/myapp.service
[Unit]
Description=My FastAPI App
After=network.target
[Service]
User=appuser
WorkingDirectory=/opt/myapp
ExecStart=/home/appuser/.local/bin/uv run uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 2
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
name: Python Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Set up Python
run: uv python install 3.12
- name: Install dependencies
run: uv sync --dev
- name: Run tests
run: uv run pytest
- name: Lint
run: uv run ruff check .
# Stamp build version for deployments
printf "%s\n" "$(date -u +%Y%m%dT%H%M%SZ)_$(git rev-parse --short HEAD)" > VERSION
# app/config.py
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
database_url: str
secret_key: str
debug: bool = False
class Config:
env_file = ".env"
settings = Settings()
# Essential commands
uv sync # Install all dependencies
uv run pytest # Run tests
uv run ruff check . # Lint
uv run black . # Format
uv add <pkg> # Add dependency
uv add --dev <pkg> # Add dev dependency
# FastAPI
uv run uvicorn app.main:app --reload
# Django
uv run python manage.py runserver
# Alembic
uv run alembic upgrade head
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
Generated from the plugin's indexed repository (thrashr888/thrashr888-agent-kit) — no native marketplace selected
npx claudepluginhub p/thrashr888-thrashr888-agent-kit21 skills in this plugin
/agent-ready-engineeringMake codebases ready for reliable human and agent work./building-local-ai-appsDesign patterns for local-first AI desktop apps — provider abstraction (Ollama / OpenAI-compatible gateways), RAG retrieval and ingestion hygiene, citation UX that loops back to sources, streaming and scoped cancellation, chat-loop details, and demo-corpus design. Use when building or reviewing a local AI app, a RAG/notebook product, chat UX, or preparing AI product demos. Distilled from Alchemy (a local NotebookLM clone)./copy-reviewReview user-facing copy (websites, release notes, README, in-app strings) for machine-sounding writing, then codify the owner's voice in a repo WRITING.md. Use when asked to check copy for AI-isms, make text "read human", review marketing or landing-page text, fix writing that "sounds like AI", or set up a writing style guide. Not for project documentation structure (plans/specs/RFCs) — that's style-docs./debugging-tauri-appsFind out why a Tauri app crashed, froze, or failed silently — macOS crash reports, the unified log, the debug bridge's error history, panic hooks, and the capture a shipped app needs to have. Use when a Tauri app misbehaves and the terminal shows nothing, or when adding error/crash logging to one./driving-tauri-appsAutomate, inspect, and verify a running Tauri app with tauri-browser — DOM snapshots, ref-based clicks, React-safe fills, screenshots, direct Tauri command invokes, and demo-data seeding. Use when driving a Tauri app for testing, screenshots, demo setup, or end-to-end verification of app changes./github-releasesCreate releases for Rust CLI tools, macOS apps, Python/uv projects, and Next.js apps. Use when asked to release, tag, ship, publish, or deploy any project.