A # /// script comment block holds TOML such as dependencies = [...]. Tools like uv run script.py read it, build a cached environment and run the script, so one file can carry its own requirements.