Add documentation for using uv scripts in hack directory

This commit is contained in:
dexhorthy
2025-07-27 10:46:19 -07:00
parent 735533b04a
commit cacae22213

17
hack/CLAUDE.md Normal file
View File

@@ -0,0 +1,17 @@
# Hack Directory Guidelines
## Using UV Scripts for One-Off Tools
When creating standalone Python scripts in this directory, use uv's inline script dependencies:
```python
#!/usr/bin/env -S uv run
# /// script
# dependencies = [
# "pillow",
# "requests",
# ]
# ///
```
This allows scripts to be self-contained with their dependencies and run with `uv run script.py` without manual environment setup. UV will automatically create an isolated environment and install the required packages on first run.