Give it a lot of input. The more input you give it, the better its output is.

It's surprisingly good at UI design given that it's mainly a text model.

claude -p "Read the SPEC.md file and implement it"

I tell it to keep things simple, stay away from frameworks, and just write raw SQL. In the broken version, I let it do whatever it wants.

A key is writing a clear spec ahead of time, which provides context to the agent as it works in the codebase. Having a document for the agent that outlines the project’s structure and how to run e.g. builds and linters is helpful. Asking the agent to perform a code review on its own work is surprisingly fruitful. Finally, I have a personal “global” agent guide describing best practices for agents to follow, specifying things like problem-solving approach, use of TDD, etc.