by simonw · 10mo ago · 0 comments
I mainly work in Python, and I've been ensuring that all of my projects have a test suite which runs cleanly with "uv run pytest" - using a dev dependency group to ensure the right dependencies are installed.
This means I can run Claude Code against any of my repos and tell it "run 'uv run pytest', then implement ..." - which is a shortcut for having it use TDD and write tests for the code it's building, which is essential for having coding agents produce working code that they've tested before they commit.
Once this is working well I can drop ideas directly into the Claude app on my iPhone and get 80% of the implementation of the idea done by the time I get back to a laptop to finish it off.
I wrote a bit about "uv run pytest" and dependency groups here: https://til.simonwillison.net/uv/dependency-groups
#!/usr/bin/env -S uv run --script
# /// script
# dependencies = [
# "requests<3",
# "rich",
# ]
# ///
import requests, rich
# ... script goes here`
so i can tell claude to write a self contained script it can later use.I often have Claude Code build little HTML+JavaScript tools which are simple enough that I don't need a template ("Vanilla JavaScript, no dependencies or build script, test it with Playwright").
I've built a couple of Go apps which works great because Go has such strong default patterns and a full featured standard library, so again no need for a template.
MESA drivers are a godsend in Claude Code for web if working on non-web GUIs. It can take screenshots and otherwise interact with them.
I'm curious, for those of you who work like this, what level of subscription do you have?
Huh, this is...unexpected. TIL, indeed!