Agent skill
uv-tdd
A development process for Python applications that uses TDD to iterate on a new project based around uv. Use when Claude needs to create a new Python project, write Python code with tests, or work on Python development using test-driven development practices with the uv package manager.
Install this agent skill to your Project
npx add-skill https://github.com/simonw/skills/tree/main/uv-tdd
SKILL.md
uv-tdd skill
A development process for Python applications that uses TDD to iterate on a new project based around uv.
Create a project with this command:
mkdir name-of-project
cd name-of-project
uv init
git init (if not already in a git repo)
This creates an initial pyproject.toml file
Add dependencies using:
uv add httpx
Always start by adding a dev dependency of pytest like this:
uv add pytest --dev
Then add a starting test:
mkdir tests
echo 'def test_add():
assert 1 + 1 == 2' > tests/test_add.py
Then run the tests like this:
uv run pytest
Always run Python code like this:
uv run python -c "..."
Always create a README.md for the project, which starts with just the project name as a heading plus a short description.
Start by creating a spec.md file with a detailed specification that includes markdown TODO lists. Update the spec and those TODOs as you progress, including adding new ones and checking off previous ones.
Practice TDD. For every change start by writing a test (grouped sensible in test files with other related tests) and then use uv run pytest -k name_of_test to watch it fail. Then implement the change and watch the test pass. Update the TODOs and add or update relevant documentation in the README, then commit the implementation and tests and documentation as a single commit.
Use and reuse pytest fixtures where appropriate, including for temporary files used for the duration of the test run. Use pytest.mark.parameterized to avoid duplicated test code.
Delete that test_add.py file once you have implemented your first real test. Do not include that test_add.py file in any of your commits.
Commit often, in sensible chunks. If a remote is configured then push after every commit.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
setup-to-pyproject
Migrate Python projects from setup.py/setup.cfg to pyproject.toml for use with uv. Use when upgrading legacy Python packaging, converting setup.py to modern pyproject.toml format, setting up dependency groups for development/testing, and ensuring `uv run pytest` works correctly.
cogapp-markdown
Use cogapp to auto-generate sections of markdown documentation by embedding Python code that produces content. Use when a project needs to keep documentation in sync with code, such as embedding CLI --help output in README files, generating tables, or any content that should be derived from the code itself rather than manually maintained.
upgrade-actions
Upgrade GitHub Actions workflows
datasette-plugin-writer
Guide for writing Datasette plugins. This skill should be used when users want to create or develop plugins for Datasette, including information about plugin hooks, the cookiecutter template, database APIs, request/response handling, and plugin configuration.
starlette
Build async web applications and APIs with Starlette 1.0, the lightweight ASGI framework for Python. Use this skill whenever a user wants to create an async Python web app, REST API, WebSocket server, or ASGI application using Starlette. Triggers include mentions of 'Starlette', 'ASGI', async Python web frameworks, or requests to build lightweight async APIs, WebSocket services, streaming responses, or middleware pipelines. Also use when the user is working with FastAPI internals (which is built on Starlette), needs ASGI middleware patterns, or wants a minimal async web server without a full framework. Covers routing, requests/responses, WebSockets, middleware, templates, static files, authentication, lifespan, background tasks, config, testing, schemas, and more.
greeter
Generate a cheerful greeting in any language.
Didn't find tool you were looking for?