logoalt Hacker News

simonwtoday at 7:52 PM4 repliesview on HN

One of my biggest unlocks has been embracing Claude Code for web - the cloud version - and making sure my projects are setup to work with it.

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


Replies

athrowaway3ztoday at 9:03 PM

Half my visits to HN are to check out a comment that explains the right uv inline dep syntax

   #!/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.
show 1 reply
jarrettcoggintoday at 9:33 PM

Are you doing this for non-library projects as well? I'm trying to wrap my head around the idea of packaging a microservice using this mechanism (I haven't heard of this before now).

sanderjdtoday at 9:20 PM

I've been trying to use workflows like this, but I quickly run into token limits.

I'm curious, for those of you who work like this, what level of subscription do you have?

show 1 reply
throwup238today at 7:57 PM

> and making sure my projects are setup to work with it.

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.

show 1 reply